Skip to content

Twitter scraper API

A Twitter scraper API returns X posts, profiles and follower lists as JSON from stable endpoints. You don't have to run proxies, manage login cookies or fix selectors, which a home-built scraper needs to keep working.

Export followers now, no signupThen call the same data from code.
Twitter scraper api: a beekeeper collecting small blue paper birds from a row of hives into labelled boxes.

The job

People scrape X for a few narrow jobs: a followers scraper for one account, a profile scraper for a list of handles, and a search scraper for posts on a keyword. Each one has its own endpoint here.

Twitter web scraping with a home-built crawler needs proxies and logins; here the same job is a request that returns JSON. Use it to scrape all tweets from a user by paging their timeline, to scrape Twitter usernames and user profiles from a list of handles, or to extract tweets by keyword. To compare the approaches, see scrape Twitter and Reddit and Nitter alternatives for developers. For Reddit and X together, see the social media scraping API.

How it works

  1. Choose the job

    Followers, profiles, an account's posts, or a keyword search.

  2. Call and page

    Pass the cursor from each response into the next call.

  3. Save the JSON

    Save the raw responses with the date they were fetched, and deduplicate on ids.

Endpoints that do it

EndpointWhat it's forCredits
List followersGET /v1/x/users/{handle}/followersFollowers of an account.2 credits per page (20 rows by default)
Get a userGET /v1/x/users/{handle}A profile by handle.2 credits
List user tweetsGET /v1/x/users/{handle}/tweetsAn account's recent posts.2 credits
Search tweetsGET /v1/x/tweets/searchPosts by keyword.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.

A profile call and its response

This is a single profile lookup. To build a profile scraper, loop it over a list of handles.

curl "https://api.chatterapi.com/v1/x/users/levelsio" \
  -H "Authorization: Bearer $CHATTERAPI_KEY"
response, first 2 rows
{
  "data": {
    "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"
    ]
  }
}

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

  • It returns public data only. Protected accounts stay hidden.
  • Rate limits apply per plan.
  • How you use the data you collect is your responsibility.

Questions

How do I scrape all tweets from a user?
Call x.tweets with the handle and keep passing the cursor until there are no more pages. You get as much history as X returns for that account. The free timeline scraper does the same in a browser.
Is there a Twitter scraper bot or crawler I can run online?
The free tools run online with no setup, and the API gives a script or an agent the same data. It is polling only: call it on a schedule rather than leaving a crawler running.
Can I use an API to download or extract tweets?
Yes. Search by keyword with x.search, read a timeline with x.tweets, or export replies and followers, and save the JSON. The data is public posts only.
Is there a no code Twitter scraper?
Yes. The free X follower exporter and timeline scraper run in the browser.
Can I scrape followers?
Yes. x.followers returns a follower list, paged by cursor.
Can I use it from Google Sheets?

More ways to use the API

Build it with one API key

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