{"uid":"cap_WGDXu10E6UQxORkQelmZT","slug":"x-twitter-sentiment-analysis-api-ca1cb698","name":"X Twitter Sentiment Analysis API","description":"Searches recent public X posts for a query and scores each tweet's sentiment, returning tweet-level scores plus aggregate positive/neutral/negative distribution and average score. Excludes retweets by default with an optional language filter. Requires X_BEARER_TOKEN; read-only, no posting, replying, liking, following, or account mutation. Use it as a Twitter sentiment API, X sentiment API, social sentiment monitor, tweet sentiment analysis, brand sentiment search, or crypto sentiment tracker.","url":"https://x402.agentutility.ai/twitter-sentiment?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["query"],"properties":{"query":{"type":"string","description":"X recent-search query, e.g. 'x402 payments' or '(coinbase OR bankr) x402'."},"language":{"type":"string","description":"Optional two-letter language filter, e.g. 'en'."},"max_results":{"type":"number","description":"Number of recent posts to fetch. X API minimum is 10; this endpoint clamps to 10-50. Default 10."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"query":{"type":"string"},"source":{"type":"string"},"distribution":{"type":"object","properties":{"neutral":{"type":"integer"},"negative":{"type":"integer"},"positive":{"type":"integer"}}},"result_count":{"type":"integer"},"average_score":{"type":"number"},"overall_sentiment":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"query":"x402 payments","source":"X API v2 recent search + local sentiment lexicon","distribution":{"neutral":5,"negative":1,"positive":4},"result_count":10,"average_score":0.22,"overall_sentiment":"positive"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CBmbznMNq47B4KuZk5J0_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Searches recent public X (Twitter) posts for a query and returns per-tweet sentiment scores plus aggregate positive/neutral/negative distribution and average score","exampleAgentPrompt":"Can you search recent tweets about 'Bitcoin halving' and give me a sentiment breakdown — how many are positive, neutral, or negative, and what's the average score? English tweets only, no retweets.","exampleUseCases":[{"title":"Crypto token sentiment tracker","prompt":"Search recent tweets about 'Solana SOL' and tell me the overall sentiment — what percentage are positive, neutral, and negative, and what's the average sentiment score? English only, exclude retweets."},{"title":"Brand reputation monitoring","prompt":"Pull recent tweets mentioning 'Nike Air Max' and analyze the sentiment — I want to see the per-tweet scores and the overall positive/neutral/negative breakdown."},{"title":"News event reaction analysis","prompt":"What's the Twitter sentiment right now around 'Fed interest rate decision'? Give me the aggregate distribution and average score so I can see how the market is reacting."}],"resultDescription":"Returns a list of matched tweets each with an individual sentiment score, plus an aggregate summary showing the percentage of positive, neutral, and negative tweets and the overall average sentiment score across the result set.","failureModes":["Missing or invalid X_BEARER_TOKEN returns authentication error","Query returns no results for very niche or misspelled search terms","Rate limits on the underlying X API may cause timeouts or partial results","Language filter may reduce result set to zero if the language is underrepresented","Very short or ambiguous queries may produce noisy or unreliable sentiment scores"],"whenToPreferThis":"Use this endpoint when you need real-time public opinion data from X/Twitter about a specific topic, brand, keyword, or asset — especially for crypto sentiment, brand monitoring, or event reaction analysis. It is read-only and provides both granular per-tweet scores and a high-level aggregate, making it ideal for dashboards or agent decision loops. Prefer this over general web sentiment tools when Twitter-specific public discourse is the signal you need.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:36:09.175Z","isFirstParty":false,"canonicalSlug":"x-twitter-sentiment-analysis-api-ca1cb698"}