Skip to content

Twitter API for scraping X data

A scraper breaks whenever X changes its pages, and it needs proxies and accounts to keep running. An API returns the same fields as JSON from a stable endpoint, so you pay per call and skip the maintenance.

Scrape a timeline now, no signupPaste a handle and get the posts.
Twitter api for scraping: a gardener harvesting glowing seed pods from a tall vine into a woven basket, tidy rows of jars labelled by date.

The job

People scrape X for posts, profiles, follower lists and replies. With a headless browser that means rotating proxies, handling logins and fixing selectors every time the page changes.

The endpoints here return the same things as JSON. You send a keyword or a handle and read the result. The Reddit side works the same way.

How it works

  1. Name what you are collecting

    Posts by keyword, one account's timeline, a follower list or a reply thread each have their own endpoint.

  2. Page through results

    Pass the cursor from each response into the next call until you have enough rows.

  3. Store the JSON

    Keep the raw responses. The ids in them let you deduplicate across runs.

Endpoints that do it

EndpointWhat it's forCredits
Search tweetsGET /v1/x/tweets/searchPosts by keyword.2 credits
List user tweetsGET /v1/x/users/{handle}/tweetsAn account's timeline.2 credits
List followersGET /v1/x/users/{handle}/followersA follower list.2 credits per page (20 rows by default)
List repliesGET /v1/x/tweets/{id}/repliesReplies to a post.2 credits

Free tools for the same job

Try the job in a browser first. These tools call the same endpoints, and you don't need a key or any code.

One account's recent posts

A timeline call for a handle. Each row has the text, time and counts.

curl "https://api.chatterapi.com/v1/x/users/levelsio/tweets" \
  -H "Authorization: Bearer $CHATTERAPI_KEY"
response, first 2 rows
{
  "data": [
    {
      "id": "2110066474513793361",
      "text": "✨ 200,000+ users on my computer nostalgia project @pieter\n\nSometimes it takes a few years for things to take off, in this case about 2 years!\n\nKeep creating 💖 https://t.co/Na0LXnwAjW",
      "url": "https://x.com/levelsio/status/2110066474513793361",
      "createdAt": "2026-10-13T17:53:45.000Z",
      "lang": "en",
      "likes": 129,
      "retweets": 4,
      "replies": 37,
      "quotes": 0,
      "views": 15475,
      "bookmarks": 9,
      "isReply": false,
      "inReplyToId": null,
      "conversationId": "2110066474513793361",
      "isRetweet": false,
      "quotedTweetId": "2108957488410161442",
      "type": "quote",
      "isQuote": true,
      "isPinned": false,
      "source": null,
      "hasVideo": false,
      "urls": [],
      "mentions": [
        "pieter"
      ],
      "author": {
        "id": "1577241403",
        "handle": "levelsio",
        "name": "@levelsio",
        "bio": "💸http://levels.vc\n📸http://PhotoAI.com $86K/m\n🎮http://VibeJam.com $44K/m\n🏡http://InteriorAI.com $23K/m\n👙@X $13K/m\n🌍http://Nomads.com $7K/m\n🏩http://Hotelist.com $5K/m",
        "followers": 974707,
        "following": 3276,
        "tweets": 181450,
        "verified": false,
        "blueVerified": true,
        "canDm": false,
        "protected": false,
        "location": "📕My book $5K/m 👉",
        "url": "https://readMAKE.com",
        "avatarUrl": "https://pbs.twimg.com/profile_images/2077111020305162240/PwddgOau_400x400.jpg",
        "createdAt": "2013-07-08T09:31:59.000Z",
        "profileUrl": "https://x.com/levelsio",
        "bannerUrl": "https://pbs.twimg.com/profile_banners/1577241403/1665964220",
        "likesGiven": 185852,
        "mediaCount": 19829,
        "pinnedTweetIds": [
          "2109949585737052316"
        ]
      },
      "media": [
        {
          "type": "photo",
          "url": "https://pbs.twimg.com/media/HUh2NAYWQAAP7ZK.jpg",
          "videoUrl": null
        }
      ],
      "quotedTweet": {
        "id": "2108957488410161442",
        "text": "💾 Two years ago I started working on these crazy nostalgia projects, kind of randomly, because I was bored and wanted to do something different than just build another SaaS or AI app/website\n\nI wanted to try to run Wind…",
        "url": "https://x.com/levelsio/status/2108957488410161442",
        "createdAt": null,
        "lang": null,
        "likes": null,
        "retweets": null,
        "replies": null,
        "quotes": null,
        "views": null,
        "bookmarks": null,
        "isReply": false,
        "inReplyToId": null,
        "conversationId": null,
        "isRetweet": false,
        "quotedTweetId": null,
        "type": "tweet",
        "isQuote": false,
        "isPinned": false,
        "source": null,
        "hasVideo": false,
        "urls": [],
        "mentions": [],
        "author": {
          "id": "",
          "handle": "levelsio",
          "name": "@levelsio",
          "bio": null,
          "followers": null,
          "following": null,
          "tweets": null,
          "verified": null,
          "blueVerified": null,
          "canDm": null,
          "protected": null,
          "location": null,
          "url": null,
          "avatarUrl": null,
          "createdAt": null,
          "profileUrl": "https://x.com/levelsio",
          "bannerUrl": null,
          "likesGiven": null,
          "mediaCount": null,
          "pinnedTweetIds": null
        },
        "media": []
      },
      "retweetedTweet": null
    },
    {
      "id": "2110030627336540370",
      "text": "This is also interesting to think about\n\nRight now it still takes, let's say, 30 minutes to a few hours to build something usable with AI and then you still polish for days/weeks/months\n\nIf we assume this will keep getti…",
      "url": "https://x.com/levelsio/status/2110030627336540370",
      "createdAt": "2026-10-13T15:31:18.000Z",
      "lang": "en",
      "likes": 324,
      "retweets": 11,
      "replies": 112,
      "quotes": 10,
      "views": 38339,
      "bookmarks": 118,
      "isReply": false,
      "inReplyToId": null,
      "conversationId": "2110030627336540370",
      "isRetweet": false,
      "quotedTweetId": null,
      "type": "quote",
      "isQuote": true,
      "isPinned": false,
      "source": null,
      "hasVideo": false,
      "urls": [],
      "mentions": [],
      "author": {
        "id": "1577241403",
        "handle": "levelsio",
        "name": "@levelsio",
        "bio": "💸http://levels.vc\n📸http://PhotoAI.com $86K/m\n🎮http://VibeJam.com $44K/m\n🏡http://InteriorAI.com $23K/m\n👙@X $13K/m\n🌍http://Nomads.com $7K/m\n🏩http://Hotelist.com $5K/m",
        "followers": 974707,
        "following": 3276,
        "tweets": 181450,
        "verified": false,
        "blueVerified": true,
        "canDm": false,
        "protected": false,
        "location": "📕My book $5K/m 👉",
        "url": "https://readMAKE.com",
        "avatarUrl": "https://pbs.twimg.com/profile_images/2077111020305162240/PwddgOau_400x400.jpg",
        "createdAt": "2013-07-08T09:31:59.000Z",
        "profileUrl": "https://x.com/levelsio",
        "bannerUrl": "https://pbs.twimg.com/profile_banners/1577241403/1665964220",
        "likesGiven": 185852,
        "mediaCount": 19829,
        "pinnedTweetIds": [
          "2109949585737052316"
        ]
      },
      "media": [],
      "quotedTweet": {
        "id": "",
        "text": "",
        "url": "https://x.com/i/status/",
        "createdAt": null,
        "lang": null,
        "likes": null,
        "retweets": null,
        "replies": null,
        "quotes": null,
        "views": null,
        "bookmarks": null,
        "isReply": false,
        "inReplyToId": null,
        "conversationId": null,
        "isRetweet": false,
        "quotedTweetId": null,
        "type": "tweet",
        "isQuote": false,
        "isPinned": false,
        "source": null,
        "hasVideo": false,
        "urls": [],
        "mentions": [],
        "author": {
          "id": "",
          "handle": "",
          "name": "",
          "bio": null,
          "followers": null,
          "following": null,
          "tweets": null,
          "verified": null,
          "blueVerified": null,
          "canDm": null,
          "protected": null,
          "location": null,
          "url": null,
          "avatarUrl": null,
          "createdAt": null,
          "profileUrl": "https://x.com/",
          "bannerUrl": null,
          "likesGiven": null,
          "mediaCount": null,
          "pinnedTweetIds": null
        },
        "media": []
      },
      "retweetedTweet": null
    }
  ],
  "page": {
    "nextCursor": "AYCt…",
    "hasMore": true
  }
}

Recorded from a live call on . Long text is shortened and the cursor is cut. A live key is charged 2 credits for this call. A test key returns this same sample for 0 credits.

What it won't do

  • Only public data comes back. Protected accounts stay hidden.
  • Rate limits depend on your plan, so plan ahead for a very large crawl.
  • You are responsible for how you use the data you collect and for following the law that applies to you.

Questions

Is this scraping or an API?
You call an API and get JSON back. There is no scraper, proxy or login for you to run.
Can I get follower lists?
Yes. x.followers returns followers for a handle, paged by cursor.
Is scraping X legal?
That depends on where you are and what you collect. This is not legal advice. For Reddit, see is scraping Reddit legal.

Other solutions

Build it with one API key

Try it free for 7 days with 1,000 credits.