SocialToAIStart freeConsole

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.

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, checked 2026-10-17. What a platform allows changes; its own pages are the authority.

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, ChatGPT, Claude Code, Cursor and Codex. Each call costs a fixed number of credits, and a failed call costs nothing.

InterfaceWhat it returnsPrice keyCredits
SearchFind posts by keyword: text, author, likes, comment count, views and publish time.x.search2
Search · sort=latestFind posts by keyword: text, author, likes, comment count, views and publish time.x.search:latest2
Search · type=userFind accounts by keyword: name, bio, followers, following and post count.x.search:user5
TrendingWhat is trending now: title, rank and heat.x.trending6
DetailOne post by ID or link: text, author, likes, comment count, views and publish time.x.detail1
CommentsThe comments under one post: text, likes, reply count and time.x.comments2
User ProfileOne account: name, bio, followers, following and post count.x.user_profile1
User PostsThe recent posts of one account.x.user_posts2
Community profileGet an X community by its ID.x.community1
Community postsGet a page of the posts in an X community by the community's ID.x.community_posts4
List postsGet a page of the posts on an X list's timeline by the list's ID, newest first, about 100 a page.x.list_posts2
Article detailGet the long-form article attached to an X post by the post's ID.x.article2

8 more on the X (Twitter) API page.

One call: Search
curl https://api.socialtoai.com/v1/search \  -H "Authorization: Bearer $SOCIALTOAI_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.

Sources

Last updated: