This API allows you to extract sentiments from text you gathered.
To make calls to the Data Source Management API, you need to first obtain your personal access token. Your personal access token can be found in your settings page under the developer settings section
Get sentiments from text
POST https://getdata.io/sentiment HEADERS Authorization: Bearer :PERSONAL_ACCESS_TOKEN BODY { news_headline: :RAW_TEXT }
PERSONAL_ACCESS_TOKEN | Required String |
Your personal access token that can be obtained from your developer settings page |
---|---|---|
RAW_TEXT | Required String |
A string you want to extract sentiments from |
POST https://getdata.io/sentiment HEADER: Authorization: Bearer :PERSONAL_ACCESS_TOKEN BODY: { "news_headline": "Facebook employees are in disbelief that a bombshell memo justifying questionable practices to grow at all costs was leaked and some think spies might be to blame" }
{ "polarity": -0.5, "subjectivity": 1.0, "noun_phrases": [ "facebook", "bombshell memo", "questionable practices", "disbelief", "bombshell", "memo" ] }
polarity | Float |
Ranges between -1 to 1, where -1 is very unhappy, 0 is totally neutral and 1 is very happy |
---|---|---|
subjectivity | Float |
Ranges between 0 to 1, where 0 is very objective and 1 is very subjective |
To find out more about how GetData.IO works