Данни
Conditions for reuse
The Open Food Facts database is available under the Open Database License (ODbL).
The individual contents of the database are available under the Database Contents License (DbCL).
Products images are available under the Creative Commons Attribution ShareAlike licence (CC-BY-SA).
Те могат да съдържат графични елементи, обект на авторско право или други права, които в някои случаи могат да бъдат възпроизведени (право на цитиране или честна употреба).
Моля, прочети Общи условия за използване и повторна употреба преди да използваш повторно данните.
Дъмп на MongoDB
This is a human-readable summary of the ODbL 1.0 license (see also the Open Data Commons summary):
You are free:
- To share: To copy, distribute and use the database.
- To create: To produce works (such as applications, websites, services, or analytical studies) from the database.
- To adapt: To modify, transform and build upon the database.
As long as you:
- Attribute: You must attribute any public use of the database, or works produced from the database, in the manner specified in the ODbL (e.g. "Contains data from Open Food Facts, available under the Open Database License"). For any redistribution of the database, or works produced from it, you must make clear to others the license of the database and keep intact any notices on the original database.
- Share-Alike: If you publicly use any adapted version of this database, or works produced from an adapted database, you must also offer that adapted database under the ODbL and share your modifications back.
- Keep open: If you redistribute the database, or an adapted version of it, you may use technological measures that restrict the work (such as DRM) only as long as you also redistribute a version without such measures.
Износ на данни в JSONL
We want everyone to succeed with their projects while keeping data open for everyone! To ensure your application or reuse complies with the license and our infrastructure policies, please follow this technical checklist (see also our license compliance tutorial):
- If you want to use the API conforms strictly to the instructions given in the API documentation
- Use bulk exports for offline, analytical, or caching needs: If you need access to all products or want to run complex queries, please download the nightly MongoDB dumps, CSV, or Parquet exports (described below) or build a local cache.
- Contribute back (Share-Alike in practice): In the spirit of the ODbL Share-Alike obligation, if your app allows users to add new products, update nutrition/ingredients, or submit photos, please send those contributions back to Open Food Facts via our API or SDKs. This ensures everyone benefits from continuous data improvements.
- Prominent UI attribution: Clearly attribute Open Food Facts in your app or website UI (for example, on product pages, search screens, and in the "About" or "Settings" sections) with clickable links back to Open Food Facts and the ODbL license.
Compliance resources:
- Simple summary of the ODbL and our license on the wiki
- Attribution guidelines (how to attribute on mobile, web, and print)
- ODbL non-compliance registry: Check that your project is fully compliant. If your app is listed or you have questions, please reach out to us at reuse@openfoodfacts.org or in the #api channel on Slack so we can help you achieve compliance!
- API FAQ & legal questions
Tell us about your reuse
Ние сме много заинтересовани да научим за какво се използват данните от Open Food Facts. It is not mandatory, but we would very much appreciate it if you tell us about your re-uses so that we can share them with the Open Food Facts community. You can also fill this form to get a chance to get your app featured.
✨ Discover the Reuses Showcase
Износ на данни от Open Food Facts
Копията и износите на базата данни се създават всяка вечер. Базата данни е много голяма, така че можете да намерите различни начина за използване на данните, в зависимост от варианта на изнасяне.
Информация за различните полета за копието нс MongoDB и CSV износите е достъпна на https://world.openfoodfacts.org/data/data-fields.txt
Износ на CSV данни
Данните за всички продукти са налични в база данни на MongoDB.
- Връзка
- https://static.openfoodfacts.org/data/openfoodfacts-mongodbdump.gz
- sha256sum
- https://static.openfoodfacts.org/data/gz-sha256sum
- md5sum
- https://static.openfoodfacts.org/data/gz-md5sum
Делта Износ
Предоставят се ежедневни делта износи за предходните 14 дни. The list of currently available delta files can be found at https://static.openfoodfacts.org/data/delta/index.txt.
Всеки ред представлява файл, който е достъпен на адрес https://static.openfoodfacts.org/data/delta/{filename}.
The filename contains UNIX timestamp of the first and the last change contained in the JSON file, so that the delta files can be imported (after extraction) with mongoimport in alphabetical order.
Моля, обърнете внимание, че поради естеството на mongoexport, делта файловете не могат да ви кажат за изтрити продукти. To remove deleted products from your database, you will need to import the full MongoDB dump.
Експорт на RDF данни
Цялата база данни също е достъпна в JSONL формат (понякога наричан LDJSON или NDJSON), където всеки ред е JSON обект. Той представлява същите данни като износа на MongoDB. Файлът се компресира с gzip.
A suitable way to exploit the database is to use DuckDB, an in-process analytical tool designed to process large amount of data in a fraction of seconds. You can read our blog post where we walk you through exploring and processing the Open Food Facts database with DuckDB
Експорт на RDF данни
A simplified version of the JSONL dump is also available in the Parquet format. During the conversion, we filtered columns that contains duplicated information, are used for internal debugging, or are simply irrelevant for users.
The Parquet format has proved to be handy:
- Data is organized by column, rather than by row, which saves storage space and speeds up analytics queries, i.e. you can select just the columns you care about, optimizing query performances, even on entry-level computers.
- Highly efficient data compression and decompression, making it good for storing and sharing big datasets of any kind,
- Supports complex data types and advanced nested data structures.
The dataset is available on Hugging Face, a collaborative Machine Learning ecosystem where developers and researchers can share models and datasets.
Find more information in the Wiki, including guidelines for data reuse and example queries to get started.
Експорт на RDF данни
Data for all products, or some of the products, can be downloaded in the CSV format (readable with LibreOffice, Excel and many other spreadsheet software) through the advanced search form.
- Връзка
- Food: https://static.openfoodfacts.org/data/en.openfoodfacts.org.products.csv.gz (compressed CSV in GZIP format: ~ 0.9 Gb, uncompressed: ~ 9 Gb)
- Cosmetics: https://static.openbeautyfacts.org/data/en.openbeautyfacts.org.products.csv.gz
- Pet Food: https://static.openpetfoodfacts.org/data/en.openpetfoodfacts.org.products.csv.gz
- All other products: https://static.openproductsfacts.org/data/en.openproductsfacts.org.products.csv.gz
Кодирането на файла е Unicode UTF-8. Знакът, който разделя полетата, е <tab> (таблица).
Експорт на RDF данни
The database is also available in the RDF format (this is an experiment, not actively maintained anymore). You can read the announcement in French.
Image Data Export
All images and OCR results can either be downloaded from our server or from AWS (through the AWS Open Data Program). Check out our documentation to learn more about how to download images
OpenAPI Documentation for the JSON API
Наличен е и JSON API за четене на данните за продукт. This API is in particular used in the Open Food Facts mobile app.
We improve the API over-time but we are careful to keep backwards compatibility. Please get in touch if you use it, so that we can tell you about potential changes.
Discover our APIBenefiting from our API? Support the infrastructure that powers your project
Open Food Facts is an independent, non-profit digital commons built for public benefit. We provide our database and API 100% free of charge and open to all, without commercial paywalls or advertising.
Serving millions of real-time queries daily incurs real costs in servers, database clusters, bandwidth, and maintenance. If your application, startup, research project, or company saves time and builds value with our API, please consider supporting Open Food Facts financially. Your contribution keeps our open infrastructure fast, resilient, and freely accessible to everyone worldwide.
Contributing to improving our API and OpenAPI documentation
We're eager to finish the documentation of the API, add use-cases, and automate SDK generation. If you are an OpenAPI connoisseur, you are very welcome to help.
You are very welcome to use the API for production cases, as long as 1 API call = 1 real scan by a user. Any attempt to scrape the database using the API will very likely be blocked, as full daily exports are available on this very page.
Also, sending an HTTP header with your API call is a good way we can get in touch, should any issue arise.
XML API (unsupported)
You can also get the result in XML by using .xml
Example: https://world.openfoodfacts.org/api/v2/product/737628064502.xml
This API is not actively maintained, and not officially documented.Обвивки и SDK
Вероятно имаме обвивка за любимия ви език за програмиране. Ако го направим, можеш да го използваш и подобриш. Ако не го направим, можеш да помогнеш за създаването му.
Можеш да използваш повторно кода (той е с отворен код) и да ни помогнеш да го подобрим за всички, на цялата планета.
Android/iPhone/Flutter mobile app
- You can search for information about products, including many useful computed values.
- If you can't get the information on a specific product, you can get your user to send photos and data, that will then be processed by Open Food Facts AI and contributors to get the computed result you want to show them.
- You can also implement the complete flow so that they get immediately the result with some effort on their side.
Android/iPhone/Flutter mobile app
- Submit photos (front/nutrition/ingredients): most painless thing for your users
- The Open Food Facts AI - Robotoff - will generate some derived data from the photos
- Over time, other apps, and the Open Food Facts community will fill the data gaps
Android/iPhone/Flutter mobile app
- Submit nutrition facts + category > get Nutri-Score
- Submit ingredients > get the NOVA group (about food ultra-processing), additives, allergens, normalized ingredients, vegan, vegetarian…
- Submit category + labels > soon get the Eco-Score (about environmental impact)
Android/iPhone/Flutter mobile app
The code for the official Open Food Facts mobile apps is available on GitHub Flutter Kotlin Android Swift iOS
We look to turn the deprecated Kotlin and Swift codebases into Kotlin and Swift SDKs, help welcome :-)
Приложението позволява на потребителите да сканират баркод на продукт, да прегледат информация за продукта и да снимат и добавят снимки и данни за липсващи продукти.
Можеш да използваш повторно кода (той е с отворен код) и да ни помогнеш да го подобрим за всички, на цялата планета.
SDKs
| Icon | Language / Framework | Ресурси | Дискусия |
|---|---|---|---|
| Cordova (Old App) | GitHub | Няма данни | |
| DART | GitHub pub.dev | Няма данни | |
| Elixir | GitHub | Slack Channel | |
| Go | GitHub | Slack Channel | |
| Java | GitHub | Slack Channel | |
| Spring Boot | GitHub | Slack Channel | |
| Kotlin | GitHub | Slack Channel | |
| JavaScript | GitHub | Slack Channel | |
| PHP | GitHub | Slack Channel | |
| PHP (Laravel) | GitHub | Slack Channel | |
| Python | GitHub | Slack Channel | |
| React Native | GitHub | Slack Channel | |
| Ruby | GitHub | Slack Channel | |
| Ръжда | GitHub | Slack Channel | |
| R | GitHub | Slack Channel | |
| Swift | GitHub | Slack Channel | |
| .NET/C# | GitHub | Slack Channel |
Обсъждане на данни, API и износ
You can look at common FAQ questions about the API and Data Exports and common Open Food Facts questions
You can join the Open Food Facts Slack chatroom which is the preferred way to ask questions and discuss the API. Please ask your questions in the #api channel
You can open a thread on our API documentation repository
For any question regarding the data, you can contact us at reuse@openfoodfacts.org