Emotion Analysis

PAID
By rvc1 | Updated un mese fa | Data
Health Check

N/A

README

Emotion Analysis API Documentation

Welcome to the Emotion Analysis API, an advanced tool for detecting and analyzing emotions in textual data. This document provides detailed instructions on how to use the API.

API Endpoint

https://emotion-analysis5.p.rapidapi.com/api/rp/text-emotion-analysis/index.php

Request Method

POST

Request Body

Parameters:

  • q (required): The text string you want to analyze for emotions.

Example:

{
  "q": "I am feeling very happy today!"
}

Response

The API response is in JSON format, consisting of a status code, data containing emotions detected and their respective scores, and a response code.

Response Object:

  • status: Indicates the success status (1 for success).
  • data: Contains the analysis results.
    • emotions_detected: An array of detected emotions.
    • emotion_scores: An object containing the scores of various emotions like joy, sadness, disgust, anger, surprise, and fear.
  • code: The HTTP status code of the response (200 for successful requests).

Example Response:

{
    "status": 1,
    "data": {
        "emotions_detected": ["joy"],
        "emotion_scores": {
            "joy": 0.03846585659527888,
            "sadness": 0.007958042261309573,
            "disgust": 0,
            "anger": 0,
            "surprise": 0,
            "fear": 0
        }
    },
    "code": 200
}

Error Handling

  • 400 Bad Request: This response is returned if the request body is not properly formatted or missing required parameters.
  • 500 Internal Server Error: Indicates an error on the server side. Please contact support if this error persists.
Followers: 0
API Creator:
Rapid account: Rvc 1
rvc1
boote
Log In to Rate API
Rating: 5 - Votes: 1