Food API

API reference

Search Indian foods and get nutrition, ingredients and health-condition guidance for each one. The API is REST over HTTPS: every endpoint is a GET that returns JSON.

Base URL
https://api.bonhappetee.com
Auth header
x-api-key: YOUR_API_KEY
Format
JSON, UTF-8

Authentication

Send your key in the x-api-key header on every request. Keep it on your server; don't ship it in web or mobile app code. Paste it below to use the live console on each endpoint page.

x-api-key

Stored only in this browser, and only used for requests you send from this page. No key yet? Request access

Quickstart

cURL
# 1. Find a food and note its food_item_id
curl "https://api.bonhappetee.com/search?value=dosa" \
  -H "x-api-key: YOUR_API_KEY"

# 2. Get its full nutrition profile
curl "https://api.bonhappetee.com/food?food_item_id=FOOD_ITEM_ID" \
  -H "x-api-key: YOUR_API_KEY"

Postman and OpenAPI

Import the whole API into Postman, Insomnia, Swagger UI or a client generator. In Postman, choose Import → Link and paste the spec URL, or import a downloaded file. Set the apiKey variable after importing the collection.

Spec URL/docs/openapi.json

Endpoints

Status codes

200Success. The body is JSON.
403The API key is missing or invalid.
429You've hit your plan's rate limit or monthly quota.
5xxSomething went wrong on our side. Retry with backoff.