WEIR

X API for AI agents

A Twitter (X) API your AI agent can call by itself.

Give Claude, ChatGPT, Cursor, Codex or your own agent live X (Twitter) and Reddit data through one MCP server URL or a plain REST API. The agent searches posts, reads threads and looks up profiles. You pay per result, and a call that fails costs nothing.

5,000 free credits every month · no card needed

What is the best Twitter API for AI agents?

It depends on what the agent must do. To post or manage an account, use X's official API, which is pay-per-use at $5.00 per 1,000 posts read and needs a developer app. To read public posts, a data API with an MCP server is less work: the agent connects by URL and a person signs in once, so no developer app is needed and no key sits in a prompt. Weir is one of these: about 45 read-only tools for X and Reddit, billed per result, with 5,000 free credits a month.

Updated November 2026.

Why agents struggle with X data

An agent cannot scroll a timeline. X's own API works, but someone has to create a developer app, buy credits, and put keys where the agent can reach them, and its search needs query syntax and pagination tokens the model must get right every time. Without that, an agent answers from training data that is months old, or says it cannot see X at all.

Source: X API pricing, docs.x.com (checked November 2026).

Connect by URL, not by key

Paste https://api.weirapp.io/mcp into Claude, ChatGPT, Cursor or Codex and sign in once. Agents that run without a person send a Weir key in a header instead.

Tools a model can use

search_x, get_x_thread, get_x_user and about 40 more. Each has a short description and a stated price, and each error says what to do next: retry after so many seconds, or stop and tell the user.

Small answers

Results come back in X's own field names, 10 posts by default over MCP, so a search costs the model a few hundred tokens, not a page of HTML. Filters go in the query, so the agent does not pay for posts it would throw away.

A hard stop on spend

1 credit per post plus 1 per call, and failed calls are free. Credits are prepaid, so an agent in a loop cannot run up a bill: at zero it gets a 402 that tells it to stop.

Add the server once, then ask in plain words

claude mcp add --transport http weir https://api.weirapp.io/mcp
# In a session, sign in with /mcp, then ask:
#   What are developers saying about MCP on X this week? Top 10 by likes.
# The agent calls the search_x tool with:
#   {"query": "MCP", "minLikes": 100, "sort": "top", "limit": 10}
# and gets 10 posts for 11 credits.

Every endpoint and its parameters are in the docs.

What it costs

ResultCreditsPer 1,000 results
X post1$0.10–$0.20
X profile2$0.20–$0.40
X follower / user in a list1$0.10–$0.20
Reddit post or comment3$0.30–$0.60

Plus one credit per request. 5,000 credits free every month; prepaid packs from $5 that never expire; failed calls are free. Full pricing

Questions

Which AI agents can use it?

Any client that speaks MCP over Streamable HTTP: Claude on the web, desktop and mobile, Claude Code, ChatGPT, Cursor, Codex, VS Code and Gemini CLI, and frameworks such as LangGraph, CrewAI and the OpenAI Agents SDK. The integrations page has setup guides for more than 40 of them. Anything else can call the REST API.

Does the agent need an X account or an X API key?

No. In a chat app, a person signs in to Weir once and approves the connection. An agent that runs alone sends a Weir API key in an Authorization header. No X account or X developer app is involved.

Can the agent post, like or follow?

No. Weir is read-only: it searches and reads public posts, threads, replies, profiles, followers and Lists. To post, use X's official API.

What does one question cost?

A search that returns 10 posts costs 11 credits: 1 per post and 1 for the call. A research prompt with a few searches and a thread is usually about 150 credits. Every account gets 5,000 free credits a month, and packs start at $5 for 25,000 credits.

What happens when credits run out?

The tool returns a 402 error that names the day the free credits return and links to the page that sells packs. It is marked as not retryable, so an agent that follows the error stops and tells you instead of looping.

Is this the official X API?

No. Weir is an independent service and is not affiliated with X Corp. It reads public data only.