food facts食物营养成分数据集en.openfoodfacts.org.products
可以参考这里的api
Api.md · 琴弦断丶冷笛残/World_Food_Facts_Web_Demo - Gitee.com
内容如图:
最新官方文件有1G
en.openfoodfacts.org.products.tsv(1.01 GB)
有个版本是2017年的,50M左右的,解开340M左右
相关:GitHub - openfoodfacts/openfoodfacts-ai: This is a tracking repo for all our AI projects. 🍕 🤖🍼
比如这个:World Food Facts | Kaggle
比如这个:https://www.kaggle.com/code/allunia/hidden-treasures-in-our-groceries
专门有个python repo for open food:https://github.com/openfoodfacts/openfoodfacts-python
pip install openfoodfacts
All the examples below assume that you have imported the SDK and instanciated the API object:
import openfoodfacts # User-Agent is mandatory api = openfoodfacts.API(user_agent="MyAwesomeApp/1.0")
Get information about a product
code = "3017620422003" api.product.get(code, fields=["code", "product_name"]) # {'code': '3017620422003', 'product_name': 'Nutella'}
Perform text search
api.product.text_search("mineral water") # {"count": 3006628, "page": 1, "page_count": 20, "page_size": 20, "products": [{...}], "skip": 0}
Create a new product or update an existing one
results = api.product.update({ "code": CODE, "product_name_en": "blueberry jam", "ingredients_text_en": "blueberries, sugar, pectin, citric acid" })
with CODE
the product barcode. The rest of the body should be a dictionary of fields to create/update.
To see all possible capabilities, check out the usage guide.
原文地址:https://blog.csdn.net/skywalk8163/article/details/142211227
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!