Allergen flags in an ingredient list (EU Annex II, US FALCPA + FASTER Act)

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/allergen-flag · Id allergen-flag

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

FieldTypeRequiredDescription
ingredientsstring; length 0..20000yesIngredient list or label text, at most 20000 characters.
jurisdictionsstring; one of "eu", "us", "both"noWhich 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.
declaredarray<string; one of "milk", "egg", "fish", "crustacean", "mollusc", "peanut", "tree-nut", "wheat", "gluten-cereal", "soy", "sesame", "celery", "mustard", "lupin", "sulphites">; max 15 itemsnoAllergen 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).
extraTermsarray<object>; max 100 itemsnoCaller 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.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: 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.
jurisdictionsarray<string>no
tokenCountintegernoWords scanned.
matchesarray<object>no
allergensarray<object>no
undeclaredarray<string>noDetected, non-precautionary allergens missing from declared (only when declared is given).
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways 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