# TwitterAPI.io Advanced Tweet Search

> TwitterAPI.io Advanced Tweet Search is a paid API for AI agents from api.twitterapi.io, paid per call via x402, $0.006/call, status unknown (last checked 2026-12-03).

Search X (Twitter) tweets using advanced query syntax, returning paginated tweet results with author info

## Facts

- Endpoint: GET https://api.twitterapi.io/x402/twitter/tweet/advanced_search?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/twitterapi-io-advanced-tweet-search-c14623dd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zI1yJCeinhplbDXUMZ59c

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 twitterapi-io-advanced-tweet-search-c14623dd
```

Example prompt: Search X for the latest tweets about 'climate change policy' using TwitterAPI.io's advanced search and show me the most recent results.

## When to prefer this

Choose this endpoint when you need programmatic access to X tweet search with advanced query syntax (Boolean operators, from:, to:, since:, until:, etc.) and need paginated results with author metadata. Prefer it over scraping or unofficial tools when you need reliable, structured tweet data at scale with predictable per-call pricing.

## Known failure modes

- Missing required 'query' parameter returns a 400 validation error
- Invalid or expired cursor returns an error or restarts pagination
- Rate limits or quota exhaustion returns a 402 or 429 response
- Overly broad queries may return empty results for niche topics
- Payment not processed (insufficient USDC balance) results in a 402 error

## How this service works

TwitterAPI.io docs: REST API for X (Twitter) data, covering tweet search, users, followers, replies, lists, communities and trends. Authenticate with an X-API-Key header.

## Output

Returns a JSON array of tweets, each with an ID, text content, author username, and creation timestamp, plus a next_cursor string and has_next_page boolean for paginating through additional results.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "Search query, same syntax as X advanced search"
      },
      "cursor": {
       "type": "string",
       "description": "Cursor from the previous page; omit for the first page"
      },
      "queryType": {
       "enum": [
        "Latest",
        "Top"
       ],
       "type": "string",
       "description": "Sort order, default Latest"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tweets": [
   {
    "id": "1850000000000000000",
    "text": "...",
    "author": {
     "userName": "nasa"
    },
    "createdAt": "..."
   }
  ],
  "next_cursor": "...",
  "has_next_page": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/twitterapi-io-advanced-tweet-search-c14623dd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.twitterapi.io](https://www.zero.xyz/host/api.twitterapi.io/llms.txt)
