Social Media
X (Twitter) logo

X (Twitter) API

x.com

Public X (Twitter) data: profiles, posts, comments and search.

Actions
4
Category
Social Media
Login
Not required
Output
JSON

Call the X (Twitter) API

Submit a task, then poll the job until it settles. This example runs x_tweet_detail.

curl -X POST https://api.anakin.io/v1/wire/task \
  -H "X-API-Key: $ANAKIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "x_tweet_detail",
    "params": {
      "tweet_url": "https://x.com/NASA/status/2107566197579341846"
    }
  }'

4 actions on x.com

Read

  • Post Details

    x_tweet_detailread10 credits / call

    Get one X post: text, author, date, likes, reposts, replies, quotes, views, bookmarks, language and media links.

    tweet_url
    string · required
  • Post Search

    x_searchread10 credits / call

    Search recent X posts by keyword (20 by default, up to 1,000, latest first) with text, author, date and engagement counts.

    query
    string · required
    limit
    integer
  • Profile

    x_profileread10 credits / call

    Get a public X (Twitter) profile: name, bio, follower, following, post, like and media counts, verified and protected flags, location, join date, avatar and banner.

    username
    string · required
  • User Posts

    x_user_tweetsread10 credits / call

    Get an X user's latest posts (all the most recent ones available, about 15-20): text, date, likes, reposts, replies, quotes, views, bookmarks and media links.

    username
    string · required

X (Twitter) API questions

Is there an API for X (Twitter)?
X (Twitter) does not offer a public data API for this, but Anakin Wire provides 4 maintained endpoints for x.com. You call Anakin's REST API with an action ID and parameters and get structured JSON back; Anakin handles the browser, proxies, anti-bot, and parsing.
How do I scrape X (Twitter) data?
POST to https://api.anakin.io/v1/wire/task with your API key, the action ID, and its parameters, then poll GET /v1/wire/jobs/{id} until the job settles. There is nothing to install and no scraper to maintain — when x.com changes its markup, Anakin updates the action.
Do I need a X (Twitter) account?
No. Every X (Twitter) action listed here runs anonymously — no account and no credentials required.
What does the X (Twitter) API cost?
Usage-based credits, charged per call and refunded automatically when a job fails. New accounts start with 300 free credits and no card. See anakin.io/pricing for the current rates.

More Social Media APIs

All Social Media sites