# x402.twit.sh - Get User Timeline Tweets

> x402.twit.sh - Get User Timeline Tweets is a paid API for AI agents from x402.twit.sh, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-14).

Fetches the most recent tweets from a specific Twitter/X user's timeline by their screen name, with pagination support.

## Facts

- Endpoint: GET https://x402.twit.sh/tweets/user?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-twit-sh-306c24f5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MOkWt6Zs1XCP31_8vf5uz

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 x402-twit-sh-306c24f5
```

Example prompt: Can you pull the latest tweets from @naval's Twitter timeline — show me the most recent posts?

## When to prefer this

Use this endpoint when you need to read the recent tweet history of a known Twitter/X user by their screen name. Prefer this over search endpoints when you want a specific user's own posts rather than tweets about a topic. Ideal for monitoring a specific account's activity, summarizing what someone has been saying, or paginating through their recent history.

## Known failure modes

- Username not found — returns 404 or empty result if the screen name doesn't exist
- Private/protected account — tweets not accessible, returns error or empty data
- Rate limiting or payment failure — returns 402 or 429 if quota exceeded
- Invalid pagination token — returns error if next_token is malformed or expired
- Missing required username parameter — returns 400 bad request

## How this service works

Get the latest tweets (timeline) from a specific Twitter/X user by their username. Returns up to 20 tweets per page sorted by most recent first, with pagination support. Query params: username (string, required) - Twitter screen name; next_token (string, optional) - pagination cursor, e.g. GET /tweets/user?username=elonmusk. Returns X v2 API-compatible JSON.

## Output

Returns an X v2 API-compatible JSON object containing up to 20 of the user's most recent tweets sorted by newest first, including tweet text, IDs, timestamps, and a next_token cursor for paginating to older tweets.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "username": "nasa"
  }
 }
}
```

## 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": [
      "username"
     ],
     "properties": {
      "username": {
       "type": "string",
       "description": "Twitter screen name (without @)"
      },
      "next_token": {
       "type": "string",
       "description": "Pagination cursor from previous response"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "id": "1110302988",
    "text": "Running bitcoin",
    "author": {
     "id": "9253672",
     "name": "Hal Finney",
     "username": "halfin"
    },
    "created_at": "2009-01-11T03:39:18.000Z",
    "public_metrics": {
     "like_count": 134000,
     "quote_count": 3500,
     "reply_count": 5400,
     "retweet_count": 32000
    }
   }
  ],
  "meta": {
   "next_token": "abc123"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-twit-sh-306c24f5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.twit.sh](https://www.zero.xyz/host/x402.twit.sh/llms.txt)
