Generate
Sentiment Analysis
Get Started
API Endpoints
- Ayrshare API Overview
- Ads
- Analytics
- Auto Schedule
- Brand
- Comments
- Feed
- Generate
- Hashtags
- History
- Links
- Media
- Messages
- Post
- Profiles
- Reviews
- User
- Utils
- Validate
- Webhooks
Multiple Users
Dashboard
- Overview
- Connect Social Accounts
- Publish a Post
- Revoke Access to Social Media
- RSS
Additional
- What's New At Ayrshare
- Errors
- Max Pack
- Media Guidelines
- Packages & Guides
- System Status
- Testing & Verification
- ISO Codes
Generate
Sentiment Analysis
Generate a sentiment analysis on a social media post or comment
POST
/
generate
/
sentiments
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"text": "These shoes aren't the best. The color has faded and they are uncomfortable to walk in."}' \
-X POST https://api.ayrshare.com/api/generate/sentiment
{
"status": "success",
"text": "These shoes aren't the best. The color has faded and they are uncomfortable to walk in.",
"sentimentAnalysis": {
"sentiment": "negative", // positive, negative, or neutral
"opportunities": [
"Improve color durability",
"Enhance comfort level"
],
"recommendations": [
{
"opportunity": "Improve color durability",
"recommendation": "Investigate and use higher-quality dyes or materials to prevent fading over time."
},
{
"opportunity": "Enhance comfort level",
"recommendation": "Review and possibly redesign the shoe's insole and cushioning to provide better support and comfort for walking."
}
]
}
}
Available on Premium, Business, Enterprise plans.Max Pack required
Generate a sentiment analysis on a social media post or comment to understand if the text is positive, negative, or neutral and recommendations on improving the text for a more positive reaction.
Header Parameters
Body Parameters
The string of text to generate the sentiment analysis on.
Request Examples
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"text": "These shoes aren't the best. The color has faded and they are uncomfortable to walk in."}' \
-X POST https://api.ayrshare.com/api/generate/sentiment
{
"status": "success",
"text": "These shoes aren't the best. The color has faded and they are uncomfortable to walk in.",
"sentimentAnalysis": {
"sentiment": "negative", // positive, negative, or neutral
"opportunities": [
"Improve color durability",
"Enhance comfort level"
],
"recommendations": [
{
"opportunity": "Improve color durability",
"recommendation": "Investigate and use higher-quality dyes or materials to prevent fading over time."
},
{
"opportunity": "Enhance comfort level",
"recommendation": "Review and possibly redesign the shoe's insole and cushioning to provide better support and comfort for walking."
}
]
}
}
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"text": "These shoes aren't the best. The color has faded and they are uncomfortable to walk in."}' \
-X POST https://api.ayrshare.com/api/generate/sentiment
{
"status": "success",
"text": "These shoes aren't the best. The color has faded and they are uncomfortable to walk in.",
"sentimentAnalysis": {
"sentiment": "negative", // positive, negative, or neutral
"opportunities": [
"Improve color durability",
"Enhance comfort level"
],
"recommendations": [
{
"opportunity": "Improve color durability",
"recommendation": "Investigate and use higher-quality dyes or materials to prevent fading over time."
},
{
"opportunity": "Enhance comfort level",
"recommendation": "Review and possibly redesign the shoe's insole and cushioning to provide better support and comfort for walking."
}
]
}
}