# AgentUtility Twitter/X Search (x402)

> AgentUtility Twitter/X Search (x402) is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Searches recent public posts on X (Twitter) using the X API v2, returning post text, author profiles, timestamps, and public engagement metrics — excluding retweets by default.

## Facts

- Endpoint: POST https://x402.agentutility.ai/twitter-search
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-twitter-x-search-x402-bc2f0b5f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hvAVcR9zGT-tL-39LNmiJ

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 agentutility-twitter-x-search-x402-bc2f0b5f -d '<json body>'
```

Example prompt: Search X for the most recent public posts mentioning 'AI agents' — exclude retweets and give me the post text, author usernames, and like/retweet counts.

## When to prefer this

Choose this endpoint when you need programmatic, pay-per-call access to recent public X/Twitter posts without managing your own X API credentials or developer account. It is ideal for AI agents that need real-time social listening, trend monitoring, or brand tracking on X with per-call USDC micropayments via the x402 protocol, especially within autonomous agent pipelines on Base.

## Known failure modes

- Query returns no results if the search term has no recent activity
- Rate limits or quota exhaustion from the underlying X API v2
- Payment failure if USDC balance is insufficient (x402 protocol)
- Invalid or malformed query syntax returns an error
- X API downtime or temporary unavailability propagates as a server error

## How this service works

Repeat a saved X/Twitter search query to monitor a brand, topic, or phrase over time. Send the same query, language, and max_results on each check; it returns recent public post text, timestamps, metrics, and expanded author profiles. Legacy Twitter search operators such as since:, until:, and -filter:retweets are normalized before the read-only X API v2 call. If X access is unavailable, the same tweets array returns clearly labeled public-index results with degraded status instead of an empty paid response. Use it as a Twitter search API, saved-query monitor, X recent-post search, or public-post watchlist.

## Output

Returns a list of recent public posts matching the query, each including post text, author profile fields (username, display name, follower count), timestamp, and public metrics such as like count, retweet count, and reply count. Retweets are excluded by default.

## 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/Twitter 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. 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": {
      "mode": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "result_count": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "search",
  "source": "X API v2 recent search",
  "result_count": 10
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-twitter-x-search-x402-bc2f0b5f/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)
