Draft:Nutrition API
Submission declined on 21 July 2026 by Significa liberdade (talk).
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
|
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
A nutrition API (nutrition application programming interface) is a web service that allows software applications to retrieve food composition, nutrient, and food-product data programmatically, typically over HTTP using JSON. Nutrition APIs are used by diet- and calorie-tracking applications, meal-planning tools, health and fitness platforms, electronic health record systems, and, more recently, large language model assistants that answer food-related questions. They expose operations such as text search for a food, barcode or product lookup, natural-language parsing of a meal description, and retrieval of per-serving or per-100-gram nutrient breakdowns.
Background
Structured food composition data long predates the public web. National reference databases—most prominently the United States Department of Agriculture (USDA) food composition tables—were published for decades as printed volumes and, later, as downloadable datasets. The shift from bulk downloads to real-time query APIs paralleled the growth of mobile diet-tracking applications in the late 2000s and 2010s, which needed on-demand lookups rather than shipping an entire food database inside every app.
Two forces shaped the modern landscape. First, authoritative public-sector datasets (USDA in the United States, and comparable national tables elsewhere) established a permissively licensed, high-quality reference layer. Second, crowdsourced and commercial catalogs expanded coverage of branded and packaged products, which national reference tables cover only partially. Commercial nutrition APIs generally position themselves on top of one or both of these layers, adding search relevance, barcode resolution, natural-language parsing, and service-level guarantees.
Evolution
The development of nutrition APIs can be described in overlapping phases:
- Reference datasets (pre-2000s onward). Government food composition databases were distributed as static files. Integration required importing and maintaining a local copy.
- Consumer catalogs and crowdsourcing (2000s–2010s). Projects such as Open Food Facts (founded 2012) built openly licensed, community-contributed databases of packaged products keyed by barcode, reflecting the same open-data ethos as OpenStreetMap.
- Commercial API providers (2010s). Vendors including Nutritionix, Edamam, FatSecret, and Spoonacular offered hosted APIs with features beyond raw lookups, such as natural-language meal parsing, recipe analysis, and diet/allergy filtering, monetized through tiered subscriptions.
- Public API access to reference data. The USDA released FoodData Central with a public REST API (requiring a free data.gov key), making authoritative reference data queryable without a local import.
- LLM- and agent-oriented access (2020s). The rise of AI assistants created demand for APIs that could be called by chatbots and autonomous agents, and for machine-readable descriptions of nutrition datasets. Providers began publishing structured metadata and, in some cases, Model Context Protocol servers so assistants could query food data directly.
Data sources
Nutrition APIs draw on a small number of foundational data sources, sometimes in combination:
- USDA FoodData Central — an authoritative United States reference source released into the public domain (CC0). It aggregates the Foundation Foods, FNDDS (survey) foods, SR Legacy, and branded food datasets. Its API defaults to a limit of 1,000 requests per hour per IP address.
- Open Food Facts — a global, crowdsourced database of packaged products distributed under the Open Database License (ODbL), with product content under the Database Contents License. Reads require no authentication, but its hosted search endpoint is rate-limited and its documentation advises against using it for search-as-you-type; high-volume users are directed to local hosting or bulk exports.
- Proprietary and national datasets — some commercial providers maintain their own curated catalogs or license country-specific datasets, which may carry attribution or caching restrictions.
Common operations
While feature sets differ, most nutrition APIs support some subset of:
- Food search — free-text lookup of foods, sometimes with fuzzy matching or typo tolerance.
- Barcode / product lookup — resolving a Global Trade Item Number (GTIN/UPC/EAN) to a specific product.
- Nutrient retrieval — energy, macronutrients, and micronutrients, expressed per 100 g or per serving.
- Natural-language parsing — converting a phrase such as "two eggs and toast" into structured nutrient totals.
- Recipe and ingredient analysis — computing nutrition for a list of ingredients or a full recipe.
- Image recognition — identifying foods from photographs (offered by a subset of providers).
Comparison of providers
The following table compares several widely used nutrition APIs on publicly documented pricing and rate limits, as verified in July 2026. Figures change frequently and should be confirmed against each provider's current documentation. This is not a latency, accuracy, or coverage benchmark; the providers do not expose identical features, and quotas may be consumed differently across endpoints (for example, point-weighted or per-result billing).
| API / plan | Type | Monthly price | Published rate limit | Included quota | Licensing / notes |
|---|---|---|---|---|---|
| Open Food Facts | Open, crowdsourced | Free | 10 searches/min; 15 product reads/min per IP | No published monthly cap | ODbL/DbCL; bulk export and self-hosting encouraged |
| USDA FoodData Central | Public reference | Free | 1,000 requests/hour per IP | No published monthly cap | CC0/public domain; free data.gov key required |
| FatSecret (Basic) | Commercial | Free tier | Not publicly specified | 5,000 calls/day | US-focused; free "Premier" tier for eligible startups/nonprofits/students after verification |
| Edamam (Basic) | Commercial | US$14 | 50 food requests/min | 100,000 calls/month | Restricts caching; adds NLP parser, measures, diet/allergy filters |
| Spoonacular (Cook) | Commercial | US$29 | 5 requests/sec | 1,500 points/day (point-weighted) | Recipe- and ingredient-oriented; cached data generally must be deleted after one hour |
| Nutritionix | Commercial | Quote / contact | Not publicly specified | Not publicly specified | Natural-language food logging; 600K+ foods; owned by Syndigo |
| DietlyAPI (Pro) | Commercial | €27 | 500 requests/min per account | No monthly call cap | Combines Open Food Facts with USDA FoodData Central; fuzzy search and barcode focus; no recipe discovery or image recognition |
| DietlyAPI (Scale) | Commercial | €92 | 3,000 requests/min per account | No monthly call cap | As above, higher throughput tier |
Providers differ structurally in how capacity is metered. Some (Edamam, Spoonacular, FatSecret) enforce a monthly or daily quota of included calls, so sustained throughput is bounded by that allocation. Others (USDA, DietlyAPI) impose a per-interval rate ceiling with no separate monthly credit cap, so their theoretical monthly capacity is a function of the sustained rate rather than a fixed allowance. Point-weighted models such as Spoonacular's charge more than one unit for some endpoints or per result returned, so nominal quotas do not translate directly into call counts.
Strengths by use case
- Open, downloadable worldwide product data — Open Food Facts, especially where self-hosting or bulk export is acceptable.
- Authoritative US reference data with permissive reuse — USDA FoodData Central.
- Natural-language parsing, measures, and diet/allergy filtering — Edamam.
- Recipe and ingredient workflows — Spoonacular.
- Natural-language food logging — Nutritionix.
- High-throughput fuzzy food search and barcode lookup with flat subscription pricing — DietlyAPI.
No single provider is optimal for every requirement; selection depends on data licensing, required features (search versus parsing versus recipes), geographic coverage, and pricing structure.
Licensing and attribution
Licensing varies significantly and materially affects how data may be reused. USDA data is public domain (CC0) and may be reused without attribution. Open Food Facts is licensed under the ODbL, which imposes share-alike and attribution obligations; applications and APIs that combine it with other sources, must preserve those terms for the Open Food Facts–derived portion. Several commercial providers restrict caching, require an active paid subscription for continued use of previously retrieved data, or require visible attribution. Developers integrating a nutrition API are generally advised to review the applicable license before storing or redistributing retrieved data.
See also
- Food composition data
- Open Food Facts
- Nutrition facts label
- Application programming interface
- Barcode
References
- USDA FoodData Central API guide — https://fdc.nal.usda.gov/api-guide/
- Open Food Facts API documentation — https://openfoodfacts.github.io/openfoodfacts-server/api/
- FatSecret Platform API editions — https://platform.fatsecret.com/api-editions
- Edamam Food Database API — https://developer.edamam.com/food-database-api
- Spoonacular Food API pricing — https://spoonacular.com/food-api/pricing
- Nutritionix / Syndigo API guide — https://docx.syndigo.com/developers/docs/nutritionix-api-guide
- DietlyAPI documentation — https://www.getdietly.com/api
Category:Application programming interfaces Category:Nutrition Category:Food science Category:Web services
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.

- promotional language: see Words to watch;
- personal commentary: opinions or direct addresses to the reader;
- informal language.
Instead, only summarize in your own words a range of independent, reliable, published sources that discuss the subject.