If you run an online shop, a marketplace or a shopping app, you may need to know whether a product has been recalled. In the US that information sits with several agencies, each with its own site and format. I built one API that returns them in a single JSON shape. This post shows how to call it.

What it covers

  • CPSC (consumer products): 2,107 notices
  • FDA (food, drugs, devices): 31,088 notices
  • USDA-FSIS (meat and poultry): 390 notices
  • NHTSA (vehicles): looked up live by make, model and year, not stored

That is 33,585 stored notices, refreshed daily. Every response includes data_as_of, per_source and stale, so you can see how fresh the data is.

Look up a barcode

import requests url = "https://zylalabs.com/api/15762/unified+recalls+api/43158/check+a+product+barcode" resp = requests.get( url, params={"upc": "075741060132", "limit": 10}, headers={"Authorization": "Bearer YOUR_API_KEY"}, ) for m in resp.json().get("matches", []): print(m["source"], m["title"], m["recall_date"]) 

For this barcode the API returns a match: id cpsc-21079, "National Presto Recalls Smokers Due to Electric Shock Hazard", recall date 2021-02-17, product "Presto Indoor Electric Smoker". The notice lists the codes 075741060132 and 075741060149. The lookup matches the code ignoring the check digit.

You can also search by product name (name, brand) when you have no barcode.

Vehicles

The vehicles endpoint takes make, model and year. Toyota Camry 2020 returned 3 recalls, for example the fuel pump issue (2020-11-04): if the pump fails, the engine can stall while driving.

What a barcode result can and cannot tell you

Only notices that list barcodes can be matched by barcode: 3,298 of 33,585 (9.8%). USDA and NHTSA notices have none. When nothing matches, the API returns recalled: null. That means "not found in the notices we can match". It says nothing about whether a product is safe, so check the official agency sites too.

Coverage is US only. This is information, not legal or medical advice.

Credit

The notices are public US federal data from CPSC, openFDA, USDA-FSIS and NHTSA. Each record links to the official notice. The API adds one schema, severity, duplicate removal and freshness fields.

Free trial of 50 calls: https://zylalabs.com/api-marketplace/other/unified+recalls+api/15762

If a source is missing that you need, tell me in the comments.