Changes

Jump to navigation Jump to search
78 bytes added ,  12:45, 2 February 2016
Line 31: Line 31:     
=== Searching for products ===
 
=== Searching for products ===
==== Advanced Search ====
+
==== General principles ====
===== Parameters =====
+
===== Advanced Search =====
 +
====== Parameters ======
 
You can basically use all the parameters you'd use in a [http://world.openfoodfacts.org/cgi/search.pl?action=display&sort_by=unique_scans_n&page_size=20&action=display graphical advanced search on the site]<br>
 
You can basically use all the parameters you'd use in a [http://world.openfoodfacts.org/cgi/search.pl?action=display&sort_by=unique_scans_n&page_size=20&action=display graphical advanced search on the site]<br>
 
* sort_by=unique_scans_n
 
* sort_by=unique_scans_n
Line 38: Line 39:  
* page=2
 
* page=2
 
* jqm=1 to search results pages on the web site to get results in a jquerymobile format.
 
* 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>
+
===== Examples<sup>(remember to do tests on .net)</sup> =====
 
<pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=coke&search_simple=1&jqm=1</pre>
 
<pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=coke&search_simple=1&jqm=1</pre>
 
<pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&json=1</pre>
 
<pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&json=1</pre>
 
<pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&xml=1</pre>
 
<pre>http://world.openfoodfacts.org/cgi/search.pl?search_terms=banania&search_simple=1&action=process&xml=1</pre>
   −
==== Combining Tags to get custom results ====
+
===== Generic Search =====
 +
====== Combining Tags to get custom results ======
 
Combining tags works, letting you create thousands of APIs
 
Combining tags works, letting you create thousands of APIs
 
* http://world.openfoodfacts.org/packager-code/emb-35069c/brand/sojasun.json
 
* http://world.openfoodfacts.org/packager-code/emb-35069c/brand/sojasun.json
 +
 +
 
====Labels====
 
====Labels====
 
=====List of labels=====
 
=====List of labels=====

Navigation menu