Skip to content
RSFlowHub
  1. Home
  2. APIs
  3. Social & Comments
  4. Social Media Comment & Tone Analysis API
Social & Comments API

Social Media Comment & Tone Analysis API

Social media comment intelligence API for sentiment, intent, reply necessity, and priority scoring.

POST https://rsflowhub.com/api/v1/ai/comment-analyze
  • 2 credits per call
  • X-API-Key header
  • JSON in, JSON out
POST /api/v1/ai/comment-analyze
{
    "comment": "Do you ship to Mumbai? I would love to order this today!",
    "platform": "Instagram",
    "post_context": "Photo of our new handcrafted leather boots collection",
    "business_context": "We are an artisanal e-commerce shop delivering worldwide. Shipping is free within India."
}
200 OK response.json
{
    "result": {
        "sentiment": "positive",
        "intent": "purchase_question",
        "language": "en",
        "topics": [
            "pricing",
            "availability"
        ],
        "requires_reply": true,
        "priority": "high",
        "recommended_action": "Reply with a link to the pricing page.",
        "confidence": 0.9
    }
}
Definition

What is the Social Media Comment & Tone Analysis API?

Social Media Comment & Tone Analysis API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/comment-analyze with your API key; RSFlowHub runs it on a tuned AI model, falls back to a backup provider if needed, and returns a structured JSON result, usually within 1 to 3 seconds.

Endpoint
POST /api/v1/ai/comment-analyze
Authentication
X-API-Key header
Price
2 credits per call
Rate limit
10 to 120 requests / minute by plan
Typical response
1 to 3 seconds
Format
JSON, UTF-8

Request parameters

Send these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.

FieldTypeRequiredDescription
comment string Required The social media comment text (Max: 5,000 characters).
language string Optional Optional comment language identifier.
platform string Optional Optional platform name (e.g. "Instagram", "Facebook", "YouTube", "LinkedIn").
post_context string Optional Optional post content or media brief context.
business_context string Optional Optional business, product, or account rules context.
author_context string Optional Optional commenter context details.

Code examples

Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.

request.sh
curl -X POST "https://rsflowhub.com/api/v1/ai/comment-analyze" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rfh_your_api_key" \
  -d '{"comment":"Do you ship to Mumbai? I would love to order this today!","platform":"Instagram","post_context":"Photo of our new handcrafted leather boots collection","business_context":"We are an artisanal e-commerce shop delivering worldwide. Shipping is free within India."}'

Response

Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.

response.json
{
    "success": true,
    "request_id": "req_3f9a2c7e-5b1d-4e8a-9c2f-7d6e1a0b4c8d",
    "data": {
        "result": {
            "sentiment": "positive",
            "intent": "purchase_question",
            "language": "en",
            "topics": [
                "pricing",
                "availability"
            ],
            "requires_reply": true,
            "priority": "high",
            "recommended_action": "Reply with a link to the pricing page.",
            "confidence": 0.9
        }
    },
    "meta": {
        "version": "v1",
        "timestamp": "2026-10-05T09:30:00Z"
    }
}
Envelope fields
FieldTypeMeaning
successbooleantrue when the call worked, false on any error.
request_idstringUnique id for this call. Quote it when you contact support.
data.resultobjectThe result of this endpoint (see the example).
errorobjectOnly on failure: code, message and details per field.
metaobjectAPI version and server timestamp.

All error codes: Errors reference

Features

Multi-Dimensional Sentiment & Emotion

Detects positive, negative, neutral, and emotional sub-tones such as excitement, curiosity, or frustration.

Reply Necessity Classification

Automatically flags whether a comment requires an explicit business reply (e.g., shipping inquiries vs casual emojis).

Topic & Intent Tagging

Categorizes comments into pricing, shipping, product feedback, technical support, or general praise.

Cross-Platform Context Grounding

Contextualized analysis tailored for Instagram, TikTok, YouTube, LinkedIn, and X comment structures.

Use cases

How teams use the Social Media Comment & Tone Analysis API in production.

Social SaaS

Social Media Management Inbox Triage

Automatically prioritize buyer questions over generic emojis in multi-brand social media inboxes.

Input
Do you ship to Mumbai? I would love to order this today!
Output
{"intent": "shipping_inquiry", "requires_reply": true, "priority": "high", "sentiment": "positive"}

Shortens social media response time with ready-to-post reply drafts.

Brand Marketing

Influencer Campaign Sentiment Analytics

Analyze thousands of viewer comments on sponsored YouTube videos and Instagram reels to measure campaign ROI.

Input
The product looks cool but $120 is way too expensive.
Output
{"intent": "price_complaint", "sentiment": "negative", "topic": "pricing"}

Provides instant feedback on product reception.

Customer Success

Community Moderation & Support Escalation

Flag urgent customer complaints posted on social channels for instant support ticket creation.

Input
My order #1209 hasn't arrived after 3 weeks! Support is ignoring my emails!
Output
{"intent": "delivery_complaint", "requires_reply": true, "priority": "urgent", "sentiment": "negative"}

Prevents social PR crises through rapid escalation.

Social Media Comment & Tone Analysis API vs building it yourself

The same job done three ways.

TopicRSFlowHub APIRaw LLM promptsRules / regex
Output Validated JSON fieldsFree text you have to parseFixed patterns only
Setup One POST request, no promptsWrite and maintain prompts and parsingWrite and maintain rule lists
Provider outage Automatic fallback to a backup modelYou build retries and a second vendorNot applicable
Pricing 2 credits per call, failed calls freePer token, per vendorYour own servers and upkeep
Understands context Yes, AI modelYes, AI modelNo, keywords only

Frequently asked questions

Which social media platforms are supported?
The Comment Analysis API natively supports comment structures from Instagram, YouTube, TikTok, X (Twitter), LinkedIn, Facebook, and custom blog comments.
How does the API determine if a comment needs a reply?
The API evaluates intent markers (e.g. questions about shipping, pricing, or product availability) and sets requires_reply=true for actionable comments while skipping simple emojis.
Can I pass original post context for better accuracy?
Yes! Passing post_context provides grounding context so the AI understands ambiguous comments like "how much for this?".
How fast is the Comment Analysis API?
Comment Analysis requests usually complete in 1 to 3 seconds, depending on input length and the AI model. Identical repeat requests are served from cache and return faster.
How many credits does each request consume?
Standard Comment Analysis API calls consume 2 base credits per request.

Start using the Social Media Comment & Tone Analysis API

Free plan with 100 credits/month + 1,000 bonus credits when you sign in before 23 Nov. Test it in the playground first, no code needed.

RSFlowHub

Sign in to continue

You'll come straight back to this page.

Forgot password?

New to RSFlowHub? Create a free account