# WritersLogic Allergen Flag Scanner

> WritersLogic Allergen Flag Scanner is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-18).

Scans ingredient list text for EU and US regulated allergen terms, returning matched spans with offsets, allergen identity, jurisdiction, and may-contain status, flagging any detected-but-undeclared allergens.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/allergen-flag?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-allergen-flag-scanner-c83c2186
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E4aYDGF5YGNYPzMq8zfJH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-allergen-flag-scanner-c83c2186 -d '<json body>'
```

Example prompt: Scan this ingredient list for both EU and US allergens — the label declares milk, wheat, and soy — and flag anything detected that isn't declared: 'Water, wheat flour, skimmed milk powder, egg yolk, sesame seeds, modified starch, salt, yeast extract, rapeseed oil, barley malt extract.'

## When to prefer this

Use this endpoint when you need automated, text-based allergen term detection against the official EU Regulation 1169/2011 Annex II (14 allergens) and/or US FALCPA+FASTER Act (9 allergens) lexicons, particularly when checking whether a label's declared allergen list covers all detected allergens. It is ideal for agents automating food label review, recipe scanning, or import compliance pre-checks. Do not use it as a substitute for formal compliance assessment, quantity-based thresholds, or cross-contact risk evaluation.

## Known failure modes

- Ingredient text exceeds 20,000 character limit — request rejected
- Invalid allergen key in declared array — schema validation error
- extraTerms entry exceeds 60 characters or 6 words — rejected
- No matches found does not confirm allergen-free status — absent match is not a clearance
- Sulphite threshold (10 mg/kg EU) not evaluated — quantity judgments not supported
- Refining exemptions not applied — highly refined oils flagged even if legally exempt
- Cross-contact risk not assessed — only label text is scanned
- Payment failure (x402) — 402 response with payment details required

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns a list of matched spans each containing: the matched text, start and end character offsets, the allergen key (e.g. 'milk', 'sesame'), the jurisdiction that lists it (eu, us, or both), and a boolean indicating whether the match is within a may-contain/precautionary clause. Also returns a list of undeclared allergen failures — allergens detected but absent from the caller-supplied declared list (excluding precautionary mentions).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "declared": {
   "type": "array",
   "items": {
    "enum": [
     "milk",
     "egg",
     "fish",
     "crustacean",
     "mollusc",
     "peanut",
     "tree-nut",
     "wheat",
     "gluten-cereal",
     "soy",
     "sesame",
     "celery",
     "mustard",
     "lupin",
     "sulphites"
    ],
    "type": "string"
   },
   "maxItems": 15,
   "description": "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": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "term",
     "allergen"
    ],
    "properties": {
     "term": {
      "type": "string",
      "maxLength": 60,
      "description": "Extra term, at most 6 words."
     },
     "allergen": {
      "enum": [
       "milk",
       "egg",
       "fish",
       "crustacean",
       "mollusc",
       "peanut",
       "tree-nut",
       "wheat",
       "gluten-cereal",
       "soy",
       "sesame",
       "celery",
       "mustard",
       "lupin",
       "sulphites"
      ],
      "type": "string"
     }
    }
   },
   "maxItems": 100,
   "description": "Caller synonyms (for example a brand's own ingredient name), matched as literal words."
  },
  "ingredients": {
   "type": "string",
   "maxLength": 20000,
   "description": "Ingredient list or label text, at most 20000 characters."
  },
  "jurisdictions": {
   "enum": [
    "eu",
    "us",
    "both"
   ],
   "type": "string",
   "description": "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-allergen-flag-scanner-c83c2186/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
