X tools
Accounts and posts on X.
Public X data. Each call costs what the data provider charges for it, and the cost line under each tool below gives the number. A question X cannot answer has no tool, rather than a tool that returns nothing.
| Tool | What it does | Cost |
|---|---|---|
twitter_get_profile | Get an X account | From 1 credit |
twitter_get_tweets | Get an account's posts | From 1 credit |
twitter_get_tweet | Get a post on X | From 1 credit |
#Get an X account
twitter_get_profile
One X account: followers, following, how much it posts and its bio.
Use when: sizing an account, checking a handle, reading a bio and its link before outreach.
Not for: its posts, use twitter_get_tweets. One post, use twitter_get_tweet.
Returns: Record. platform, kind, id, handle, name, url, bio, verified, followers, following, posts_count, likes, views, location, website, employees, industry, created_at. A field the platform does not publish is null. verified is true for a paid checkmark as well as a legacy one.
Cost: 1 credit. Cached 24 hours.
| Parameter | Default and notes |
|---|---|
handle | Required, with or without the @ |
Also takes provider, max_credits, dry_run: see common parameters.
{
"handle": "@stripe"
}#Get an account's posts
twitter_get_tweets
The recent posts on one X account, newest first.
Use when: "what has this account been saying", watching a competitor's announcements.
Not for: keyword search across X, which is not covered here; use one account at a time. One post, use twitter_get_tweet.
Returns: List, one page per call. rows[]: platform, id, url, author, author_name, created_at, text (cut at 2000 characters), likes, comments, shares, views, media, duration_s, is_ad. A number the platform does not publish is null. shares carries retweets, comments carries replies. X returns one page, so meta.cursor is null.
Cost: 1 credit. Cached 6 hours.
| Parameter | Default and notes |
|---|---|
handle | Required |
Also takes provider, max_credits, dry_run: see common parameters.
{
"handle": "stripe"
}#Get a post on X
twitter_get_tweet
One post on X with its replies, reposts, likes and views.
Use when: a row is worth the detail, or you have a URL and nothing else.
Not for: the replies themselves, which are not covered here. An account's feed, use twitter_get_tweets.
Returns: Record. rows[]: platform, id, url, author, author_name, created_at, text (cut at 2000 characters), likes, comments, shares, views, media, duration_s, is_ad. A number the platform does not publish is null.
Cost: 1 credit. Cached 6 hours.
| Parameter | Default and notes |
|---|---|
url | Required, the post URL |
Also takes provider, max_credits, dry_run: see common parameters.
{
"url": "https://x.com/stripe/status/1834021269559501236"
}