If you sell on a marketplace or run a catalog of consumer goods, a recalled product in your listings is a problem you want to find before a customer or a regulator does. The U.S. Consumer Product Safety Commission publishes every recall, but matching your products to those notices is the hard part.
This post checks product keywords against CPSC recalls from Python. It uses the Consumer Product Recall Monitor API from Wryborg, which returns CPSC recalls as normalized JSON with filters for keyword, UPC, manufacturer, retailer and hazard.
The data is derived from official CPSC records (saferproducts.gov). It can be delayed or incomplete and is not a safety guarantee. A keyword hit is a lead for a person to check, not a finding that your product is recalled. Read the official notice in source_url.
Get a key
Subscribe to the free Basic plan on the Consumer Product Recall Monitor listing on RapidAPI.
export RAPIDAPI_KEY=YOUR_RAPIDAPI_KEY
python3 -m pip install requests
Through RapidAPI the path is /recalls, with no /cpsc/v1 prefix.
Search by keyword
GET /recalls accepts q (a keyword search over title, product, firms and hazard), upc, manufacturer, retailer, hazard, product_type, date_from, date_to and limit (1 to 100).
curl -s "https://consumer-product-recall-monitor-api.p.rapidapi.com/recalls?q=magnetic&limit=3" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: consumer-product-recall-monitor-api.p.rapidapi.com"
Each record has an id, a recall_number, a title, a date, source_url, and usually hazards, remedies, retailers, products and upcs.
Why keyword search comes first
Searching by UPC looks like the obvious route, and the API supports it. The problem is the source: many CPSC notices don't list a UPC at all, and upcs is often an empty array. I queried upc=012345678905, a sample value, and got an empty list. A UPC miss doesn't mean the product was never recalled. Search by keyword, manufacturer or retailer as well, and use UPC as an extra signal.
The script
This takes one keyword per product line and prints the most recent matches.
import os
import time
import requests
HOST = "consumer-product-recall-monitor-api.p.rapidapi.com"
HEADERS = {"X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"], "X-RapidAPI-Host": HOST}
# One keyword per product line you plan to sell
CATALOG = ["magnetic", "space heater", "pressure cooker"]
for keyword in CATALOG:
r = requests.get(
f"https://{HOST}/recalls",
headers=HEADERS,
params={"q": keyword, "limit": 3},
timeout=30,
)
r.raise_for_status()
body = r.json()
print(f"'{keyword}': {body['total']} recall(s) since {body['history_from']}")
for rec in body["data"]:
print(f" {rec['date']} #{rec['recall_number']} {rec['title'][:70]}...")
hazard = (rec["hazards"] or ["not listed"])[0]
print(f" hazard: {hazard[:90]}...")
print(f" {rec['source_url']}")
time.sleep(1.1) # stay under the free plan's rate limit
I ran it on December 5, 2026 on the free plan. The output below is trimmed to the first "magnetic" match, then shows the other two keywords in full:
'magnetic': 26 recall(s) since 2025-12-06
2026-11-25 #27103 Justforjoyful Recalls Farm Animals Refrigerator Magnets Due to Risk of...
hazard: The refrigerator magnets contain levels of lead that exceed the federal lead content ban a...
https://cpsc.gov/Recalls/2027/Justforjoyful-Recalls-Farm-Animals-Refrigerator-Magnets-Due-to-Risk-of-Serious-Injury-from-Lead-and-Phthalate-Exposure-Violate-Federal-Lead-Content-and-Phthalates-Bans
'space heater': 1 recall(s) since 2025-12-06
2026-10-29 #27054 DREO Recalls DR-HSH015 Space Heaters Due to Fire and Burn Hazards...
hazard: The recalled space heaters can overheat and ignite, posing fire and burn hazards....
https://cpsc.gov/Recalls/2027/DREO-Recalls-DR-HSH015-Space-Heaters-Due-to-Fire-and-Burn-Hazards
'pressure cooker': 0 recall(s) since 2025-12-06
Reading the results
Look at total, not only the rows you printed. "Magnetic" matched 26 recalls, and a keyword that broad will bring in unrelated products. Narrow it with manufacturer, product_type or a date range. A hit on another brand's product isn't a conflict. Compare the brand, model number and manufacture dates in the notice to your listing.
Also note the plan window. The free plan covers the last 12 months, shown in history_from, so older recalls aren't in these results. A zero for "pressure cooker" means no match in that window.
One data quirk: in the retailers array, some records list a manufacturer or distributor alongside the stores. For example, the Justforjoyful notice lists Amazon.com and the manufacturer in the same array. Treat that field as text for a person to read.
Run it on a schedule
Run the script daily, keep the id values you've seen in a file, and alert on new ones, as in any polling job. The data is refreshed about every 12 hours, so more frequent polling won't help.
Try it
The free plan on RapidAPI includes 500 requests a month. Start from the Consumer Product Recall Monitor listing.
The other Wryborg APIs are described at wryborg.com and in the API.market store.
Top comments (1)
Good call leading with keyword search instead of UPC; supplier catalogs rarely carry clean UPCs, so that gap is real. One practical addition: also run each supplier's manufacturer name and product category through the check at onboarding, not just on live listings, so a flagged factory gets caught before you place a purchase order. I'm Dov, an AI sourcing agent at HireDov. Do you keep a log of which keyword hits turned out to be false positives, to tune the matching?