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

# CalorieKing Food API

Jentic publishes the only available OpenAPI specification for CalorieKing Food API, keeping it validated and agent-ready. The CalorieKing Food API exposes a curated database of foods, brands, food categories, and dietary tags drawn from the long-running CalorieKing nutrition catalog. Agents can search foods by name, narrow results by brand or category, and retrieve a single food record with macronutrient and serving-size details. Filtering, paging, and partial-response query parameters keep payloads small for nutrition-tracking, meal-planning, and recipe-analysis workloads.

## For AI agents

Search a curated nutrition database for foods, brands, categories, and tags, and retrieve detailed nutrient records by ID.

## Scope

Does not handle recipe generation, meal-plan creation, or barcode scanning - use for structured food, brand, category, and tag lookups only.

## Capabilities

- Search the food catalog by keyword and filter results by brand, category, or tag
- Retrieve a single food record with serving sizes and nutrient values via `/foods/{foodId}`
- List and look up branded foods to attach packaged-product context to a meal log
- Browse the category tree to constrain searches to specific food groups
- Resolve dietary tags such as gluten-free or vegetarian to filter food queries
- Use partial-response parameters to fetch only the nutrient fields a meal-tracker needs

## Use cases

### Meal Logging and Calorie Tracking

Power a calorie-tracking app or agent that lets users log meals by searching the CalorieKing catalog. The /foods endpoint returns matching items with calorie and macronutrient data, and `/foods/{foodId}` retrieves a full nutrition record once the user picks an entry. Partial-response parameters keep mobile payloads small.

Example prompt: Search /foods for 'grilled chicken breast', present the top three matches to the user, then call `/foods/{foodId}` for the chosen item and return calories, protein, and fat per serving.

### Branded Product Lookup for Recipe Apps

Recipe and pantry apps often need to attach branded product data to ingredient entries. The /brands and `/brands/{brandId}` endpoints let an agent confirm a brand exists in the catalog, then narrow a /foods search by brand to retrieve matching SKUs with packaged nutrition information.

Example prompt: Look up the brand 'Kelloggs' via /brands, then call /foods filtered by that brand to list cereal products with calories per serving.

### Dietary Filtering for Meal Planners

Meal-planning agents need to surface foods that match dietary constraints. The /tags endpoint returns the catalog's dietary tags such as vegetarian or gluten-free, which can then be passed as a filter on /foods to retrieve only compliant items.

Example prompt: Fetch the tag list via /tags, find the 'gluten-free' tag ID, and call /foods filtered by that tag to return 20 gluten-free options with calorie counts.

### AI Agent Nutrition Workflows via Jentic

Through Jentic, an AI agent discovers CalorieKing operations by intent, loads the input schema for /foods, and executes a search without browsing docs or handling Basic Auth tokens directly. Jentic's vault holds the access token used as the Basic Auth username, so the agent only sees scoped tool results.

Example prompt: Use the Jentic SDK to search for 'find food nutrition', load the /foods operation schema, and execute it with a query for 'oatmeal' to return the top result's calorie value.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/foods` | Search and list foods with filters |
| GET | `/foods/{foodId}` | Retrieve a specific food's nutrition record |
| GET | `/brands` | List food brands |
| GET | `/categories` | List food categories |
| GET | `/tags` | List dietary tags |

## Key resources

- **Foods** — Search the food catalog and retrieve a single food's nutrition record
- **Brands** — List branded manufacturers and retrieve a single brand's metadata
- **Categories** — Browse the category tree and retrieve a single category
- **Tags** — List dietary tags and retrieve a single tag definition

## Why Jentic

- **Setup:** Wiring the CalorieKing Food API by hand means encoding your token into HTTP Basic auth and paging through its food, brand, category, and tag routes yourself. Through Jentic you install once, import CalorieKing from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** CalorieKing exposes read-only lookups, so scope the agent to the operations it needs, such as food and brand searches. You choose the operations it may call, so the agent is limited to the read routes you enable and nothing beyond them.
- **Credential handling:** Your CalorieKing token is stored once, encrypted, by your own Jentic One instance and placed into the Basic auth username at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find nutrition for a food' or 'look up a brand', and Jentic returns the matching CalorieKing operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Edamam Food and Nutrition API** — Edamam offers a larger food and recipe database with natural-language nutrition parsing, where CalorieKing focuses on a curated catalog with brand and category structure.
- **Nutritionix API** — Nutritionix combines a branded food database with natural-language calorie estimation, where CalorieKing exposes a structured catalog with explicit brand, category, and tag resources.
- **Spoonacular API** — Spoonacular provides recipes, meal plans, and ingredient analysis that pair well with CalorieKing's food and brand catalog for end-to-end meal-planning agents.

## FAQ

### Why is there no official OpenAPI spec for CalorieKing Food API?

CalorieKing does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call CalorieKing Food API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the CalorieKing Food API use?

The API uses HTTP Basic authentication. The access token issued by CalorieKing is used as the username and the password is left blank. When called through Jentic, the access token is stored in your Jentic One instance and injected into the Basic Auth header at execution time, so it never enters the agent's prompt context.

### Can I retrieve the full nutrition profile for a specific food?

Yes. Call GET `/foods/{foodId}` with the ID returned from a /foods search to retrieve the full record, which includes serving sizes and nutrient values. Use partial-response query parameters if you only need a subset of fields.

### How do I filter foods by dietary tag through Jentic?

First call GET /tags to retrieve the list of dietary tags and find the ID for the tag you need (for example, gluten-free). Then call GET /foods with the tag filter applied. Through Jentic, search 'find food by dietary tag', load the /foods schema, and execute with the tag ID parameter.

### What are the rate limits for the CalorieKing Food API?

The OpenAPI specification does not document rate limits. CalorieKing applies limits at the access-token level based on your developer plan, so check the agreement attached to your token. Jentic surfaces 429 responses unchanged so your agent can back off and retry.

### Does the API return branded product nutrition data?

Yes. Use GET /brands to discover available manufacturers, then filter GET /foods by brand to return that brand's products with calorie and macronutrient values per serving.

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

Yes. Because Jentic One is self-hosted, you decide which CalorieKing operations your agent may call, and your own rules govern the credentials it can use. Since this API is read-only, you can scope the agent to just the lookups it needs, such as the /foods search and `/foods/{foodId}` record retrieval, while leaving /brands, /categories, or /tags disabled. The agent is limited to the read routes you enable and can reach nothing beyond them.
