ShelfBase

Search products

Substring search across non-multipack food and sports nutrition products with usable nutrition data. Searches display name, canonical name, brand, and EAN. Case-insensitive. Paged, with a hard cap of 50 results per page.

GET/v1/products/search

Query parameters

FieldTypeDescription
qstringSearch term. Empty or missing → returns all public non-multipack products with nutrition data, paged.
countrystringOptional ISO 3166-1 alpha-2 primary-market filter, for example NL, BE, DE, or GB.
pageintegerZero-indexed page number. Default 0.
limitintegerPage size. Default 20, max 50.

Request

curl "https://shelfbase.app/api/v1/products/search?q=whey+protein&country=NL&limit=5" \
  -H "Authorization: Bearer sb_live_..."

Response

{
  "data": [
    {
      "ean": "8718907400435",
      "name": "Optimum Nutrition Gold Standard 100% Whey, Vanilla Ice Cream, 2.27kg",
      "brand": "Optimum Nutrition",
      "countries": ["NL"],
      "nutrition_per_100": { ... },
      "ingredients": { ... },
      "allergens": ["MILK", "SOY"],
      "updated_at": "2026-05-10T03:12:44Z"
    }
  ],
  "total": 247,
  "page": 0,
  "limit": 5
}

Response fields

FieldTypeDescription
dataProduct[]Array of product records. Same shape as the lookup-by-EAN response.
totalintegerTotal number of matches across all pages.
pageintegerEchoes the requested page.
limitintegerEchoes the requested limit (after capping at 50).

Matching behavior

  • Substring match (not full-text search). The provided query must appear as a text fragment in at least one searched field.
  • Case-insensitive on all text fields.
  • EAN matching is prefix-tolerant — partial digit strings will match.
  • All results have usable nutrition data; products without nutrition data are not returned.
  • Multipack records are filtered out of search results.
  • When country is supplied, only products whose primary market matches are returned. This is catalog coverage, not live stock status.
  • No fuzzy matching. Misspellings will not match.

Errors

  • 401 — missing or invalid key.
  • 400 — invalid country format.
  • 429 — quota exceeded.