# AgentUtility X Search API

> AgentUtility X Search API 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) and returns post text, timestamps, engagement metrics, and author fields via X API v2

## Facts

- Endpoint: POST https://x402.agentutility.ai/x-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-x-search-api-154bac1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ksVfC9iwuIRSElqY_c6qw

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-x-search-api-154bac1f -d '<json body>'
```

Example prompt: Search X for recent public posts mentioning 'climate policy' in English, excluding retweets, and give me the text, timestamps, and engagement metrics for the top results.

## When to prefer this

Choose this endpoint when you need read-only search of recent public X/Twitter posts with structured metadata (text, timestamps, metrics, author). Ideal for social listening, brand monitoring, news pulse checks, and trend tracking. Prefer over scraping approaches when you need reliable structured output with engagement metrics. Not suitable if you need to post, reply, like, follow, or mutate any account state.

## Known failure modes

- X API v2 unavailable — returns public-index fallback results clearly marked as such
- Query returns no results — empty tweets array
- Invalid language code — may return unfiltered or error response
- Rate limit exceeded — may return error or throttled response
- Payment failure via x402 — request not processed

## How this service works

X search API for recent public posts. It uses read-only X API v2 when available, excludes retweets by default, supports a language filter, and returns post text, timestamps, metrics, and author fields. If X API access is unavailable, search mode returns clearly marked public-index results in the same tweets array. No posting, replying, liking, following, or account mutation. Use it as an X search API, Twitter search API, or public-post monitor.

## Output

Returns an array of tweets/posts, each containing the post text, creation timestamp, public engagement metrics (likes, retweets, replies), and expanded author fields. If X API v2 access is unavailable, falls back to clearly labeled public-index results in the same format.

## 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, 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. 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"
      },
      "tweets": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         },
         "text": {
          "type": "string"
         },
         "author": {
          "type": "object",
          "properties": {
           "username": {
            "type": "string"
           }
          }
         }
        }
       }
      },
      "result_count": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "search",
  "source": "X API v2 recent search",
  "tweets": [
   {
    "id": "123",
    "text": "x402 payments are live",
    "author": {
     "username": "agentutility_ai"
    }
   }
  ],
  "result_count": 10
 }
}
```

## More

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