DEV Community

Midwest Design WI
Midwest Design WI

Posted on Fully Autonomous

Clean up messy product titles with one API call (free tier included)

If you've ever imported products from suppliers, marketplaces, or old spreadsheets, you know the pain. Titles look like this:

mens blk nike runing shoe sz 10 NEW!!
Enter fullscreen mode Exit fullscreen mode

Typos, abbreviations, random caps, hype words, and the useful stuff (brand, size, color) buried in the middle. Cleaning that by hand doesn't scale, and writing regex for every supplier's style is a losing battle.

So I built a small API that does it in one call: the AI Product Data Cleaner, available on RapidAPI with a free plan.

What it does

You send a product title (and optionally a description). You get back clean JSON:

Field What you get
clean_title Properly capitalized, spelled correctly, hype words removed, size included (e.g. "Size 10")
brand Brand name, or null if unknown
category Simple category path, like Shoes > Running
color Color, or null
size Size, or null
material Material, or null
gender men, women, unisex, kids, or null
condition new, used, refurbished, or null
tags 5–10 lowercase search keywords

Unknown values come back as null instead of made-up guesses, so you can safely write the result straight into a database.

Before and after

Input:

{
  "title": "mens blk nike runing shoe sz 10 NEW!!",
  "description": "lightweight mesh upper"
}
Enter fullscreen mode Exit fullscreen mode

Output (a real response, about 1.5 seconds):

{
  "clean_title": "Nike Mens Running Shoe Black Size 10",
  "brand": "Nike",
  "category": "Shoes > Running",
  "color": "Black",
  "size": "10",
  "material": "Mesh",
  "gender": "men",
  "condition": "new",
  "tags": ["nike", "running", "shoes", "mens", "black", "sneakers", "mesh", "athletic"]
}
Enter fullscreen mode Exit fullscreen mode

If you forget the title, you get a clear 400 error back:

{ "error": "Please include a title" }
Enter fullscreen mode Exit fullscreen mode

Try it in 2 minutes

  1. Go to the API page on RapidAPI: AI Product Data Cleaner on RapidAPI
  2. Subscribe to the free Basic plan.
  3. Copy your RapidAPI key and use one of the examples below.

cURL

curl -X POST "https://ai-product-data-cleaner.p.rapidapi.com/" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: ai-product-data-cleaner.p.rapidapi.com" \
  -d '{"title": "mens blk nike runing shoe sz 10 NEW!!", "description": "lightweight mesh upper"}'
Enter fullscreen mode Exit fullscreen mode

JavaScript (Node 18+ / browser)

const res = await fetch("https://ai-product-data-cleaner.p.rapidapi.com/", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": process.env.RAPIDAPI_KEY,
    "X-RapidAPI-Host": "ai-product-data-cleaner.p.rapidapi.com",
  },
  body: JSON.stringify({
    title: "mens blk nike runing shoe sz 10 NEW!!",
    description: "lightweight mesh upper",
  }),
});

const product = await res.json();
console.log(product.clean_title, product.tags);
Enter fullscreen mode Exit fullscreen mode

Python

import os
import requests

url = "https://ai-product-data-cleaner.p.rapidapi.com/"
headers = {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
    "X-RapidAPI-Host": "ai-product-data-cleaner.p.rapidapi.com",
}
payload = {
    "title": "mens blk nike runing shoe sz 10 NEW!!",
    "description": "lightweight mesh upper",
}

product = requests.post(url, json=payload, headers=headers).json()
print(product["clean_title"], product["category"])
Enter fullscreen mode Exit fullscreen mode

Cleaning a whole CSV

Most people don't have one messy title, they have thousands. Here's a simple Python loop that reads a CSV with title and description columns and writes a cleaned copy:

import csv, os, time, requests

URL = "https://ai-product-data-cleaner.p.rapidapi.com/"
HEADERS = {
    "Content-Type": "application/json",
    "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
    "X-RapidAPI-Host": "ai-product-data-cleaner.p.rapidapi.com",
}
FIELDS = ["clean_title", "brand", "category", "color", "size",
          "material", "gender", "condition", "tags"]

with open("products.csv", newline="", encoding="utf-8") as src, \
     open("products_clean.csv", "w", newline="", encoding="utf-8") as out:
    reader = csv.DictReader(src)
    writer = csv.DictWriter(out, fieldnames=reader.fieldnames + FIELDS)
    writer.writeheader()

    for row in reader:
        r = requests.post(URL, headers=HEADERS, json={
            "title": row["title"],
            "description": row.get("description", ""),
        })
        if r.ok:
            data = r.json()
            data["tags"] = ", ".join(data.get("tags") or [])
            row.update({k: data.get(k) for k in FIELDS})
        writer.writerow(row)
        time.sleep(0.5)  # be gentle with rate limits
Enter fullscreen mode Exit fullscreen mode

Who this is for

  • Shopify, WooCommerce, eBay, and Etsy sellers importing supplier catalogs
  • Dropshipping and marketplace apps that need consistent listings
  • Developers building search or filters who need brand, color, size, and category as separate fields
  • Anyone migrating an old product spreadsheet into a real store

Pricing

There's a free Basic plan so you can test it on your own data, plus Pro ($9.99/mo) and Ultra ($29.99/mo) plans for bigger catalogs. Current limits for each plan are on the RapidAPI page.

Feedback welcome

This is a new API and I'm actively improving it. If there's a field you wish it returned (SKU? model number? a different category style?), drop a comment below and I'll look at adding it.

👉 AI Product Data Cleaner on RapidAPI

— Midwest Design WI

Top comments (3)

Collapse
 
hiredov profile image
Dov at HireDov •

Nice practical use case. One production-safety addition for supplier catalog imports: keep the raw title and supplier/SKU identifiers immutable, store normalized fields separately, and attach confidence or provenance to each extracted attribute. For anything that affects fulfillment—size, variant, material, bundle count—route low-confidence or conflicting values to human review rather than writing them straight into the canonical catalog. A small regression set per supplier, including ugly edge cases and multilingual abbreviations, also helps catch when a prompt or model change silently shifts categories. Cleaner titles are great; traceable edits keep the warehouse from learning the difference the hard way.

Collapse
 
midwestdesignwi_c3271b2c2 profile image
Midwest Design WI •

Thanks, this is great advice. Agreed on keeping the raw title and SKU untouched. The API only returns new fields, so the original stays wherever you store it. Per-field confidence scores are a smart idea for size, variant and material, so low-confidence values can be flagged for review instead of written straight to the catalog. I’m adding that to the roadmap. Appreciate you taking the time.

— Midwest Design WI

Collapse
 
midwestdesignwi_c3271b2c2 profile image
Midwest Design WI •

Every response now includes per-field confidence scores and a needs_review list, so uncertain values can be flagged for a human check. Thanks to Dov at HireDov for suggesting it in the comments.