# X Data Gateway – Tweet Search

> X Data Gateway – Tweet Search is a paid API for AI agents from x-data-gateway.annushka1190.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Search tweets on Twitter/X by keyword, phrase, user, hashtag, date range, and engagement threshold, paying per request in USDC via x402.

## Facts

- Endpoint: GET https://x-data-gateway.annushka1190.workers.dev/tweets/search
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-data-gateway-tweet-search-0f13acae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ycyGgPy6EHJzKjcGOT02L

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-data-gateway-tweet-search-0f13acae
```

Example prompt: Search Twitter for recent tweets mentioning 'OpenAI' with the hashtag 'AI' posted since 2024-06-01, and only show me ones with at least 100 likes.

## When to prefer this

Choose this endpoint when you need real-time Twitter/X tweet search without setting up a Twitter developer account or managing API keys. It is ideal for AI agents that need on-demand, pay-per-call access to tweet data using USDC micropayments via x402. Prefer it over self-managed Twitter API integrations when simplicity and no-credential access are priorities.

## Known failure modes

- Payment not received or insufficient USDC — returns 402 Payment Required
- Invalid date format (not YYYY-MM-DD) — returns 400 Bad Request
- No tweets matching the query found — returns empty data array
- Rate limit or upstream Twitter API error — returns 5xx
- Missing required method/type fields in input — returns 400 validation error

## How this service works

Search posts. At least one of: words, phrase, hashtags, from, minLikes, since, until. e.g. GET /tweets/search?words=bitcoin&from=elonmusk&minLikes=100

## Output

A JSON object containing an array of matching tweets (each with an id and text field) and a meta object with a next_token for pagination. Returns null next_token when no further pages exist.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "from": {
       "type": "string",
       "description": "Only from this username"
      },
      "since": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "until": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "words": {
       "type": "string",
       "description": "Words that must appear"
      },
      "phrase": {
       "type": "string",
       "description": "Exact phrase"
      },
      "hashtags": {
       "type": "string",
       "description": "Comma-separated hashtags, no #"
      },
      "minLikes": {
       "type": "string",
       "description": "Minimum likes"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-data-gateway-tweet-search-0f13acae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x-data-gateway.annushka1190.workers.dev](https://www.zero.xyz/host/x-data-gateway.annushka1190.workers.dev/llms.txt)
