Introducing the Instagram APIRead more →

Facebook Sentiment Analysis API. On each item you fetch.

The overall feeling the author expresses: positive, negative, neutral, or mixed (clearly both). Add analysis=sentiment to any of 12 Facebook endpoints that offer it.

GET /v1/facebook/post?analysis=sentiment

One param on the request. Sentiment on each item.

The Facebook Post API returns each post with analysis.sentiment beside its fields.

GET /v1/facebook/postTry in
curl -G 'https://socialtap.dev/v1/facebook/post' \
  --data-urlencode 'url=https://www.facebook.com/reel/4075684206061398/' \
  --data-urlencode 'analysis=sentiment' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
GET https://socialtap.dev/v1/facebook/postDocs

What the value means.

One of the values below. sentiment_probability beside it: how sure the value is, from 0 to 1.

Sentiment values
ValueMeaning
positivefavorable, pleased, enthusiastic
negativeunfavorable, displeased, critical, complaining
neutralfactual, a plain question, or no feeling either way
mixedclearly positive about some things and clearly negative about others

The sentiment reference

Keep only what matches.

On a list, where keeps the items that pass. Every item judged is charged whether or not it passes, so a page can be short.

https://socialtap.dev/v1/facebook/posts?handle=NASA&analysis=sentiment&where=analysis.sentiment=positive,analysis.sentiment_probability>=0.7

12 Facebook endpoints offer it.

Each adds the analysis to the posts, comments, transcripts and web results it returns. Text analyses cost one flat amount per request, or per page on a list, however many you ask for.

Sentiment price per endpoint
EndpointAdds
Facebook Post API+2 credits per request
Facebook Profile Posts API+6 credits per page of 3
Facebook Group Posts API+6 credits per page of 3
Facebook Profile Photos API+14 credits per page of 8
Facebook Reels API+18 credits per page of 10
Facebook Comments API+16 credits per page of 10
Facebook Comment Replies API+16 credits per page of 10
Facebook Video Transcript API+6 credits per request
Facebook Group Search API+52 credits per page of 50
Facebook Post Search API+52 credits per page of 50
Facebook Page and People Search API+52 credits per page of 50
Facebook Ad Transcript API+6 credits per request

More analyses on Facebook and beyond.

The same answer on other platforms, and other answers here.

Questions about Facebook sentiment analysis

The analyses guide has the rest.

Which Facebook endpoints offer sentiment analysis?
Facebook Post API, Facebook Profile Posts API, Facebook Group Posts API, Facebook Profile Photos API, Facebook Reels API, Facebook Comments API, Facebook Comment Replies API, Facebook Video Transcript API, Facebook Group Search API, Facebook Post Search API, Facebook Page and People Search API and Facebook Ad Transcript API. Add analysis=sentiment to any of them.
How much does an analysis cost?
It depends on what it reads. Text analyses add a flat extra per page, however many you ask for. Image analyses add 3 credits per image and video analyses 30 credits per video. Each endpoint's reference page states its text price.
Do I pay when an analysis can't answer?
No. An analysis that fails, an item in a language it doesn't answer in, a video longer than 3 minutes and a value already computed for the same item are free. The value is null, with a warning that says why.
Can I get only the items that match?
Yes, on lists. where=analysis.authenticity_risk>=0.7 keeps the items that pass. Every item judged is charged whether or not it passes, so a page can be short.
Which languages do analyses answer in?
Each analysis's reference page lists its languages. An item in another language gets null, free, with a warning.
Can I use my own categories or questions?
Yes. about, brand, labels and criteria are inputs you send with the request, and the analyses that read them answer against yours.

Send your first request in a minute.

Get a key, send a link you already have and see what comes back. The same key works on every platform.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 319 endpoints
Start for free Read the docs