Sentiment API call

API Endpoint package

Text Analysis

API endpoint

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

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 sentiment (negative, neutral, positive).

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/sentiment"

Sample JSON response

{"label":"pos","confidence":0.7222984171724564}

Try our REST API

Request API key