About this endpoint
What it does
Extracts named entities from the input text and returns the original text along with a list of detected entities, including their character offsets, type, surface form, and score.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | Yes | Input text. Maximum length: 512 characters. Truncated to 512 tokens. |
Response
Returns a JSON object with a text string field and an entities array field. Each item in entities is an object containing the detected entity’s offsets, label, text, and score.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | No | The input text as returned by the service. |
| entities | Object Array | No | The detected entities. Each item includes start, end, type, word, and score. |
| entities[].end | Integer | No | End offset of the entity in the text. |
| entities[].type | ENUM | No | Entity label. Allowed values: PER, ORG, LOC, MISC. |
| entities[].word | String | No | The extracted entity text. |
| entities[].score | Number | No | Confidence score for the entity. |
| entities[].start | Integer | No | Start offset of the entity in the text. |