openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
656 stars 386 forks source link

API brings back different results to web search #4884

Open mikejsdev opened 3 years ago

mikejsdev commented 3 years ago

What

Hello,

Firstly, this really is a great service and the API is working fantastically well, so thank you. Hopefully I am posting this in the right place.

When searching using the API, for example for "orange juice" the results come back ordered by unique_scans_n which is great

https://world.openfoodfacts.org/cgi/search.pl?search_terms=Orange%20juice&search_simple=1&action=process&json=1&page_size=100

However, searching for "Orange juice" in the Open Food facts website search box brings back different (possibly better?) search results. This is despite the fact that the URL looks identical to mine, for example:

https://world.openfoodfacts.org/cgi/search.pl?search_terms=orange+juice&search_simple=1&action=process

Is there any way to get the same results back from the API? &sort_by=unique_scans_n doesn't make a difference as it appears they are already sorted by this value by default.

Thanks in advance

Part of

github-actions[bot] commented 9 months ago

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts