Data APIs · X (Twitter)
X (Twitter) data APIs for AI agents
morigraph has 16 X (Twitter) data APIs that Claude, ChatGPT, Cursor, Codex or your own code can call, including profile, search, user posts and community. You need no X (Twitter) developer account or API key, only one morigraph connection. Calls cost from 0.002 credits, about $0.20 for 1,000 calls, paid from one balance.
- APIs
- 16
- Price
- 0.002 to 0.048 credits a call
- Call it from
- MCP, command line and HTTP API
- Needs
- One morigraph connection. No X (Twitter) account or API key
Three ways to call it
Every data API is run by one tool, data_api, with the API's id and its arguments. The example is Twitter Profile.
In your assistant (MCP). Connect once, then ask in plain words
claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp
Use morigraph's Twitter Profile data API with {"handle":"nasa"} and summarise what comes back.From a terminal or script (CLI)
npx @morigraph/cli@latest login
morigraph call data_api --json-args '{"api":"twitter.profile","input":{"handle":"nasa"}}'From your own code (HTTP API)
curl https://api.morigraph.com/v1/tools/data_api \
-H "Authorization: Bearer $MORIGRAPH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"twitter.profile","input":{"handle":"nasa"}}'16 X (Twitter) data APIs
| API | Id | Price |
|---|---|---|
| Twitter Profile | twitter.profile | 0.002 credits a call |
| X / Twitter Search | twitter.search | 0.009 credits a call |
| X / Twitter User Posts | twitter.user_posts | 0.008 credits a call |
| Twitter Community | twitter.community | 0.002 credits a call |
| Twitter Community Tweets | twitter.community_tweets | 0.009 credits a call |
| Twitter Tweet | twitter.tweet | 0.004 credits a call |
| Twitter Tweet Transcript | twitter.tweet_transcript | 0.024 credits a call |
| X / Twitter Article | twitter.article | 0.009 credits a call |
| X / Twitter Community Search | twitter.search_communities | 0.022 credits a call |
| X / Twitter Followers | twitter.followers | 0.009 credits a call |
| X / Twitter Following | twitter.following | 0.009 credits a call |
| X / Twitter Post Replies | twitter.replies | 0.007 credits a call |
| X / Twitter Trends | twitter.trends | 0.002 credits a call |
| X / Twitter Tweet Thread | twitter.thread | 0.048 credits a call |
| X / Twitter User Search | twitter.search_users | 0.009 credits a call |
| X / Twitter User Tweets and Replies | twitter.user_tweets | 0.007 credits a call |
Twitter Profile
Fetch a Twitter/X account's public profile (followers, tweets, bio, verification) by handle.
| Argument | Type | Required | What it is |
|---|---|---|---|
handle | string | yes | Twitter/X handle without the leading @. |
Returns avatarUrl bio coverUrl createdUtc displayName followers following handle id location mediaCount pinnedPostIds private tweets verified website
The call
data_api({"api":"twitter.profile","input":{"handle":"nasa"}})X / Twitter Search
Search X (Twitter) with full advanced-search syntax (operators like from:, since:, until:, min_faves: work inline in the query) and get structured tweets with text, author, engagement, and cursor pagination. Every call returns one full native page of about 20 tweets; follow nextCursor for more.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of search results. |
query | string | yes | Search query using X (Twitter) advanced-search syntax. IMPORTANT: bare terms are ANDed - a tweet must contain EVERY word, so a list of loosely related keywords matches nothing; use one short phrase or OR between alternatives (e.g. 'anyap… |
queryType | Latest | Top | Photos | Videos | no | Which posts to return: 'Latest' (newest first, the default), 'Top' (most popular), 'Photos' (newest posts with images), or 'Videos' (newest posts with video). Photos and Videos search your query as written with filter:images or filter:vi… |
Returns authorFollowers authorId authorImage authorName authorUsername authorVerified bookmarkCount conversationId createdUtc id inReplyToId isReply lang likeCount media nextCursor quoteCount replyCount retweetCount text url viewCount
The call
data_api({"api":"twitter.search","input":{"query":"openai"}})X / Twitter User Posts
Get an X (Twitter) account's profile Posts-tab timeline by handle. Results follow profile order: a pinned post may appear first, followed by otherwise reverse-chronological authored posts, reposts, quotes, and self-thread continuations.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page. |
handle | string | yes | Twitter/X handle without the leading @. |
Returns authorHandle authorId authorImage authorName bookmarks conversationId createdUtc id isPinned isReply lang likes media nextCursor quotes replies retweets source text tweets url views
The call
data_api({"api":"twitter.user_posts","input":{"handle":"levelsio"}})Twitter Community
Fetch a Twitter/X community's public details (name, description, member count, join policy) by URL.
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | Community URL (e.g. https://x.com/i/communities/1926186499399139650). |
Returns createdUtc creatorHandle description id joinPolicy memberCount name nsfw rules
The call
data_api({"api":"twitter.community","input":{"url":"https://x.com/i/communities/1926186499399139650"}})Twitter Community Tweets
List tweets posted in a Twitter/X community by URL: top tweets by default, or the newest with sort=latest.
| Argument | Type | Required | What it is |
|---|---|---|---|
sort | top | latest | no | top returns ranked tweets chosen by the source; the time window they cover varies by source. latest returns the newest tweets first; fewer sources serve it and it can cost more. Default "top". |
url | string | yes | Community URL (e.g. https://x.com/i/communities/1926186499399139650). |
Returns authorHandle authorName authorVerified createdUtc favoriteCount id lang quoteCount replyCount retweetCount text tweets views
The call
data_api({"api":"twitter.community_tweets","input":{"url":"https://x.com/i/communities/1926186499399139650"}})Twitter Tweet
Fetch a single Twitter/X tweet by URL with its full text and engagement counts (likes, retweets, replies, quotes, bookmarks, views).
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | Canonical x.com or twitter.com status URL with a numeric tweet ID, including /i/web/status and media-share variants. |
Returns authorHandle authorId authorImage authorName authorVerified bookmarks conversationId createdUtc height id inReplyToId lang likes media quotes replies retweets text type url videoUrl views width
The call
data_api({"api":"twitter.tweet","input":{"url":"https://x.com/SpaceX/status/1732824684683784516"}})Twitter Tweet Transcript
Extract the spoken transcript from a Twitter/X video tweet by URL.
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | Tweet URL of the video to transcribe (e.g. https://x.com/TheoVon/status/1916982720317821050). |
Returns transcript
The call
data_api({"api":"twitter.tweet_transcript","input":{"url":"https://x.com/TheoVon/status/1916982720317821050"}})X / Twitter Article
Get a public X long-form article from its wrapper post URL, including its author, engagement, cover image, and structured content blocks.
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | Canonical x.com or twitter.com URL of the public wrapper post for an X Article. |
Returns author contentBlocks coverImage createdUtc entities height id image inlineStyles likes previewText quotes replies text title type views width
The call
data_api({"api":"twitter.article","input":{"url":"https://x.com/Decentralisedco/status/1905545699552375179"}})X / Twitter Community Search
Search X (Twitter) communities by keyword and get their id, name, topic, and member count with cursor pagination. This is how you find a community URL to pass to twitter.community or twitter.community_tweets.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of communities. |
query | string | yes | Keyword to match against X (Twitter) community names and topics (e.g. artificial intelligence). |
Returns communities id memberCount name nextCursor nsfw topic url
The call
data_api({"api":"twitter.search_communities","input":{"query":"artificial intelligence"}})X / Twitter Followers
Fetch the follower list of any public X (Twitter) account by username with cursor pagination. Limit is a per-page maximum and a native page holds up to 200 accounts; follow the response's nextCursor for more.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followers. |
limit | integer | no | Accepted but does not change the page: every call returns one full native page of followers (up to 200, depending on the source), never trimmed, so follow nextCursor to continue exactly where this response ended. Default 200. |
username | string | yes | The X (Twitter) username to fetch followers for, without the @ prefix (e.g. elonmusk). |
Returns avatarUrl bio createdUtc followers following id location name nextCursor username verified
The call
data_api({"api":"twitter.followers","input":{"limit":200,"username":"nasa"}})X / Twitter Following
List the accounts a public X (Twitter) account follows by username with cursor pagination. Limit is a per-page maximum; follow the response's nextCursor for more.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followed accounts. |
limit | integer | no | Accepted but does not change the page: every call returns one full native page of followed accounts (about 50), never trimmed, so follow nextCursor to continue exactly where this response ended. Default 200. |
username | string | yes | The X (Twitter) username to fetch the following list for, without the @ prefix (e.g. elonmusk). |
Returns avatarUrl bio createdUtc followers following id location name nextCursor posts username
The call
data_api({"api":"twitter.following","input":{"limit":200,"username":"nasa"}})X / Twitter Post Replies
Fetch the replies to any X (Twitter) post URL as structured records: author, text, and engagement. An empty result is valid and does not assert whether the target post exists.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of replies. |
limit | integer | no | Most replies to return (1-40, default 40). Ignored on sources that page: each call returns one full page of up to about 36 replies, never trimmed; follow nextCursor for more. Sources that cannot page return up to `limit` replies in one c… |
url | string | yes | Full URL of the X (Twitter) post to fetch replies for (e.g. https://x.com/nasa/status/1846987139428634858). |
Returns authorHandle authorName conversationId createdUtc id likeCount media nextCursor quoteCount replyCount repostCount text url viewCount
The call
data_api({"api":"twitter.replies","input":{"url":"https://x.com/jack/status/20"}})X / Twitter Trends
Get current X (Twitter) trends for worldwide, a country, or a city in X ranking order, including the resolved location.
| Argument | Type | Required | What it is |
|---|---|---|---|
limit | integer | no | Maximum number of ranked trends to return (1-50, default 50). |
location | string | no | Country name, city name, or ISO country code. Omit for worldwide trends. |
Returns asOfUtc isHashtag location locationId name promoted query rank url
The call
data_api({"api":"twitter.trends","input":{"limit":10,"location":"US"}})X / Twitter Tweet Thread
Resolve the linear self-thread containing an X (Twitter) post, from its root through the author's linked continuations. This excludes replies from other users.
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | Canonical x.com or twitter.com status URL with a numeric tweet ID. Any tweet in the self-thread can be supplied; the provider resolves the thread root. |
Returns author authorHandle authorId authorName bookmarkCount complete conversationId createdUtc id inReplyToId isReply lang likeCount media quoteCount replyCount repostCount source text threadLength tweets url viewCount
The call
data_api({"api":"twitter.thread","input":{"url":"https://x.com/SpaceX/status/1732824684683784516"}})X / Twitter User Search
Search X (Twitter) accounts by keyword - the People tab of X search. Matches handles, display names, and profile bios, and returns normalized profile records with follower, following, and post counts plus cursor pagination. Use twitter.search for posts.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of accounts. |
query | string | yes | Keyword to match against X (Twitter) handles, display names, and profile bios. This is the People tab of X search: pass a topic ('ai agents'), a name ('Elon Musk'), or a handle ('openai') and get back accounts, not posts. Use twitter.sea… |
Returns avatarUrl bio canDm coverUrl createdUtc followers following id listedCount location name nextCursor posts profileUrl username users verified
The call
data_api({"api":"twitter.search_users","input":{"query":"ai agents"}})X / Twitter User Tweets and Replies
Get the tweets and replies authored by an X (Twitter) account, with engagement, views, language, and cursor pagination. Every call returns one full native page of about 20 tweets; follow nextCursor for more.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page. |
handle | string | yes | Twitter/X handle without the leading @. |
Returns authorHandle authorId authorImage authorName bookmarks conversationId createdUtc id isPinned isReply lang likes media nextCursor quotes replies retweets source text tweets url views
The call
data_api({"api":"twitter.user_tweets","input":{"handle":"levelsio"}})Good to know
- The price shown is the usual one. A call can cost more when the first source fails and another serves it; the most it can cost is shown beside each API, and
max_creditssets your own limit. - These APIs return public data. What you may do with it depends on the platform's terms and the privacy law where you operate, and that responsibility is yours.
- A failed call is not charged.
When to choose something else
Choose a provider that specialises in X (Twitter) data when you need it at high volume, on a schedule, or as bulk exports: you will get volume pricing and more control. Choose the platform's official API when you need data from your own account. These APIs are for an agent that needs an answer now, alongside other tools on the same balance.
Questions
Do I need an X (Twitter) API key or developer account?
No. morigraph supplies the access. You connect morigraph once to your assistant, or use one morigraph API key from your own code, and call any of the 16 APIs on this page.
What does X (Twitter) data cost through morigraph?
Between 0.002 and 0.048 credits a call depending on the API, where a credit is about 10 cents. That is from about $0.20 for 1,000 calls. You pay per call from one balance, with no separate subscription.
Can Claude, ChatGPT or Cursor get X (Twitter) data?
Yes. Add morigraph as an MCP server, sign in once, then ask in plain words. Your assistant finds the right API with one search and runs it with one call.
Which X (Twitter) data APIs are available?
Twitter Profile, X / Twitter Search, X / Twitter User Posts, Twitter Community, Twitter Community Tweets, Twitter Tweet, Twitter Tweet Transcript, X / Twitter Article, X / Twitter Community Search and X / Twitter Followers, and 6 more listed on this page.
Prices and availability read from the production service on . A credit is about 10 cents of tool use; see pricing. Your assistant can quote the exact cost before a paid call.