Allergens API
Look up allergen data for individual ingredients, search across the ingredient catalog by allergen, and filter ingredient lists by allergen presence. Field availability is gated by plan.
Authentication
All endpoints require the
x-api-key header. Response codes: 200 OK, 401 Auth Error, 429 Limited.Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /allergens | List allergen data with pagination and advanced filtering (plan-based) |
| GET | /allergens/search | Search ingredients and return allergen data (gated by plan) |
| GET | /allergens/search/{search_text} | Path-param variant |
| GET | /allergens/{ingredient_id} | Get allergen data for an ingredient (fields gated by plan) |
List Allergen Data
GET
/allergensReturn a paginated list of allergen data. Filter results with query parameters. Fields gated by plan.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | 10 | Basic max 10, Pro max 50, Custom max 100 |
| offset | integer | 0 | Pagination offset |
| category | string | - | Filter by ingredient category |
| allergen | string | - | Filter by specific allergen |
| has_allergens | boolean | - | Filter by allergen presence |
| sustainability_min | number | - | Min sustainability score |
| sustainability_max | number | - | Max sustainability score |
| nutrition_min | number | - | Min nutrition score |
| nutrition_max | number | - | Max nutrition score |
| protein_min | number | - | Min protein (g) |
| fat_min | number | - | Min fat (g) |
| carbs_min | number | - | Min carbs (g) |
| fiber_min | number | - | Min fiber (g) |
| sodium_max | number | - | Max sodium (mg) |
| energy_max | number | - | Max energy (kcal) |
curl "https://developer-portal-backend-694046361762.northamerica-northeast1.run.app/allergens?limit=10" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"Response200 OK
{
"items": [
{
"has_allergens": false,
"id": "65d5d345cc535e012de2fc49",
"name": "Example Allergen Name"
}
],
"pagination": {
"total_count": 100,
"limit": 10,
"offset": 0,
"has_next": true,
"has_previous": false
}
}Search Allergen Data
GET
/allergens/searchSearch ingredients and return allergen data. Fields gated by plan.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query |
curl "https://developer-portal-backend-694046361762.northamerica-northeast1.run.app/allergens/search?q=milk" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"Response200 OK
[
{
"id": "65d5d34acc535e012de2fcdd",
"name": "Milk, cow, skimmed, 0.5 % fat",
"allergens_flat": [],
"allergens_by_country": []
},
{
"id": "65d5d350cc535e012de2fd95",
"name": "Cheese, cottage, lowfat, 2% milkfat",
"allergens_flat": [],
"allergens_by_country": []
}
]Search Allergen Data (Path Param)
GET
/allergens/search/{search_text}Path-parameter variant of search. Pass the search text directly in the URL path.
curl "https://developer-portal-backend-694046361762.northamerica-northeast1.run.app/allergens/search/cheese" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"Response200 OK
[
{
"id": "65d5d34acc535e012de2fcdd",
"name": "Milk, cow, skimmed, 0.5 % fat",
"allergens_flat": [],
"allergens_by_country": []
},
{
"id": "65d5d350cc535e012de2fd95",
"name": "Cheese, cottage, lowfat, 2% milkfat",
"allergens_flat": [],
"allergens_by_country": []
}
]Get Allergen Data
GET
/allergens/{ingredient_id}Retrieve allergen information for a specific ingredient. Fields limited by plan.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ingredient_id | string | Yes | Unique ingredient identifier |
curl "https://developer-portal-backend-694046361762.northamerica-northeast1.run.app/allergens/65d5d3e1cc535e012de30da2" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"Response200 OK
{
"id": "65d5d3e1cc535e012de30da2",
"name": "Bitter Orange Extract",
"allergens_flat": [],
"allergens_by_country": []
}