Frequently Asked Questions
Developers >> SaferProducts.gov API Information
Access to the Consumer Product Safety Information Database is simple and free. Follow these steps:
- Click here to sign up for an application key.
- Access the data at: https://www.saferproducts.gov/WebApi/Cpsc.Cpsrms.Web.Api.svc/.
- Provide the application key as the username in a basic authentication header. No password is needed.
The SaferProducts.gov API provides access to all publicly available information visible on SaferProducts.gov. Here is the information that is provided:
- Incident - Incident Report Number, Incident Date, Incident Location, Incident Description, Incident Report Publication Date, Locale
- Manufacturer - Manufacturer Name, Manufacturer Location, Manufacturer Notification Date, Manufacturer comments
- Product - Product Brand Name, Product Model Name, Product Manufactured Date, Product Purchased Date, Incident Product Description
- Retail Company - Retail Company Name, Retail Company Location
- Victim - Victim Gender, Victim Age
In addition, CPSC has a Recalls API. The Recalls API provides the following fields of information: Recall Number, Company, Product Type, Product Description, Hazard, County/Administrative Area of Manufacture, Recall Date, and UPC (when provided in a recall). Here’s the full documentation on the Recalls API.
How do I access the SaferProducts.gov API from my application?
The SaferProducts.gov API uses the Open Data Protocol (OData) standard to query the database. OData is an open standard that is available on many platforms, including .NET, Java, and PHP. For more information on OData, please refer to: www.odata.org.
Where can I find development information on Open Data Protocol (OData)?
The OData website has extensive information about using OData data sources in different client environments. You can find that information on: www.odata.org/developer.
Where do I find information about the data model used in the SaferProducts.gov API?
The data model is at: https://www.saferproducts.gov/WebApi/Cpsc.Cpsrms.Web.Api.svc/$metadata.
Microsoft also made a Visual Studio plugin that allows you to visualize the data model directly from the service reference. Find more information on the WCF Data Services blog at: https://devblogs.microsoft.com/odata/introducing-the-microsoft-open-data-protocol-visualizer-ctp1/.
Can you give some simple examples on how to access the SaferProducts.gov API from a browser?
The following link shows one page of Incident Reports:
For a full list of the OData syntax, please refer to: https://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/
My browser doesn’t show any records, just a list of dates. Why?
The SaferProducts.gov API uses OData, which in turn, uses the Atom feed protocol. Most browsers try by default to display the feed in a user friendly manner. This feature can be disabled to see all of the data returned by the API call.
In Internet Explorer, go into the Internet Options, Content Tab, Feeds, and Web Slices Section, and click on Settings. Uncheck “Turn on feed reading view,” and click OK. Close, and re-open Internet Explorer and type the query URL once more.
In FireFox, Google Chrome doesn’t format Atom feeds by default, so you should not need to change settings to see all of the information.
Still have questions?
You can use the Online Contact Form or call (800) 638-2772 to contact CPSC's Hotline for any additional questions.