# X / Twitter Tweet Sentiment Analyzer

> X / Twitter Tweet Sentiment Analyzer is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-23).

Fetches recent public X (Twitter) posts for a search query, excludes retweets, and returns per-tweet sentiment labels plus aggregate sentiment distribution and average score.

## Facts

- Endpoint: POST https://x402.agentutility.ai/tweet-sentiment?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-twitter-tweet-sentiment-analyzer-cef8b618
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8ZoZywNdahPoa6p3XAxcG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x-twitter-tweet-sentiment-analyzer-cef8b618 -d '<json body>'
```

Example prompt: Can you analyze the sentiment of recent tweets about 'Apple Vision Pro' and tell me the overall mood — how many are positive, negative, or neutral, and what the average sentiment score is?

## When to prefer this

Choose this endpoint when you need both raw per-tweet sentiment labels and aggregate sentiment statistics for a search query in a single call, rather than fetching tweets and running sentiment separately. It is ideal for brand monitoring, product launch reactions, and event tracking on X. Prefer it over generic sentiment APIs when you specifically want Twitter/X social data included automatically without managing your own X API credentials.

## Known failure modes

- Query returns no results — no recent public tweets matched the search term
- X/Twitter API rate limits or access restrictions result in empty or truncated results
- Ambiguous search query returns off-topic tweets, skewing sentiment results
- Payment failure via x402 protocol prevents the call from completing
- Network timeout if the X search or sentiment scoring takes longer than expected

## How this service works

Tweet sentiment analyzer / Twitter recent-search sentiment / X post sentiment API. Fetches recent public X posts for a query, excludes retweets, and returns per-tweet labels plus aggregate sentiment distribution and average score.

## Output

Returns a list of recent public X posts matching the query (retweets excluded), each labeled with a sentiment classification (positive, negative, or neutral) and a numeric sentiment score. Also returns aggregate statistics including the distribution of sentiment labels across all fetched tweets and the overall average sentiment score.

## Request schema (JSON Schema)

```json
{
 "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."
      },
      "language": {
       "type": "string",
       "description": "Optional two-letter language filter."
      },
      "max_results": {
       "type": "number",
       "description": "Number of recent posts to fetch, clamped to 10-50."
      }
     }
    },
    "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": {
      "distribution": {
       "type": "object",
       "properties": {
        "neutral": {
         "type": "integer"
        },
        "negative": {
         "type": "integer"
        },
        "positive": {
         "type": "integer"
        }
       }
      },
      "result_count": {
       "type": "integer"
      },
      "overall_sentiment": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "distribution": {
   "neutral": 5,
   "negative": 1,
   "positive": 4
  },
  "result_count": 10,
  "overall_sentiment": "positive"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-twitter-tweet-sentiment-analyzer-cef8b618/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
