# Agent402: X User Tweets Fetcher

> Agent402: X User Tweets Fetcher is a paid API for AI agents from agent402.tools, paid per call via x402, $0.08/call, status unknown (last checked 2026-09-13).

Fetches recent tweets from a specified X (Twitter) user by user ID or username, with filtering and pagination support, billed per call via x402/USDC.

## Facts

- Endpoint: POST https://agent402.tools/api/x-user-tweets
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-x-user-tweets-fetcher-e8ded76a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RMeWEjkj6x1gjCmoUX2xf

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 agent402-x-user-tweets-fetcher-e8ded76a -d '<json body>'
```

Example prompt: Can you fetch the last 10 tweets from the Coinbase X account — skip any replies or retweets — and show me the text, likes, and retweet counts for each?

## When to prefer this

Use this endpoint when you need structured, paginated access to a specific X user's recent tweet timeline with engagement metrics, without managing X API credentials or OAuth flows. Prefer it over direct X API access when your agent uses x402/USDC micro-payments and needs a no-signup, wallet-authenticated path. Ideal for social listening, content monitoring, or brand tracking pipelines that require per-tweet metrics in a single call.

## Known failure modes

- Invalid or non-existent username/user ID returns an error or empty result
- Username resolution failure if the X handle has changed or been suspended
- max_results outside the allowed range (5–10) may be clamped or rejected
- Missing both id and username fields results in a validation error
- Upstream X API rate limits or outages cause downstream failures
- Pagination token expired or invalid returns an error

## How this service works

Fetch an X (Twitter) account's most recent tweets by user id or username (username is resolved first). Options to exclude retweets and replies, page with pagination_token, or fetch only tweets newer than since_id. Each tweet carries text, created time, language and engagement metrics.

## Output

A JSON object containing the resolved user profile (id, name, username, verified status), a count of returned tweets, the source identifier (x-api-v2), and an array of tweet objects each with tweet ID, URL, language, full text, author details, engagement metrics (likes, quotes, replies, retweets, bookmarks, impressions), author ID, creation timestamp, conversation ID, and sensitivity flag. Also includes a fetchedAt timestamp and an optional nextToken for pagination.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "description": "Numeric X user id. Provide id OR username."
  },
  "since_id": {
   "type": "string",
   "description": "Only tweets with an id greater than this."
  },
  "username": {
   "type": "string",
   "description": "X username (resolved to an id first). Provide id OR username."
  },
  "max_results": {
   "type": "number",
   "description": "Tweets per page, 5-10 (default 10). The upstream bills per post returned, so the page size is capped."
  },
  "exclude_replies": {
   "type": "boolean",
   "description": "Drop replies (default false)."
  },
  "exclude_retweets": {
   "type": "boolean",
   "description": "Drop retweets (default false)."
  },
  "pagination_token": {
   "type": "string",
   "description": "Pagination token from a previous response."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "user": {
   "id": "574032254",
   "name": "Coinbase",
   "username": "coinbase",
   "verified": true
  },
  "count": 1,
  "source": "x-api-v2",
  "tweets": [
   {
    "id": "20",
    "url": "https://x.com/coinbase/status/1800000000000000000",
    "lang": "en",
    "text": "just setting up my twttr",
    "author": {
     "name": "Coinbase",
     "username": "coinbase",
     "verified": true
    },
    "metrics": {
     "likes": 180000,
     "quotes": 30000,
     "replies": 10000,
     "retweets": 120000,
     "bookmarks": 5000,
     "impressions": 0
    },
    "authorId": "574032254",
    "createdAt": "2006-03-21T20:50:14.000Z",
    "conversationId": "20",
    "possiblySensitive": false
   }
  ],
  "fetchedAt": "2026-08-20T14:10:00.000Z",
  "nextToken": "7140dibdnow9c7btw4xxxxx"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-x-user-tweets-fetcher-e8ded76a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
