New: Unified API Platform - 250+ Endpoints, One Integration, Infinite PossibilitiesExplore Now ?
Back to Documentation

Sentiment Analysis Guide

Understand Emotions in Text

Analyze sentiment with advanced AI

Our sentiment analysis API uses state-of-the-art natural language processing to understand emotions and opinions in text.

Quick Example

// Analyze sentiment
const text ="I absolutely love using OnlyOneAPI! It's made our development so much easier.";

const response = await fetch('https://api.onlyoneapi.com/v1/ai/sentiment', {
 method: 'POST',
 headers: {
  'Authorization': 'Bearer YOUR_API_KEY',
  'Content-Type': 'application/json'
 },
 body: JSON.stringify({ text })
});

const result = await response.json();
// Result: {
//  sentiment:"positive",
//  confidence: 0.98,
//  emotions: {
//   joy: 0.85,
//   trust: 0.72,
//   anticipation: 0.45
//  }
// }

Use Cases

  • Customer feedback analysis
  • Social media monitoring
  • Product review insights
  • Support ticket prioritization
  • Brand reputation tracking

Response Format

The API returns detailed sentiment information:

  • Sentiment: positive, negative, or neutral
  • Confidence: 0.0 to 1.0 confidence score
  • Emotions: Detailed emotion breakdown (joy, sadness, anger, etc.)
  • Keywords: Key phrases that influenced the sentiment