Extract Entities

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

GET
https://api.apileague.com/extract-entities
Example Request and Response
GET
https://api.apileague.com/{{ examples.getExtractEntities }}
{
    "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
        }
    ]
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}