Does a product contain common allergens?

Lists a product's allergens and traces. Pass check (e.g. milk,nuts) to get a yes/no answer for specific allergens.

Request

GEThttps://food-nutrition.p.apihiver.com/v1/allergens/3017620422003
String. Comma-separated allergens to check (default milk,gluten,nuts,peanuts,soybeans,eggs).
Language
Client
1curl --request GET \
2  --url 'https://food-nutrition.p.apihiver.com/v1/allergens/3017620422003?check=%7Bcheck%7D' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

Does a product contain common allergens?: Food Nutrition API reference

Lists a product's allergens and traces. Pass `check` (e.g. `milk,nuts`) to get a yes/no answer for specific allergens. This endpoint is part of the Food Nutrition API: Nutrition facts, ingredients, Nutri-Score and allergens for millions of packaged foods — by barcode or name.

Example response (200, application/json)

Success.

1{
2  "name": "Nutella",
3  "check": {
4    "eggs": false,
5    "milk": true,
6    "nuts": true,
7    "gluten": false,
8    "peanuts": false,
9    "soybeans": true
10  },
11  "barcode": "3017620422003",
12  "attribution": "Data from Open Food Facts (openfoodfacts.org), ODbL",
13  "declared_allergens": [
14    "milk",
15    "nuts",
16    "soybeans"
17  ]
18}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "A barcode is 8–14 digits (EAN-8, EAN-13, UPC-A…)."
    5  }
    6}
  • 404 — Nothing matches the value you sent.
    1{
    2  "error": {
    3    "code": "NOT_FOUND",
    4    "message": "No product with barcode 0000000000017."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.