# API Direct - Get Twitter/X User Tweets

> API Direct - Get Twitter/X User Tweets is a paid API for AI agents from x402.apidirect.io, paid per call via x402, $0.007/call, status unknown (last checked 2026-10-30).

Fetches tweets posted by a specific Twitter/X user by username, with optional AI sentiment analysis per tweet.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/twitter/user/tweets?utm_source=zero.xyz
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-direct-get-twitter-x-user-tweets-83607039
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dua0RogRS55uYoy5-wllV

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 api-direct-get-twitter-x-user-tweets-83607039
```

Example prompt: Pull the last 3 pages of tweets from the Twitter account @elonmusk and include sentiment analysis on each tweet so I can see the emotional tone.

## When to prefer this

Choose this endpoint when you need to retrieve the public tweet history of a specific known Twitter/X user by username, especially when you also want AI-powered sentiment and emotion analysis per tweet. It supports pagination up to 20 pages and merges results into a single response, making it ideal for bulk collection. Prefer this over general Twitter search endpoints when you know the exact account and want their timeline rather than keyword-based results.

## Known failure modes

- Invalid or non-existent username returns an error or empty result
- Username with leading @ is stripped automatically but malformed inputs may fail
- Requesting more than 20 pages is rejected by schema validation
- Private or suspended Twitter accounts may return no results
- Rate limits or Twitter API downtime may cause upstream failures
- Sentiment analysis may be unavailable for very short or non-textual tweets

## How this service works

Get tweets posted by a specific Twitter/X user.

## Output

Returns a merged list of tweets from the specified user across the requested number of pages. Each tweet includes standard tweet data (text, timestamp, engagement metrics, etc.). When sentiment analysis is enabled, each tweet also includes a sentiment object with eight emotion scores (joy, trust, fear, surprise, sadness, disgust, anger, anticipation each scored 0-100), a dominant emotion, an emotional intensity score (0-10), and a polarity label (positive, negative, or neutral).

## 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": [
      "username"
     ],
     "properties": {
      "pages": {
       "type": "integer",
       "default": 1,
       "maximum": 20,
       "minimum": 1,
       "description": "Number of pages to fetch and merge into one response (1-20, billed per page). Fetching stops early when there are no more results."
      },
      "username": {
       "type": "string",
       "maxLength": 50,
       "description": "Twitter username without the @ symbol (max 50 characters). A leading @ is accepted and stripped."
      },
      "get_sentiment": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to add AI emotion analysis to each tweet. Adds a `sentiment` object containing `emotions` (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), `dominant_emotion`, `emotional_intensity` (0-10), and `polarity` (positive, negative or neutral). Any tweet"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-direct-get-twitter-x-user-tweets-83607039/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.apidirect.io](https://www.zero.xyz/host/x402.apidirect.io/llms.txt)
