canonical: https://jentic.com/apis/chompthis.com/chompthis

# Chompthis Chomp Food Database API

Chomp is a food and nutrition database that exposes branded grocery products and generic ingredients through a barcode, name, and search-based API. The service returns nutritional facts, ingredient lists, allergens, package size data, and brand metadata for millions of consumer packaged goods. It is used by health and wellness apps, recipe builders, grocery apps, and dietary tracking tools that need structured food data without crawling supermarket sites. The API is read-only and queried with simple GET requests authenticated by an API key passed in the query string.

## For AI agents

Look up branded food products by barcode, name, or search terms - returns nutrition facts, ingredients, allergens, and package data.

## Scope

Does not handle recipe parsing, meal planning, or restaurant menu data - use for branded food and ingredient lookups only.

## Capabilities

- Resolve a UPC or EAN barcode to a branded food item with full nutrition facts via `/food/branded/barcode.php`
- Look up a branded grocery product by its name through `/food/branded/name.php`
- Search the branded food catalogue with brand, category, and ingredient filters via `/food/branded/search.php`
- Retrieve raw and generic ingredient data including macronutrient breakdowns from `/food/ingredient/search.php`
- Return allergen warnings and ingredient lists alongside nutrition payloads for diet-aware applications

## Use cases

### Barcode-Driven Grocery App

A grocery shopping or pantry-tracking app scans a UPC barcode and needs immediate nutrition and allergen information for the product. The `/food/branded/barcode.php` endpoint accepts the barcode digits and returns the matching product record with calories, macros, ingredient list, and brand metadata. This eliminates the need to maintain an in-house product database that quickly goes stale.

Example prompt: Look up the product with barcode 049000028911 via `/food/branded/barcode.php` and return calories, total fat, and allergen list

### Recipe Nutrition Calculator

A recipe app needs to compute total nutrition for a dish from its ingredient list. The `/food/ingredient/search.php` endpoint returns per-100g macronutrient data for raw ingredients like chicken breast, olive oil, or onions, which the app multiplies by quantity to produce a recipe-level nutrition panel. This is more accurate than relying on user-entered values.

Example prompt: Search `/food/ingredient/search.php` for 'chicken breast' and return protein, fat, and carbohydrate values per 100g

### Allergen and Diet Filtering

A diet-aware shopping assistant filters products to only those compatible with a user's restrictions - gluten-free, dairy-free, peanut-free. The `/food/branded/search.php` endpoint allows ingredient and category filtering, and the response payload includes allergen flags so the application can exclude unsafe products before showing them to the user.

Example prompt: Search `/food/branded/search.php` for cereals, exclude items containing gluten, and return the top 20 results

### Agent-Driven Pantry Inventory

An AI agent helping a user log their pantry calls Chomp through Jentic to resolve scanned barcodes into structured product records. The agent searches Jentic for 'look up a food product by barcode', loads the operation, and executes against each scan. Jentic isolates the API key and returns scoped operations the agent can call without managing credentials directly.

Example prompt: Search Jentic for 'look up a food product by barcode', load the barcode operation, and resolve five scanned UPCs to product records

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/food/branded/barcode.php` | Get a branded food item by barcode |
| GET | `/food/branded/name.php` | Get a branded food item by name |
| GET | `/food/branded/search.php` | Search branded foods with filters |
| GET | `/food/ingredient/search.php` | Search generic ingredient nutrition data |

## Key resources

- **Branded Foods** — Endpoints for looking up packaged grocery products by barcode, name, or search filters
- **Ingredients** — Endpoint for retrieving raw and generic ingredient nutrition data

## Why Jentic

- **Setup:** Wiring the Chomp Food Database by hand means passing its api_key as a query parameter and picking the right branded lookup among barcode, name, and search endpoints. Through Jentic you install once, import the Chomp Food Database API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Chomp takes its lookup terms as query parameters rather than resource ids in the URL path, so scope the agent to the operations it needs, such as barcode lookup and ingredient search. Every Chomp operation here reads data, so the agent only queries the food database.
- **Credential handling:** Your Chomp api_key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'look up a food product by barcode' or 'search branded foods', and Jentic returns the matching Chomp operation with its query parameter schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Edamam** — Food and nutrition database covering recipes, ingredients, and branded products
- **Spoonacular** — Recipe and food product database with meal planning endpoints
- **Nutritionix** — Natural-language nutrition lookup for restaurant and common foods

## FAQ

### What authentication does the Chomp Food Database API use?

Chomp uses an API key passed as the api_key query parameter on every request. Through Jentic, the key is stored encrypted in the vault and the agent receives a scoped reference rather than the raw key value.

### Can I look up a product by UPC barcode with the Chomp Food Database API?

Yes. The `/food/branded/barcode.php` endpoint accepts a UPC or EAN barcode and returns the matching branded product with nutrition facts, ingredient list, allergen flags, and brand metadata in a single response.

### Does Chomp return allergen information?

Yes. Branded food responses include allergen fields parsed from product packaging, covering common allergens such as milk, eggs, peanuts, tree nuts, soy, wheat, fish, and shellfish where the source data lists them.

### What are the rate limits for the Chomp Food Database API?

Rate limits are tied to your subscription tier on chompthis.com/api rather than declared in the OpenAPI spec. Plan to throttle requests and back off on HTTP 429 responses; check your account dashboard for the current monthly quota.

### How do I look up a food product by barcode through Jentic?

Run pip install jentic, search for 'look up a food product by barcode', load the `/food/branded/barcode.php` operation, and execute with the barcode value. Jentic appends the API key from the vault and returns the parsed product record.

### Can I search for ingredients rather than branded products?

Yes. The `/food/ingredient/search.php` endpoint covers raw and generic ingredients such as chicken breast or olive oil and returns macronutrient data per 100g, which is what you need for recipe-level nutrition calculation.

### Can I limit what my agent is allowed to do with the Chomp Food Database API?

Yes. Because you run Jentic One yourself, your own rules decide which Chomp operations and credentials the agent may use, so you can grant only the endpoints it needs, such as barcode lookup at `/food/branded/barcode.php` and ingredient search at `/food/ingredient/search.php`, while withholding name lookup and branded search. Chomp takes its lookup terms as query parameters rather than resource ids in the path, so the scope you set governs which operations run rather than which records are touched. Every Chomp operation here is read-only, so a scoped agent only queries the food database and never writes to it.
