Food Nutrition API
FreemiumNutrition facts, ingredients, Nutri-Score and allergens for millions of packaged foods — by barcode or name.
Documentation
Nutrition facts, ingredients, Nutri-Score and allergens for millions of packaged foods.
What you get
- Millions of products worldwide, including India
- Nutrition per 100 g: energy, fat, saturated fat, carbohydrates, sugar, fibre, protein, salt
- Nutri-Score, NOVA processing group and ingredients
- Allergen check and side-by-side comparison of products
Great for diet and fitness apps, grocery apps, allergy checkers and recipe tools.
Quick start
Subscribe to a plan (the Basic plan is free), then call the API at https://food-nutrition.p.apihiver.com with your key in the X-API-Key header:
curl "https://food-nutrition.p.apihiver.com/v1/product/3017620422003" \
-H "X-API-Key: YOUR_API_KEY"Endpoints
| Method | Path | What it does |
|---|---|---|
GET | /v1/product/{barcode} | Product details by barcode: nutrition, scores, ingredients, allergens |
GET | /v1/search | Search products by name or brand |
GET | /v1/allergens/{barcode} | Does a product contain common allergens? |
GET | /v1/compare | Compare nutrition of 2–5 products side by side |
Open the Endpoints tab to see every parameter, example request and example response, and to try the API live.
Errors
Every error is JSON with the same shape:
{"error": {"code": "INVALID_INPUT", "message": "A barcode is 8–14 digits (EAN-8, EAN-13, UPC-A…)."}}| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_INPUT | A parameter is missing or has the wrong format — the message says which |
| 401 | UNAUTHORIZED | Missing or invalid X-API-Key |
| 404 | NOT_FOUND | Nothing matched the code, id or name you sent |
| 429 | — | Plan quota or rate limit reached (see the X-RateLimit-* headers) |
| 502 / 503 / 504 | — | A data source or the API server is temporarily unavailable — retry after a few seconds |
Data & privacy
Data comes from Open Food Facts (ODbL).
Food Nutrition API FAQ
- Is the Food Nutrition API free?
- Yes. The Basic plan is free and includes 500 requests per month — no card needed. Paid plans start at ₹299 per month for 10,000 requests.
- How much does the Food Nutrition API cost?
- Basic: free for 500 requests; Pro: ₹299/month for 10,000 requests; Ultra: ₹999/month for 50,000 requests; Mega: ₹2,499/month for 2,00,000 requests. Billing is monthly and you can cancel any time.
- How do I use the Food Nutrition API?
- Subscribe to a plan on APIHiver, create an API key in the Console, then send requests to https://food-nutrition.p.apihiver.com with your key in the X-API-Key header. You can also try every endpoint in the browser playground first.
- What endpoints does the Food Nutrition API have?
- It has 4 endpoints: Product details by barcode: nutrition, scores, ingredients, allergens (GET /v1/product/{barcode}); Search products by name or brand (GET /v1/search); Does a product contain common allergens? (GET /v1/allergens/{barcode}); Compare nutrition of 2–5 products side by side (GET /v1/compare).
- What are the Food Nutrition API rate limits?
- Basic: 2 requests per second; Pro: 5 requests per second; Ultra: 10 requests per second; Mega: 20 requests per second. Monthly quotas depend on the plan; every response includes X-RateLimit headers showing what's left.
- Can I use one API key for the Food Nutrition API and other APIs?
- Yes. One APIHiver key works for every API you subscribe to, so you don't need a separate account or key per provider.
Related APIs
Drug Information API
HealthcareBy APIHiver · Updated 1w ago
Medicine information from the US FDA: uses, dosage, warnings, side effects, reported adverse events and recalls.
Health & Fitness Calculators API
HealthcareBy APIHiver · Updated 1w ago
BMI, daily calories (BMR/TDEE), ideal weight, body-fat percentage and water intake — using standard medical formulas.
Weather API
WeatherBy APIHiver · Updated 1w ago
Current weather, 9-day forecasts, hourly forecasts, and sunrise/sunset/moon phase for any city or coordinates worldwide.
Earthquake API
WeatherBy APIHiver · Updated 1w ago
Real-time earthquakes worldwide from the USGS: recent quakes, quakes near a location, historical search and event details.
Math Solver API
EducationBy APIHiver · Updated 1w ago
Evaluate expressions, solve equations, and compute derivatives, integrals and simplifications — with exact and decimal answers.
Endpoints
4 endpoints — full list is in the sidebar on larger screens.