Serverless AI Entity Extraction
AI powered named entities extraction from text such as people, address, phone number and many more. Only your imagination is the limit. Based on a content, you can extract entities and use them for your own purposes.
Endpoint
Extract entities from text such as people, address, phone number and many more.
POSThttps://api.xtartapp.com/text/entity-extraction
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
text | string | Yes | 2 500 | The text to analyze |
entities | array | Yes | 10 | The entities to extract from the text. |
entities[].key | string | Yes | 25 | The key of the entity to extract from the text. Must be alphanumeric with underscores only (no spaces or special characters). Ex: PERSON, PHONE_NUMBER, etc. |
entities[].description | string | Yes | 100 | The description of the entity to extract from the text. Must be a short and concise description of the entity. |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the entities extracted from the text |
data.<key> | string | The keys you specified in the entities array |
data.<value> | string | The extracted values corresponding to the keys you specified in the entities array |
metadata | object | Metadata about the entity extraction process |
metadata.cost | number | The cost of the entity extraction request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | TEXT_ENTITY_EXTRACTION_ERROR | Ex: could not extract entities from the text | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |