# X Sentiment Search API (x402.agentutility.ai)

> X Sentiment Search API (x402.agentutility.ai) 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-20).

Searches recent public X (Twitter) posts for a query and returns positive, neutral, and negative sentiment scores with aggregate distribution.

## Facts

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

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-sentiment-search-api-x402-agentutility-ai-88294fb7 -d '<json body>'
```

Example prompt: Can you check how people on X are feeling about 'OpenAI GPT-5' right now — I want to see the breakdown of positive, neutral, and negative posts from recent tweets?

## When to prefer this

Choose this endpoint when you need a quick, cost-effective sentiment snapshot of recent public X posts for a keyword, hashtag, or brand name, and want pre-computed positive/neutral/negative classification without building your own NLP pipeline. It is ideal for agents that need real-time social listening on X without managing X API credentials or sentiment models themselves. Prefer alternatives if you need full tweet text retrieval, historical data beyond recent posts, or sentiment from platforms other than X.

## Known failure modes

- Query returns no recent posts — empty result set with zero counts
- X API v2 rate limit exceeded — upstream API error returned
- Invalid or overly complex search query rejected by X API
- Ambiguous query yields mixed or unexpected sentiment due to topic polysemy
- Service temporarily unavailable if X API credentials are expired or revoked

## How this service works

X sentiment search / Twitter sentiment monitor / social listening API. Runs X API v2 recent search for a query and scores public posts locally for positive, neutral, and negative sentiment, with result counts and aggregate distribution.

## Output

Returns counts of recent X posts classified as positive, neutral, and negative for the given query, along with an aggregate sentiment distribution showing the proportion of each sentiment category across the sampled posts.

## 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-sentiment-search-api-x402-agentutility-ai-88294fb7/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)
