openfoodfacts
Official Python SDK of Open Food Facts
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is the official SDK for a widely used open food database. Install it if you need to integrate product lookup or food data into your application. Be aware that you must comply with OdBL licensing and register your application with the Open Food Facts project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10; user_agent parameter is mandatory for API calls.
- Low friction install with three lightweight dependencies (requests, pydantic, tqdm).
- Actively maintained with recent releases; last commit 2026-08-01.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with attribution. Note that Open Food Facts data itself is under OdBL; SDK users must comply with both licenses and register applications as documented in the REUSE guide.
last release 2026-07-07 (38 days) · last repo commit 2026-08-01 · 461 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 80,024 downloads/mo, #14,324 on PyPI
Alternatives
Verify before relying
pip install openfoodfacts
import openfoodfacts
api = openfoodfacts.API(user_agent="MyApp/1.0")
product = api.product.get("3017620422003", fields=["code", "product_name"])- Whether the API requires authentication beyond user_agent for write operations (create/update).
- Rate limiting or quota constraints on API calls not documented in the excerpt.
- Data freshness and update frequency of the Open Food Facts database.
What it is and what it does
openfoodfacts is the official Python SDK for querying and contributing to Open Food Facts, a crowdsourced food product database. It wraps the Open Food Facts REST API, letting you fetch product details by barcode, search by text, and submit new products or updates. The SDK handles common tasks like taxonomy field translation and data dump iteration, reducing boilerplate for typical workflows.
The package depends on requests for HTTP calls, pydantic for data validation, and tqdm for progress bars during bulk operations. It is actively maintained and marked Production/Stable, though the documentation notes the API is subject to change—pinning the version is recommended. Users must comply with both the MIT license of the SDK and the OdBL license of the underlying Open Food Facts data.
Use it for
- Look up nutritional and ingredient information for a product by scanning its barcode in a mobile or web app.
- Build a food search feature that queries Open Food Facts for products matching user queries.
- Contribute new product data or corrections to Open Food Facts from your application.
- Download and process the Open Food Facts data dump for research or offline analysis.
- Extract and translate taxonomized fields (e.g., allergens, categories) in multiple languages.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and is the official SDK for a widely used open food database. Install it if you need to integrate product lookup or food data into your application. Be aware that you must comply with OdBL licensing and register your application with the Open Food Facts project.
Install
openfoodfacts on PyPI
Before you install
Low friction install with three lightweight dependencies (requests, pydantic, tqdm). Actively maintained with recent releases; last commit 2026-08-01. Marked Production/Stable and supports current Python versions.
Requires Python >=3.10; user_agent parameter is mandatory for API calls.
License in practice
MIT license permits commercial and private use with attribution. Note that Open Food Facts data itself is under OdBL; SDK users must comply with both licenses and register applications as documented in the REUSE guide.
Quickstart
pip install openfoodfacts
import openfoodfacts
api = openfoodfacts.API(user_agent="MyApp/1.0")
product = api.product.get("3017620422003", fields=["code", "product_name"])
Verify before relying
- Whether the API requires authentication beyond user_agent for write operations (create/update).
- Rate limiting or quota constraints on API calls not documented in the excerpt.
- Data freshness and update frequency of the Open Food Facts database.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesrequestspydantictqdm |
| Maintenance | Actively maintained 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,024 / month, #14,324 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: openfoodfacts-5.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “open food facts api client”
- openfoodfactsQuery and manage product data from the Open Food Facts database via…
- napalmNAPALM provides a unified Python API to interact with network devices…
- aws-cdk.region-infoProvides a queryable database of AWS region-specific information such…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also keepa · openbb-imf · africastalking · linkup-sdk · google-shopping-merchant-products · googleads · distro · garminconnect · AEMET-OpenData · barcodenumber