Extract entities from a text. An entity is a word or a group of words that represent a concept. For example, the word "Canada" represents the concept of a country. The word "Jim Carrey" represents the concept of a person. The word "Tesla" represents the concept of a company. The API will return a list of entities found in the text. The entities are classified into different types such as person, location, organization, etc.
Supported entity types: PER, LOC, ORG
| Type | Code | Example |
|---|---|---|
| Location | LOC | Ireland |
| Person | PER | Michael Jordan |
| Organization | ORG | Tesla |
{
"entities": [
{
"type": "PER",
"value": "Jim Carrey",
"start_position": 0,
"end_position": 10,
"image": "https://upload.wikimedia.org/wikipedia/commons/8/8b/Jim_Carrey_2008.jpg"
},
{
"type": "LOC",
"value": "Canada",
"start_position": 28,
"end_position": 34,
"image": null
}
]
} {{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
The API currently supports the extraction of Persons (PER), Locations (LOC), and Organizations (ORG).
Yes, if available, the API attempts to provide a relevant image URL for the extracted entities, particularly for famous people.
The API is primarily optimized for English text but may work with other languages depending on the context and entity names.
The Extract Entities API identifies specific people, places, and organizations in the text, while the Detect Sentiment API analyzes the overall emotional tone of the text.