api-documentation
api-documentation copied to clipboard
Question about search & fields parameters
Hi, I'm trying to do 2 things which I'm not sure if it's already implemented :) :
-
If we need to find a product by name/term, is there a way to use
/api/v2
? The only way I found is using this one : https://fr.openfoodfacts.org/cgi/search.pl?search_terms=milk&json=1&fields=code,product_name -
Can we select subfields ? https://fr.openfoodfacts.org/api/v2/product/80135463&fields=nutriments (Will return only nutriments) https://fr.openfoodfacts.org/api/v2/product/80135463&fields=nutriments.carbohydrates (Could we implement this or does something already exist to achieve this ? It would only keep
carbohydrates
withinnutriments
object in the JSON)