Changes

Jump to navigation Jump to search
164 bytes added ,  16:24, 8 January 2016
Line 28: Line 28:  
=== Searching for products ===
 
=== Searching for products ===
   −
You can add &jqm=1 to search results pages on the web site to get results in a jquerymobile format.
+
==== Parameters ====
 
  −
Also:
   
* sort_by=unique_scans_n
 
* sort_by=unique_scans_n
 
* page_size=50 (20 by default, 1000 at most)
 
* page_size=50 (20 by default, 1000 at most)
 
* page=2
 
* page=2
 +
* jqm=1 to search results pages on the web site to get results in a jquerymobile format.
 
Example: <sup>(remember to do tests on .net)</sup>
 
Example: <sup>(remember to do tests on .net)</sup>
 
<pre>
 
<pre>
 
http://world.openfoodfacts.org/cgi/search.pl?search_terms=coke&search_simple=1&jqm=1
 
http://world.openfoodfacts.org/cgi/search.pl?search_terms=coke&search_simple=1&jqm=1
 
</pre>
 
</pre>
 +
==== Combining Tags ====
 +
Combining tags works, letting you create thousands of APIs
 +
* http://world.openfoodfacts.org/packager-code/emb-35069c/brand/sojasun.json
 
====Search results====
 
====Search results====
 
* http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&json=1
 
* http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&json=1

Navigation menu