Changes

Jump to navigation Jump to search
182 bytes added ,  14:37, 5 September 2023
no edit summary
Line 2: Line 2:  
<Back to [[API/Read]](Required reading)
 
<Back to [[API/Read]](Required reading)
    +
=== Important ===
 
'''Please send a User-Agent HTTP Header with the name of the app/service querying, the version, system and a url if you have one''', so that you are not blocked by mistake*
 
'''Please send a User-Agent HTTP Header with the name of the app/service querying, the version, system and a url if you have one''', so that you are not blocked by mistake*
 
* e.g. User-Agent: CoolFoodApp - Android - Version 1.0 - https://coolfoodapp.com
 
* e.g. User-Agent: CoolFoodApp - Android - Version 1.0 - https://coolfoodapp.com
Line 7: Line 8:  
=== Searching for products ===
 
=== Searching for products ===
 
===== Generic Search =====
 
===== Generic Search =====
 +
Note that the search API caches results, and to get recent edits in your search results you must add `nocache=1` to the query parameters.
 +
 
====== Core principle: Combine tags to get custom results ======
 
====== Core principle: Combine tags to get custom results ======
 
'''Combining tags is really powerful, letting you create thousands of custom APIs for your use case.'''
 
'''Combining tags is really powerful, letting you create thousands of custom APIs for your use case.'''
Line 227: Line 230:  
=== Linked Data ===
 
=== Linked Data ===
 
==== Link to Wikipedia and Wikidata ====
 
==== Link to Wikipedia and Wikidata ====
Whenever possible, Open Food Facts entities are linked to Wikidata, and in turn to Wikipedia. What this means is that you get access to a trove of additional encyclopedic knowledge about food. You can for instance get: Wikipedia articles about Camembert, the translation of salt in many languages, the molecular structure of a cosmetic ingredient…<br>
+
* Whenever possible, Open Food Facts entities are linked to Wikidata, and in turn to Wikipedia. What this means is that you get access to a trove of additional encyclopedic knowledge about food. You can for instance get: Wikipedia articles about Camembert, the translation of salt in many languages, the molecular structure of a cosmetic ingredient…<br>
We provide the Wikidata QID, which is an unambiguous, stable and reliable identifier for a concept that will be useful to actually retrieve info from Wikipedia and Wikidata.
+
* We provide the Wikidata QID, which is an unambiguous, stable and reliable identifier for a concept that will be useful to actually retrieve info from Wikipedia and Wikidata.
 
===== Example =====
 
===== Example =====
   Line 247: Line 250:  
* Provide more context and more information about a specific Product, a Category of products, a Quality label, a Geography, a Brand, a Packaging material, an ingredient…
 
* Provide more context and more information about a specific Product, a Category of products, a Quality label, a Geography, a Brand, a Packaging material, an ingredient…
 
* Perform checks or computations by mixing Wikidata information and Open Food Facts information (and possibly other APIs)
 
* Perform checks or computations by mixing Wikidata information and Open Food Facts information (and possibly other APIs)
 +
 +
[[Category:Search]]

Navigation menu