Search products (standard)
search_products_standardSearch Open Food Facts food database using structured filters. Filter by brand, category, or Nutri-Score, and get exact product counts.
Instructions
Search Open Food Facts with structured filters. Best for simple keyword queries and brand/category filtering. Returns exact result counts and well-populated products. If you have a barcode, use get_product instead.
How search works: strict AND against a keyword index built from product_name, generic_name, brands, categories, origins, labels. One unmatched query word → zero results.
Tips:
Prefer 2-3 distinctive words over the full product name
Put brand names in brands_tags, not the query text
Brand normalization is generous: "sainsburys", "sainsbury's", "sainsbury-s" all match
For fresh produce, use brands_tags + categories_tags rather than text search
sort_by=popularity works well here (not supported in search_products_lucene)
If you get zero results, try dropping words or using search_products_lucene which has more flexible text matching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default: 1) | |
| query | No | Search terms. Strict AND: every word must exist in the product's indexed keywords, so prefer 2-3 distinctive words over the full product name. Use words as they appear on the pack (don't strip plurals or possessives — the search normalizes both sides). Put brand names in brands_tags instead of here. | |
| fields | No | Fields to return per product. Defaults to: code, product_name, brands, categories, nutriscore_grade, nova_group, image_url, quantity | |
| sort_by | No | Sort order | |
| page_size | No | Results per page (default: 24, max: 100) | |
| brands_tags | No | Filter by brand. Input is normalized, so "sainsburys", "sainsbury's", "sainsbury-s" all match the same brand — no need to know the exact tag slug. More reliable than putting the brand in the query text. | |
| categories_tags | No | Filter by category tag (e.g. "en:breakfast-cereals", "en:tomatoes"). Best way to find fresh produce: text-searching "banana" matches thousands of banana-flavoured products, but categories_tags "en:bananas" finds actual bananas. | |
| nutrition_grades_tags | No | Filter by Nutri-Score grade (a, b, c, d, e) |