Entities API call

API Endpoint package

Text Analysis

API endpoint

https://app.trustservista.com/api/rest/v2/entities

Supported Languages

English (native).

Russian, Arabic, Spanish, French, Chinese (with automated translation).

Description

Given an article URL or raw text, the endpoint will return the a set of extracted entities from the content.

We are currently support the following complete list of Entity Types:

LOCATION A city, state, country, region, building, monument, body of water, park, or address.
ORGANIZATION A corporation, institution, agency, or other group defined by an organizational structure.
PERSON A human identified by name, nickname, or alias.
PRODUCT A brand name item produced by an organization.
TITLE Appellation associated with an occupation, office, or status.
NATIONALITY Reference to a country or region of origin.
RELIGION Reference to an organized religion or theology, as well as its followers.
IDENTIFIER:CREDIT_CARD_NUM Credit card numbers.
IDENTIFIER:EMAIL Email addresses.
IDENTIFIER:MONEY Currencies.
IDENTIFIER:PERSONAL_ID_NUM Personal identification numbers.
IDENTIFIER:PHONE_NUMBER Phone numbers.
IDENTIFIER:URL Web addresses.
TEMPORAL:DATE Date.
TEMPORAL:TIME Time.
IDENTIFIER:DISTANCE Distance.
IDENTIFIER:LATITUDE_LONGITUDE Geographic locations in latitude and longitude coordinates.

Sample cURL call

curl -X POST \
    -H "X-TRUS-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Cache-Control: no-cache" \
    -d '{"contentUri": "http://www.foxnews.com/opinion/2017/03/01/president-trumps-best-speech.html" }' \
    "https://trust.servista.eu/api/rest/v2/entities"

Sample JSON response

{
"entities": [{
			"type": "PERSON",
			"normalized": "Donald Trump",
			"count": 13,
			"sentiment": "pos",
"confidence": 0.6240289493161371,
"mention": "Trump"

		}, {
			"type": "TITLE",
			"normalized": "President",
			"count": 10,
"sentiment": "neu",
"confidence": 0.7240189493161371,
"mention": "President"

		}, {
			"type": "LOCATION",
			"normalized": "United States",
			"count": 10,
"sentiment": "neg",
"confidence": 0.9240279493161371,
"mention": "US"
		}, {
			"type": "ORGANIZATION",
			"normalized": "Democratic",
			"count": 3,
"sentiment": "neg",
"confidence": 0.3241289493161371,
"mention": "Democratic"
		}, {
			"type": "NATIONALITY",
			"normalized": "Americans",
			"count": 2,
"sentiment": "pos",
"confidence": 0.9240279493161371,
"mention": "Americans"
		}, {
			"type": "TEMPORAL:DATE",
			"normalized": "January",
			"count": 1,
"sentiment": "neu",
"confidence": 0.9930279493161371,
"mention": "January"
		}, {
			"type": "TEMPORAL:TIME",
			"normalized": "two minutes",
			"count": 1,
"sentiment": "neu",
"confidence": 0.9730279493161271,
"mention": "two minutes"
		}, {
			"type": "IDENTIFIER:EMAIL",
			"normalized": "donald.j.trump@gov.usa.com",
			"count": 1,
"sentiment": "neu",
"confidence": 0.99900000000000000,
"mention": "donald.j.trump@gov.usa.com"
		} 
	]
}

Try our REST API

Request API key