> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twitterapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pay per call with x402 (no API key)

> Call selected twitterapi.io read endpoints without an account or API key: pay a fixed price per request in USDC on Base or Solana using the x402 HTTP payment standard.

AI agents and scripts can call our read-only endpoints without signing up. Each request is paid on its own, in USDC, using the open [x402](https://x402.org) standard (HTTP 402 Payment Required).

> [!NOTE]
>
> For regular or high-volume use, an [API key](https://docs.twitterapi.io/authentication.md) is cheaper per request. x402 is for no-signup, pay-as-you-go access.

## Endpoints and prices

| Endpoint | Parameters | Price per request | Same as |
| - | - | - | - |
| **Tweets** | | | |
| `GET https://api.twitterapi.io/x402/twitter/tweet/advanced_search` | `query` (required), `queryType`, `cursor`. One page of up to 20 tweets | \$0.006 | [Advanced Search](https://docs.twitterapi.io/api-reference/endpoint/tweet_advanced_search.md) |
| `GET https://api.twitterapi.io/x402/twitter/tweets` | `tweet_ids` (required): comma-separated tweet IDs, at most 20 | \$0.006 | [Tweets by IDs](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_by_ids.md) |
| `GET https://api.twitterapi.io/x402/twitter/tweet/replies` | `tweetId` (required), `cursor`, `queryType`, `sinceTime`, `untilTime`. Up to 20 replies | \$0.006 | [Tweet Replies](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_reply.md) |
| `GET https://api.twitterapi.io/x402/twitter/tweet/replies/v2` | `tweetId` (required), `cursor`, `queryType`. One large page of replies (up to about 140) | \$0.042 | [Tweet Replies V2](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_replies_v2.md) |
| `GET https://api.twitterapi.io/x402/twitter/tweet/quotes` | `tweetId` (required), `cursor`, `includeReplies`, `sinceTime`, `untilTime`. Up to 20 quotes | \$0.006 | [Tweet Quotes](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_quote.md) |
| `GET https://api.twitterapi.io/x402/twitter/tweet/retweeters` | `tweetId` (required), `cursor`. Up to 20 users | \$0.006 | [Tweet Retweeters](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_retweeter.md) |
| `GET https://api.twitterapi.io/x402/twitter/tweet/thread_context` | `tweetId` (required), `cursor` | \$0.018 | [Tweet Thread Context](https://docs.twitterapi.io/api-reference/endpoint/get_tweet_thread_context.md) |
| `GET https://api.twitterapi.io/x402/twitter/article` | `tweet_id` (required) | \$0.005 | [Article](https://docs.twitterapi.io/api-reference/endpoint/get_article.md) |
| **Users** | | | |
| `GET https://api.twitterapi.io/x402/twitter/user/info` | `userName` (required) | \$0.005 | [User Info](https://docs.twitterapi.io/api-reference/endpoint/get_user_by_username.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/batch_info_by_ids` | `userIds` (required): comma-separated user IDs, at most 20 | \$0.008 | [Batch User Info](https://docs.twitterapi.io/api-reference/endpoint/batch_get_user_by_userids.md) |
| `GET https://api.twitterapi.io/x402/twitter/user_about` | `userName` (required) | \$0.005 | [User About](https://docs.twitterapi.io/api-reference/endpoint/get_user_about.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/search` | `query` (required), `cursor`. Up to 20 users | \$0.008 | [Search Users](https://docs.twitterapi.io/api-reference/endpoint/search_user.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/last_tweets` | `userName` or `userId` (one required), `cursor`, `includeReplies`. One page of about 20 tweets | \$0.015 | [User Last Tweets](https://docs.twitterapi.io/api-reference/endpoint/get_user_last_tweets.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/tweet_timeline` | `userId` (required), `cursor`, `includeReplies`, `includeParentTweet` | \$0.018 | [User Timeline](https://docs.twitterapi.io/api-reference/endpoint/get_user_timeline.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/mentions` | `userName` (required), `cursor`, `sinceTime`, `untilTime`. Up to 20 tweets | \$0.006 | [User Mentions](https://docs.twitterapi.io/api-reference/endpoint/get_user_mention.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/articles` | `username` (required), `cursor` | \$0.005 | User Articles |
| `GET https://api.twitterapi.io/x402/twitter/user/followers` | `userName` (required), `cursor`. Up to 200 users | \$0.008 | [User Followers](https://docs.twitterapi.io/api-reference/endpoint/get_user_followers.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/followings` | `userName` (required), `cursor`. Up to 200 users | \$0.008 | [User Followings](https://docs.twitterapi.io/api-reference/endpoint/get_user_followings.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/verifiedFollowers` | `user_id` (required), `cursor`. Up to 20 users | \$0.005 | [Verified Followers](https://docs.twitterapi.io/api-reference/endpoint/get_user_verified_followers.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/followers_ids` | `userName` (required), `cursor`. Up to 5,000 user IDs (IDs only) | \$0.08 | [Follower IDs](https://docs.twitterapi.io/api-reference/endpoint/get_user_followers_ids.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/subscriptions` | `userId` (required), `cursor`. Up to 20 users | \$0.006 | [User Subscriptions](https://docs.twitterapi.io/api-reference/endpoint/get_user_subscriptions.md) |
| `GET https://api.twitterapi.io/x402/twitter/user/check_follow_relationship` | `source_user_name`, `target_user_name` (both required) | \$0.005 | [Check Follow Relationship](https://docs.twitterapi.io/api-reference/endpoint/check_follow_relationship.md) |
| **Lists, communities, Spaces and trends** | | | |
| `GET https://api.twitterapi.io/x402/twitter/list/tweets` | `listId` (required), `cursor`, `includeReplies`, `queryType`, `sinceTime`, `untilTime`. Up to 20 tweets | \$0.006 | [List Tweets](https://docs.twitterapi.io/api-reference/endpoint/get_list_tweet) |
| `GET https://api.twitterapi.io/x402/twitter/list/tweets_timeline` | `listId` (required), `cursor`. Up to 100 tweets | \$0.03 | [List Timeline](https://docs.twitterapi.io/api-reference/endpoint/list_timeline.md) |
| `GET https://api.twitterapi.io/x402/twitter/list/followers` | `list_id` (required), `cursor`. Up to 20 users | \$0.008 | [List Followers](https://docs.twitterapi.io/api-reference/endpoint/get_list_followers.md) |
| `GET https://api.twitterapi.io/x402/twitter/list/members` | `list_id` (required), `cursor`. Up to 20 users | \$0.008 | [List Members](https://docs.twitterapi.io/api-reference/endpoint/get_list_members.md) |
| `GET https://api.twitterapi.io/x402/twitter/community/info` | `community_id` (required) | \$0.005 | [Community Info](https://docs.twitterapi.io/api-reference/endpoint/get_community_by_id.md) |
| `GET https://api.twitterapi.io/x402/twitter/community/members` | `community_id` (required), `cursor`. Up to 20 users | \$0.008 | [Community Members](https://docs.twitterapi.io/api-reference/endpoint/get_community_members.md) |
| `GET https://api.twitterapi.io/x402/twitter/community/moderators` | `community_id` (required), `cursor`. Up to 20 users | \$0.008 | [Community Moderators](https://docs.twitterapi.io/api-reference/endpoint/get_community_moderators.md) |
| `GET https://api.twitterapi.io/x402/twitter/community/tweets` | `community_id` (required), `cursor`. Up to 20 tweets | \$0.006 | [Community Tweets](https://docs.twitterapi.io/api-reference/endpoint/get_community_tweets.md) |
| `GET https://api.twitterapi.io/x402/twitter/community/get_tweets_from_all_community` | `query` (required), `queryType`, `cursor` | \$0.009 | [Search All Communities](https://docs.twitterapi.io/api-reference/endpoint/get_all_community_tweets.md) |
| `GET https://api.twitterapi.io/x402/twitter/spaces/detail` | `space_id` (required) | \$0.005 | [Space Detail](https://docs.twitterapi.io/api-reference/endpoint/get_space_detail.md) |
| `GET https://api.twitterapi.io/x402/twitter/trends` | `woeid` (required, 1 = worldwide), `count` (1-50, default 30) | \$0.015 | [Trends](https://docs.twitterapi.io/api-reference/endpoint/get_trends.md) |

The response body is the same as the regular endpoint in the last column, and only the parameters listed above are used.

**Payment networks:** Base USDC and Solana USDC.

## How it works

1. Send the request with no payment. You get `HTTP 402` with a `PAYMENT-REQUIRED` header (base64 JSON) that lists the price, the accepted networks and the address to pay.
2. Your x402 client signs a payment for that exact amount and sends the same request again with the payment in the `PAYMENT-SIGNATURE` header.
3. The payment is verified, the data is fetched, and you get `HTTP 200` with the data.

```bash theme={null}
# Step 1: see the payment requirements (no payment, nothing is charged)
curl -i "https://api.twitterapi.io/x402/twitter/user/info?userName=elonmusk"

# Step 2: retry with the payment your x402 client created
curl "https://api.twitterapi.io/x402/twitter/user/info?userName=elonmusk" \
  -H "PAYMENT-SIGNATURE: <payment created by your x402 client>"
```

In practice, use any x402 v2 client library. It handles steps 1 and 2 for you.

## When you are not charged

The payment is only completed after the data request succeeds. You are **not** charged when the request returns an error, including:

* `HTTP 400` for a missing or invalid parameter, including more than 20 `tweet_ids` or `userIds`, or a `count` above 50;
* `HTTP 4xx` or `HTTP 502` when the data request fails.

A successful request is charged even if it returns no results. Tweet IDs that are deleted or not found are left out of the result, and the request is still charged. Every paginated endpoint returns one page per request; use `cursor` from the response to get the next page, and each page is a new paid request.

Each payment authorization can be used once. Sending the same payment again returns `HTTP 402` (`Payment already used`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.