# X Data Gateway – Fetch Tweets by ID

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

Retrieves full tweet data for up to 50 tweets by their numeric IDs from Twitter/X in real-time, billed per request in USDC via x402.

## Facts

- Endpoint: GET https://x-data-gateway.annushka1190.workers.dev/tweets
- Price: $0.007/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-fetch-tweets-by-id-87d2afbf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kzjaOarjV7QvcEBXnl9BS

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-fetch-tweets-by-id-87d2afbf
```

Example prompt: Can you fetch the full text and details for these tweets — IDs 1782345678901234567, 1782345678901234568, and 1782345678901234569?

## When to prefer this

Choose this endpoint when you need to fetch specific tweets by their known numeric IDs without a Twitter developer account or API key. It is ideal for AI agents needing pay-per-use access to tweet content with no subscription or credential setup. Prefer this over scraping or Twitter's own API when you want frictionless per-request billing in USDC and real-time data.

## Known failure modes

- Invalid or malformed tweet IDs return an error or empty data array
- More than 50 IDs provided may result in an error or truncated response
- Deleted or private tweets may return empty results or be omitted
- Payment failure via x402 protocol blocks the request entirely
- Non-numeric or incorrectly formatted ID strings cause validation errors

## How this service works

Up to 50 tweets by comma-separated IDs. e.g. GET /tweets?ids=20,21,22

## Output

Returns a JSON object containing an array of tweet data objects, each with at minimum the tweet's numeric ID and full text content. Up to 50 tweets can be returned in a single response.

## 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": [
      "ids"
     ],
     "properties": {
      "ids": {
       "type": "string",
       "description": "Comma-separated tweet IDs, max 50"
      }
     }
    }
   },
   "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-fetch-tweets-by-id-87d2afbf/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)
