Support needed? Reach out! πŸ“§

How to Scrape Twitter User Profile Data

This tutorial shows how to use Twitter User Profile Data API to scrape and crawl structured Twitter data in real-time.
Retrieve full Twitter user profiles through our analytics API and access follower counts, following totals, bio text, and tweet frequency for social listening and influencer research.

Access Twitter Data in 3 Steps

Start crawling Twitter user analytics data. Follow these steps to extract social media data in minutes.

1

Create Your Account

Go to our registration page and make an account. It's free, no credit card, and you get credits right away to play around with.

2

Verify Your Email Address

You'll get a verification email, click the link in it. Once that's done, you can grab your API token from the dashboard.

3

Make Your First API Call

Copy the code snippet below, swap in your API key, and run it. You'll get Twitter data back as JSON within a few seconds.

Code Sample

Here's a JavaScript example to get you going. Swap out the token and you're good, works the same way in any language that can make HTTP requests. Start collecting user analytics data via our REST API!

javascript-logo JavaScript
Twitter User Info
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/twitter/user/info'
3 const params = {
4   "name""elonmusk",
5   "token""YOUR-TOKEN-HERE"
6 }
7  
8 const queryString = new URLSearchParams(params).toString();
9 const url = `${root}${endpoint}?${queryString}`;
10  
11 await fetch(url)
12   .then(response => response.json())
13   .then(data => console.log(data))
14   .catch(error => console.error(error));
15  

Parameters

name (string) Username. REQUIRED
token (string) Private token assigned to each client to access the APIs. REQUIRED

Example Response

Explore the fields returned by this endpoint. Click a row to expand nested objects and arrays, hover a value to copy it, or use "Expand all" to see everything at once.

JSON
Twitter User Info
dataobject16 fields
__typenamestring"User"
idstring"VXNlcjo1MDM5Mzk2MA=="
rest_idstring"50393960"
affiliates_highlighted_labelobject0 fields
empty
is_blue_verifiedbooleantrue
profile_image_shapestring"Circle"
legacyobject27 fields
created_atstring"Wed Jun 24 18:44:10 +0000 2009"
default_profilebooleanfalse
default_profile_imagebooleanfalse
descriptionstring"Sharing things I'm learning through my foundation work and other inter…"
entitiesobject2 fields
descriptionobject1 field
urlsarray0 items
empty
urlobject1 field
urlsarray1 item Β· schema from #0 1 item
display_urlstring"gatesnot.es/blog"
expanded_urlstring"https://gatesnot.es/blog"
urlstring"https://t.co/UkvHzxDwkH"
indicesarray2 items Β· schema from #0 2 items
empty
fast_followers_countnumber0
favourites_countnumber560
followers_countnumber65598148
friends_countnumber590
has_custom_timelinesbooleantrue
is_translatorbooleanfalse
listed_countnumber119677
locationstring"Seattle, WA"
media_countnumber1521
namestring"Bill Gates"
normal_followers_countnumber65598148
pinned_tweet_ids_strarray0 items
empty
possibly_sensitivebooleanfalse
profile_banner_urlstring"https://pbs.twimg.com/profile_banners/50393960/1672784571"
profile_image_url_httpsstring"https://pbs.twimg.com/profile_images/1674815862879178752/nTGMV1Eo_norm…"
profile_interstitial_typestring""
screen_namestring"BillGates"
statuses_countnumber4481
translator_typestring"regular"
urlstring"https://t.co/UkvHzxDwkH"
verifiedbooleanfalse
withheld_in_countriesarray0 items
empty
tipjar_settingsobject9 fields
is_enabledbooleanfalse
bandcamp_handlestring""
bitcoin_handlestring""
cash_app_handlestring""
ethereum_handlestring""
gofundme_handlestring""
patreon_handlestring""
pay_pal_handlestring""
venmo_handlestring""
legacy_extended_profileobject0 fields
empty
is_profile_translatablebooleanfalse
has_hidden_subscriptions_on_profilebooleanfalse
verification_infoobject2 fields
is_identity_verifiedbooleanfalse
reasonobject2 fields
descriptionobject2 fields
textstring"This account is verified. Learn more"
entitiesarray1 item Β· schema from #0 1 item
from_indexnumber26
to_indexnumber36
refobject2 fields
urlstring"https://help.twitter.com/managing-your-account/about-twitter-verified-…"
url_typestring"ExternalUrl"
verified_since_msecstring"1263941895511"
highlights_infoobject2 fields
can_highlight_tweetsbooleantrue
highlighted_tweetsstring"0"
user_seed_tweet_countnumber0
business_accountobject0 fields
empty
creator_subscriptions_countnumber0

Response Codes

Status codes this endpoint can return, so you can handle errors before they surprise you in production.

200SuccessSuccessful Response
422Client ErrorValidation Error
491Client ErrorToken not found
492Client ErrorEmail not verified
493Client ErrorSubscription expired
495Client ErrorAll daily units used
500Server ErrorSomething went wrong

API Pricing

2 units Cost per successful call to this endpoint.

Fetch Twitter Data at Scale

Fetch Twitter user data in bulk for social listening programs, influencer campaigns, or building competitive intelligence datasets.

deco-icon

Follower Counts

Get exact follower and following counts for any X account.

deco-icon

Tweet Frequency

See posting frequency to gauge how active an account is.

deco-icon

Bio Data

Pull bio text to quickly assess account relevance at a glance.