Skip to content

Twitter analytics API

This API returns X's public numbers: follower and following counts, the likes, replies and reposts on each post, and who follows an account. It doesn't return the private analytics in X's own dashboard, such as impressions on your own posts.

Check an account's numbers, no signupSee the counts before you build a dashboard.
Twitter analytics api: a weather-station keeper reading dials and recording numbers in a ledger beside a window of drifting clouds.

The job

Competitor tracking, client reports and creator research all need public counts over time. Call x.user for profile counts and x.tweets for per-post engagement, and store each result with its date.

The data is public, so you can measure any account, not just your own. The workflow is in competitor tracking.

How it works

  1. Pick the accounts

    Your own, your competitors' and those of creators in your space.

  2. Snapshot on a schedule

    Call x.user daily and store the follower count with the date. Growth is the difference between snapshots.

  3. Add post engagement

    Call x.tweets for recent posts and store their engagement counts, then average them per period.

Endpoints that do it

EndpointWhat it's forCredits
Get a userGET /v1/x/users/{handle}Follower and following counts.2 credits
List user tweetsGET /v1/x/users/{handle}/tweetsRecent posts with engagement counts.2 credits
List followersGET /v1/x/users/{handle}/followersThe follower list.2 credits per page (20 rows by default)
Search tweetsGET /v1/x/tweets/searchVolume of posts for a 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.

Profile counts for one account

A profile call. Store the follower count with the date and you have a growth series.

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

  • Public data only. Impressions and other private analytics on your own posts aren't available here.
  • Counts are a snapshot, and past counts can't be queried later, so keep your own history.
  • Protected accounts are hidden.

Questions

Can I get my own impressions?
No. Those are private to your account in X's own analytics, and this API reads public data.
How do I track follower growth?
Snapshot x.user on a schedule and store the counts with their dates.
Can I analyse competitors?
Yes. Any public account works.

Other use cases

Build it with one API key

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