Allergen flags in an ingredient list (EU Annex II, US FALCPA + FASTER Act)
Scans an ingredient list for terms tied to the 14 allergens of EU Regulation 1169/2011 Annex II and the 9 US major food allergens (FALCPA plus sesame under the FASTER Act), for an agent or buyer checking a label or recipe. Returns each matched span with its character offsets, the allergen, the regime that lists it, and whether it sits in a 'may contain' clause. Pass the allergens a label declares to get a fail for any detected but undeclared one. These are flags, not advice: matching is a lexicon of terms quoted from the regulation and FDA guidance, so an absent match does not show an ingredient is free of an allergen. It does NOT judge cross-contact risk, quantities (the EU sulphite threshold of 10 mg/kg), refining exemptions, or compliance of a label.
What you get
Offsets and the regulation behind each flag make an allergen check auditable instead of a model's guess.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/allergen-flag. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/allergen-flag \
-H 'content-type: application/json' \
-d '{"ingredients":"Wheat flour, skimmed milk powder, soy lecithin, sesame seeds. May contain nuts.","declared":["wheat","milk"]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
ingredients | string; length 0..20000 | yes | Ingredient list or label text, at most 20000 characters. |
jurisdictions | string; one of "eu", "us", "both" | no | Which list(s) to apply. Default both. EU adds celery, mustard, lupin, molluscs, sulphites and gluten cereals (rye, barley, oats); the US list has no such entries. |
declared | array<string; one of "milk", "egg", "fish", "crustacean", "mollusc", "peanut", "tree-nut", "wheat", "gluten-cereal", "soy", "sesame", "celery", "mustard", "lupin", "sulphites">; max 15 items | no | Allergen keys the label declares. Any detected, non-precautionary allergen missing from this list fails. For jurisdictions=eu, wheat and gluten-cereal cover each other (one Annex II entry). |
extraTerms | array<object>; max 100 items | no | Caller synonyms (for example a brand's own ingredient name), matched as literal words. |
Example request body
{
"ingredients": "Wheat flour, skimmed milk powder, soy lecithin, sesame seeds. May contain nuts.",
"declared": [
"wheat",
"milk"
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
jurisdictions | array<string> | no | |
tokenCount | integer | no | Words scanned. |
matches | array<object> | no | |
allergens | array<object> | no | |
undeclared | array<string> | no | Detected, non-precautionary allergens missing from declared (only when declared is given). |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the compliance-evidence-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent