Hi there,
When searching at https://world.openfoodfacts.org/cgi/search.pl i can enter multiple “search Criteria”, however, they are then always interpreted as an “AND” search: all criteria must match.
Is it also possible to do an “OR” search ?
For example: brand=mybrand OR store=mystore
Please advise,
thank you.
1 Like
alex
April 9, 2024, 8:02am
2
Hi @MuadDib !
The search API v2 does not allow for OR queries between terms, this is possible only intra terms (eg. brands=nestle|unilever|danone)
You can have a look at search-a-licious (still in beta) to do OR queries: search-a-licious API - Swagger UI .
For example your query is https://search.openfoodfacts.org/search?q=brands:danone+OR+stores:casino&langs=fr:en&page_size=30&page=1
We are working on the UI for this… but wait until a month at least before it lands.
PS: do you like spice ? (I’m not sure if you nickname is a reference to Dune )
1 Like
Thank you for your reply @alex
Great, that was exactly what i was looking for, thank you!
Looking forward to the new search UI.
PS. yes you’re right: i Spice
1 Like