RapidAPI logo

Sign Up

Log In

Emotion Analysis

FREEMIUM
By twinword
Updated 3 months ago
Text Analysis
8/10
Popularity Score
2142ms
Latency
100%
Success Rate

Emotion Analysis API Documentation

What emotions are in this text…? Detect the emotions of a paragraph of text.

View API Details
Emotion Analysis
POSTAnalyze (post)
GETAnalyze (get)
POSTAnalyze (post)

Detect the emotions of a paragraph of text.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
textSTRING
REQUIREDEnter a sentence to analyze.
Request Snippet
unirest.post("https://twinword-emotion-analysis-v1.p.rapidapi.com/analyze/")
.header("X-RapidAPI-Host", "twinword-emotion-analysis-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("text=After living abroad for such a long time, seeing my family was the best present I could have ever wished for.")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://twinword-emotion-analysis-v1.p.rapidapi.com/analyze/")
.header("X-RapidAPI-Host", "twinword-emotion-analysis-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("text=After living abroad for such a long time, seeing my family was the best present I could have ever wished for.")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication