Jump to content

Open Food Facts Search API Version 2: Difference between revisions

no edit summary
(Created page with "= Open Food Facts Search API Version 2 = == Introduction == The existing Open Food Facts search API is outdated and hacky (it was built on top of the OFF web site search for...")
 
No edit summary
Line 19: Line 19:


=== Simplified parameters specification ===
=== Simplified parameters specification ===
Tags fields are now specified directly:
* labels_tags=en:organic
* labels_tags_fr=bio -> bio is assumed to be in French and thus converted to en:organic
For AND queries, use comma separated values:
* labels_tags=en:organic,en:fair-trade
For negative queries, prefix tag with -
* labels_tags=-en:organic,-en:fair-trade


=== OR tags fields queries ===
=== OR tags fields queries ===
For OR queries, use | to separate values
* labels_tags=en:organic|en:fair-trade|en:some-other-label


== Development and deployment ==
== Development and deployment ==