# Does X (Twitter) have an API?

Yes: X sells an official API for posts, users and search, paid per use from prepaid credits. SocialToAI reads its publicly visible posts, comments, accounts and trends without a X developer account: 20 interfaces from 1 credit a call (≈ $0.002–$0.0033), and failed calls are free. Official facts checked 2026-10-17.

- Page: https://socialtoai.com/does-x-have-an-api/
- Last updated: 2026-10-29

## The short answer

Yes: X sells an official API for posts, users and search, paid per use from prepaid credits.

## What the official API allows

X offers an official API for posts, users and search. Developers sign up in the X developer console and pay per use with prepaid credits; higher volumes need an Enterprise plan.

Source: [X's own developer documentation](https://docs.x.com/x-api/getting-started/pricing), checked 2026-10-17. What a platform allows changes; its own pages are the authority.

## X's official APIs, side by side

| Official API | Who can use it and how | Cost | Limits | Source |
| --- | --- | --- | --- | --- |
| X API, pay per use | Any developer: sign up in the X developer console and buy prepaid credits. | $0.005 per post read, $0.010 per user read, charged per resource returned. | Up to 3 million post reads per billing cycle; more needs an Enterprise plan. X says prices may change. | [docs.x.com](https://docs.x.com/x-api/getting-started/pricing), checked 2026-10-29 |

## Reading X's public data with SocialToAI

SocialToAI is an API and MCP server for publicly visible content and account information. You need no X account and no app review: one SocialToAI key, or signing in from [Claude](https://socialtoai.com/connect/claude.md), [ChatGPT](https://socialtoai.com/connect/chatgpt.md), [Claude Code](https://socialtoai.com/connect/claude-code.md), [Cursor](https://socialtoai.com/connect/cursor.md) and [Codex](https://socialtoai.com/connect/codex.md). Each call costs a fixed number of credits, and a failed call costs nothing.

| Interface | What it returns | Price key | Credits |
| --- | --- | --- | --- |
| [Search](https://socialtoai.com/x-search-api.md) | Find posts by keyword: text, author, likes, comment count, views and publish time. | `x.search` | 2 |
| [Search · sort=latest](https://socialtoai.com/x-search-api.md) | Find posts by keyword: text, author, likes, comment count, views and publish time. | `x.search:latest` | 2 |
| [Search · type=user](https://socialtoai.com/x-search-api.md) | Find accounts by keyword: name, bio, followers, following and post count. | `x.search:user` | 5 |
| [Trending](https://socialtoai.com/x-trending-api.md) | What is trending now: title, rank and heat. | `x.trending` | 6 |
| [Detail](https://socialtoai.com/x-detail-api.md) | One post by ID or link: text, author, likes, comment count, views and publish time. | `x.detail` | 1 |
| [Comments](https://socialtoai.com/x-comments-api.md) | The comments under one post: text, likes, reply count and time. | `x.comments` | 2 |
| [User Profile](https://socialtoai.com/x-user-profile-api.md) | One account: name, bio, followers, following and post count. | `x.user_profile` | 1 |
| [User Posts](https://socialtoai.com/x-user-posts-api.md) | The recent posts of one account. | `x.user_posts` | 2 |
| [Community profile](https://socialtoai.com/x-community-api.md) | Get an X community by its ID. | `x.community` | 1 |
| [Community posts](https://socialtoai.com/x-community-posts-api.md) | Get a page of the posts in an X community by the community's ID. | `x.community_posts` | 4 |
| [List posts](https://socialtoai.com/x-list-posts-api.md) | Get a page of the posts on an X list's timeline by the list's ID, newest first, about 100 a page. | `x.list_posts` | 2 |
| [Article detail](https://socialtoai.com/x-article-api.md) | Get the long-form article attached to an X post by the post's ID. | `x.article` | 2 |

8 more on the [X (Twitter) API page](https://socialtoai.com/platforms/x.md).

**One call: Search**

```
curl https://api.socialtoai.com/v1/search \
  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "x",
    "query": "weather forecast"
  }'
```

- No X account, cookie or developer approval on your side.
- What comes back is what the platform shows publicly; commenters are anonymised.
- Every platform answers in the same response format, so the same code reads X and the others.
- Prepaid credits from 1 credit a call; 100 free credits on sign-up, no card.

## Reading X without the official API

There are three ways in, and they differ in what you have to hand over and keep running. These are kinds of tool, not products.

| Way | What you need | What to watch for |
| --- | --- | --- |
| Write your own scraper | Code, proxies, and often your own X login or cookies | Requests made in your account's name can get it limited or banned; pages and signatures change, so the code needs upkeep. |
| Run an open-source MCP server or script locally | Install it, then sign in with your account or paste its cookies | It reads as your account, and stops when the platform changes or your computer is off. |
| Call a hosted API (SocialToAI) | One SocialToAI key, or one MCP address and sign-in | No account of yours is used; you pay from 1 credit a call and nothing for a failed one; keeping up with X is our job. |

## FAQ

### How much does the X API cost?

X charges per resource returned from prepaid credits: $0.005 for each post read and $0.010 for each user read, so a thousand posts are $5. Source: [docs.x.com](https://docs.x.com/x-api/getting-started/pricing), checked 2026-10-29.

### Is there a cap on X API reads?

Yes: pay-per-use plans are capped at 3 million post reads per billing cycle, and more needs an Enterprise plan. Source: [docs.x.com](https://docs.x.com/x-api/getting-started/pricing), checked 2026-10-29.

### Can I read X without a developer account?

Yes. SocialToAI reads its publicly visible posts, comments, accounts and trends for you: 20 interfaces from 1 credit a call (≈$0.0033), and failed calls are free. You need one SocialToAI key, or sign-in from your AI client.

### Will reading X this way get my account banned?

No account of yours is involved: you never sign in to X, hand over a cookie or install anything, so nothing is read in your account's name.

### How much does reading X cost here?

From 1 credit a call: $0.0033 at the first pack, $3.33 for a thousand such calls. A failed call costs nothing, and every answer states what it charged. 100 free credits on sign-up, no card.

### Can Claude and ChatGPT read X?

Yes: add SocialToAI's MCP address in Claude or ChatGPT, sign in and press Allow, then ask in plain words. Each answer states the credits it used.

## Read next

- [How to let AI read X when the official API is too expensive](https://socialtoai.com/how-to/read-x-when-the-official-api-is-too-expensive.md): X's official prices, with sources, and reading X per call instead
- [X API pricing calculator](https://socialtoai.com/free-tools/x-api-cost-calculator.md): What X's own API charges for your volume.
- [Official social media API prices and limits](https://socialtoai.com/data/official-social-api-pricing.md): Every platform's official API on one page, with sources.

## Sources

- [X: docs.x.com](https://docs.x.com/x-api/getting-started/pricing), checked 2026-10-17
- [X (Twitter) API on SocialToAI](https://socialtoai.com/platforms/x.md): every call and its credits, last tested 2026-10-17
- [The live catalog](https://api.socialtoai.com/v1/capabilities): what is offered now and its credits, readable without a key

- [X (Twitter) API](https://socialtoai.com/platforms/x.md): Every call on X, with a request to copy.
- [X API cost calculator](https://socialtoai.com/free-tools/x-api-cost-calculator.md): A month of reads at X's prices, and per call.
- [X (Twitter) MCP server](https://socialtoai.com/mcp/x.md): Let your AI read X.
- [Claude](https://socialtoai.com/connect/claude.md): Connect Claude: sign in, no key.
- [ChatGPT](https://socialtoai.com/connect/chatgpt.md): Connect ChatGPT: sign in, no key.
