How to extract named entities and classify text with an API

Two POST routes for English text: /v1/ner returns people, organisations, places, dates and amounts with offsets, and /v1/classify/zero-shot scores a text against labels you supply, with no training and no account.

When to use it

Use it to pull people, organisations, places, dates and amounts of money out of English text (news, emails, support tickets, logs), or to sort a short text into categories you define on the spot without training anything. Both routes run an open model on Tanod's own CPU: no LLM and no third-party API.

Named entity recognition

POST text (English, at most 20,000 characters) to /v1/ner. You get each entity's text, label (the 18 OntoNotes types, such as PERSON, ORG, GPE, DATE, MONEY) and character offsets (code points, end exclusive), plus counts per label. labels limits the output to the types you list.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/ner \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"text": "Apple paid $3.5 million to John Smith in Berlin on 5 October 2026."}'
Response (example from the API spec, trimmed)
{
  "model": {"id": "en_core_web_sm-3.8.0", "license": "MIT"},
  "entities": [
    {"text": "Apple", "label": "ORG", "start": 0, "end": 5},
    {"text": "$3.5 million", "label": "MONEY", "start": 11, "end": 23},
    {"text": "John Smith", "label": "PERSON", "start": 27, "end": 37},
    {"text": "Berlin", "label": "GPE", "start": 41, "end": 47},
    {"text": "5 October 2026", "label": "DATE", "start": 51, "end": 65}
  ],
  "counts": {"DATE": 1, "GPE": 1, "MONEY": 1, "ORG": 1, "PERSON": 1}
}

Zero-shot classification

POST text (English, at most 2,000 characters) and labels (1 to 10 labels you choose) to /v1/classify/zero-shot. Labels are scored by an NLI model; single-label scores sum to 1, or set multi_label to score each label on its own.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/classify/zero-shot \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"text": "I was charged twice for my subscription this month.", "labels": ["billing", "technical support", "sales"]}'
Response (example from the API spec, trimmed)
{
  "model": {"id": "nli-deberta-v3-xsmall", "license": "Apache-2.0"},
  "labels": [
    {"label": "billing", "score": 0.941569},
    {"label": "sales", "score": 0.054991},
    {"label": "technical support", "score": 0.00344}
  ],
  "multi_label": false
}

Paying: the 402 flow

Leave out the X-Tanod-Free header (or use up the free calls) and the same request gets HTTP 402 with the price (USD 0.001) and how to pay in the accepts list. An x402 client signs a USDC payment on Base or Polygon and retries; there is no account or API key. The full flow is in Pay-per-call APIs for AI agents with x402.

curl, no free header: the 402
curl -s -i -X POST https://tanod.dev/v1/ner \
  -H 'content-type: application/json' \
  -d '{"text": "Apple paid $3.5 million to John Smith in Berlin on 5 October 2026."}'

Limits

English only. Entity recognition is a statistical model (spaCy en_core_web_sm): it can miss or mislabel entities, so do not use it as the only check where an error matters. Zero-shot scores are model confidences, not calibrated probabilities, and label wording changes the result, so test your labels on examples. At most 2,000 entities come back (then entities_truncated). Tanod does not log or store the submitted text.

Models: spaCy en_core_web_sm 3.8.0 (MIT) and cross-encoder/nli-deberta-v3-xsmall (Apache-2.0).

Price and free allowance

USD 0.001 per call, paid in USDC on Base or Polygon with x402. 5 free mlpeek calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared by every mlpeek route (embeddings, rerank, similarity, entities, zero-shot classification). MCP tool: extract_entities and classify_zero_shot at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: Text embeddings API without an account, rerank and similarity, Language detection API, Text statistics API, Pay-per-call APIs for AI agents with x402. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.