DEV Community

Cover image for Emotion Sentiment Analysis API
Dakidarts
Dakidarts

Posted on

Emotion Sentiment Analysis API

CalcX - Emotion Sentiment Analysis API Cover

๐ŸŒŸ Emotion Sentiment Analysis API ๐ŸŒŸ

Effortlessly unlock text insights with AI-powered sentiment and emotion analysis!

Welcome to the Emotion Sentiment Analysis API! This API provides developers with the tools to analyze text for sentiment and emotions, enabling smarter decision-making and improved user experiences.

๐Ÿ“ข Subscribe now on RapidAPI to get started!

โœจ API Docs to get started!


๐Ÿ”ฅ Features

  • Sentiment Analysis: Detect whether text is ๐Ÿ˜Š positive, ๐Ÿ˜ neutral, or ๐Ÿ˜  negative in 6 languages: English (en), French (fr), Spanish (es), German (de), Portuguese (pt), and Italian (it).
  • Emotion Detection: Uncover up to 28 distinct emotions ๐ŸŽญ from English text, including joy, anger, love, and more.
  • ๐Ÿš€ Fast, Reliable, and Developer-Friendly!

๐Ÿ“Œ API Endpoints

1. /sentiment Endpoint

Analyze the sentiment of your input text across 6 languages.

  • Input Parameters:
    • text (required): The text you want to analyze.
  • Supported Languages: en, fr, es, de, pt, it.

Sentiment Mapping:

Sentiment Code Sentiment Label
0 Negative ๐Ÿ˜ 
1 Neutral ๐Ÿ˜
2 Positive ๐Ÿ˜Š

Sample Request:

GET /sentiment?text=I love this product!
Enter fullscreen mode Exit fullscreen mode

Sample Response:

{
  "input_text": "I love this product!",
  "predicted_sentiment": "Positive",
  "probability_scores": [0.1, 0.2, 0.7],
  "predicted_label": "Positive"
}
Enter fullscreen mode Exit fullscreen mode

2. /emotion Endpoint

Identify up to 28 distinct emotions from English text.

  • Input Parameters:
    • text (required): The text you want to analyze.

Emotion Mapping:

Emotion Code Emotion Label
0 admiration ๐Ÿฅฐ
1 amusement ๐Ÿ˜‚
2 anger ๐Ÿ˜ก
3 annoyance ๐Ÿ˜ค
4 approval ๐Ÿ‘
5 caring ๐Ÿค—
6 confusion ๐Ÿค”
7 curiosity ๐Ÿคจ
8 desire ๐Ÿ˜
9 disappointment ๐Ÿ˜ž
10 disapproval ๐Ÿ‘Ž
11 disgust ๐Ÿคฎ
12 embarrassment ๐Ÿ˜ณ
13 excitement ๐Ÿ˜†
14 fear ๐Ÿ˜จ
15 gratitude ๐Ÿ™
16 grief ๐Ÿ˜ข
17 joy ๐Ÿ˜Š
18 love โค๏ธ
19 nervousness ๐Ÿ˜ฌ
20 optimism ๐ŸŒŸ
21 pride ๐Ÿ˜Œ
22 realization ๐Ÿค“
23 relief ๐Ÿ˜…
24 remorse ๐Ÿ˜”
25 sadness ๐Ÿ˜ญ
26 surprise ๐Ÿ˜ฒ
27 neutral ๐Ÿ˜

Sample Request:

GET /emotion?text=Wow I'm so excited for the weekend!
Enter fullscreen mode Exit fullscreen mode

Sample Response:

{
  "input_text": "Wow I'm so excited for the weekend!",
  "predicted_emotion": "excitement",
  "probability_scores": [0.05, 0.02, 0.9, ...],
  "predicted_label": "excitement"
}
Enter fullscreen mode Exit fullscreen mode

๐Ÿ’ป Getting Started

  1. Subscribe on RapidAPI: Emotion Sentiment Analysis API.
  2. Use the provided API key to authenticate your requests.
  3. Start analyzing sentiment and emotions in your text data!

๐Ÿค Contributing

We welcome contributions! If you have suggestions or feature requests, feel free to create a pull request or open an issue.

๐Ÿ“ง Contact

For questions, feedback, or support, reach out to us via the RapidAPI platform.


๐Ÿ’ก Let the Emotion Sentiment Analysis API empower your projects today! ๐Ÿ’ก

Image of Timescale

Timescale โ€“ the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

๐Ÿ‘‹ Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay