POST /api/entities

Extract Entities

Identify and extract named entities including people (PERSON), organizations (ORG), locations (GPE), products, events, and dates.

$0.02 per request

> REQUEST

POST /api/entities

{
  "text": "Apple Inc. was founded by Steve Jobs in Cupertino, California in April 1976.",
  "options": {
    "types": ["PERSON", "ORG", "GPE", "DATE"],
    "includeConfidence": true
  }
}

> RESPONSE

{
  "result": {
    "entities": [
      { "text": "Apple Inc.", "type": "ORG", "start": 0, "end": 10, "confidence": 0.98 },
      { "text": "Steve Jobs", "type": "PERSON", "start": 24, "end": 34, "confidence": 0.99 },
      { "text": "Cupertino", "type": "GPE", "start": 38, "end": 47, "confidence": 0.97 }
    ],
    "count": 5,
    "types_found": ["ORG", "PERSON", "GPE", "DATE"]
  },
  "tokens_used": { "prompt_tokens": 112, "completion_tokens": 78, "total_tokens": 190 }
}

> ENTITY_TYPES