Tools

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.

ToolWhat it doesCost
twitter_get_profileGet an X accountFrom 1 credit
twitter_get_tweetsGet an account's postsFrom 1 credit
twitter_get_tweetGet a post on XFrom 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.

ParameterDefault and notes
handleRequired, with or without the @

Also takes provider, max_credits, dry_run: see common parameters.

JSON
{
  "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.

ParameterDefault and notes
handleRequired

Also takes provider, max_credits, dry_run: see common parameters.

JSON
{
  "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.

ParameterDefault and notes
urlRequired, the post URL

Also takes provider, max_credits, dry_run: see common parameters.

JSON
{
  "url": "https://x.com/stripe/status/1834021269559501236"
}