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.
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.
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.
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!
| 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
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.
dataobject16 fields
affiliates_highlighted_labelobject0 fields
legacyobject27 fields
entitiesobject2 fields
descriptionobject1 field
urlsarray0 items
urlobject1 field
urlsarray1 item Β· schema from #0 1 item
indicesarray2 items Β· schema from #0 2 items
pinned_tweet_ids_strarray0 items
withheld_in_countriesarray0 items
tipjar_settingsobject9 fields
legacy_extended_profileobject0 fields
verification_infoobject2 fields
reasonobject2 fields
descriptionobject2 fields
entitiesarray1 item Β· schema from #0 1 item
refobject2 fields
highlights_infoobject2 fields
business_accountobject0 fields
Response Codes
Status codes this endpoint can return, so you can handle errors before they surprise you in production.
API Pricing
Fetch Twitter Data at Scale
Fetch Twitter user data in bulk for social listening programs, influencer campaigns, or building competitive intelligence datasets.
Follower Counts
Get exact follower and following counts for any X account.
Tweet Frequency
See posting frequency to gauge how active an account is.
Bio Data
Pull bio text to quickly assess account relevance at a glance.