Chomp API documentation
The Chomp API returns ingredients, serving sizes, nutrients, allergens, and trace ingredients for more than 850,000 packaged foods. Records also carry categories, packaging photos where available, and Vegan, Vegetarian, and Gluten-Free labels. Four endpoints, all GET, all returning JSON.
Base URL
Production server — live data
https://chompthis.com/api/v2
Get started: key to first call
-
1
Get a key
Pick a plan and subscribe. Your key is created with the subscription and emailed to you. New Standard and Premium subscriptions start with a 5-day free trial; a card is required.
-
2
Make the first call
Look up one barcode:
curl "https://chompthis.com/api/v2/food/branded/barcode.php?api_key=YOUR_KEY&code=0762111036537"
-
3
Read the response
The JSON has an items array holding the product's ingredients, serving size, nutrients, allergens, and traces, plus more fields. The barcode lookup page shows a full response with every field described. To see records before you subscribe, download the sample file or browse the sample data page.
Endpoints
Barcode lookup, search by name, and advanced search return full product records and differ only in how you find the product. Ingredient search returns raw and generic ingredients instead, with their components, portions, and score.
Barcode lookup works on every plan. The three search endpoints need Standard or Premium; the chips on each row show which plans include it.
Authentication
Add api_key=YOUR_KEY to every request as a query parameter. One key belongs to one subscription and works on every endpoint that plan covers.
Because the key is part of the URL, it can end up in server logs and browser history, and it is also your sign-in to the Account Center. Keep it in server-side configuration, and leave it out of public code, screenshots, and support tickets.
On Premium, also send user_id with every request: one ID per end user, such as an internal database ID or a hash, never an email address or a name. Chomp counts the distinct IDs each month for the per-user fee. If your calls are server-side with no end users, send one fixed ID, such as system-batch; it counts as one user.
Limits and errors
- Rate limit: Limited allows 30 requests a minute and Standard 100. Premium has no rate limit, within fair use.
- Search pace (Standard): each search endpoint (name, advanced, ingredient) accepts one search every 10 seconds. Barcode lookups aren't affected. Premium has no search pace.
- Caching: not allowed on Limited. Responses may be cached for under 24 hours on Standard and Premium.
- Errors: every error returns an HTTP status and a JSON body with a single error string. A 401 is one message for several causes: an unrecognized key, a cancelled subscription, a plan that doesn't include the endpoint, the requests-per-minute limit or search pace, or a Premium request with no user_id. A 404 means nothing matched. Each endpoint page lists its errors with examples, and Try It works out the likely cause for your key.
Use it in your tools
The reference is published as an OpenAPI spec (YAML; download). Paste its URL into Swagger or Postman to import it. The Postman collection (JSON) is generated from it and covers all four endpoints. Import it, set the api_key variable to your key, and each request is ready to run.
Guides by task
Articles from the knowledge base, grouped by task.
Build with the API
Monthly active users, supported diets, browser requests, and a recipe-app walkthrough.
Browse the guidesErrors and limits
Rate limits, 401 and 404 errors, and barcode-match troubleshooting.
Browse the guidesEvaluate and operate
Sample file, data sources, update frequency, caching, licensing, and usage monitoring.
Browse the guides