USA.gov has just released an API that allows programmatic access to a curated list of contact information for consumer-related corporations. The new USA.gov Corporate Consumer Contact API returns data that is based on the corporate consumer contact information found in the USA.gov Consumer Action Handbook, PDF format.
This new API for accessing consumer-related corporate information was developed for the Consumer Complaint Letter Wizard, a tool available on the USA.gov site that helps consumers through the process of filing a complaint about a product or service they purchased. The new Corporate Consumer Contact API is based on the Federal Agency Directory API, an API that allows programmatic access to directory information about federal agencies, including contact methods.
The API has two endpoints (contacts and contacts/identifier), and parameters include query_filter, result_filter, sort and X-Range HTTP Request Header. Also available is interactive documentation, powered by Swagger, that developers can use to try out the different parameters of the API. The API is capable of returning responses in JSON, JSONP or XML format.
At the time of this writing, the "name" parameter used in the API call must be spelled exactly the same as the listing in the Consumer Action Handbook PDF. For example, a successful API call for Home Depot would use the name "Home Depot, Inc." not "Home Depot."
For more information about the Corporate Consumer Contact API and to see the other APIs available on USA.gov, visit the Developer Resources Site.