Support needed? Reach out! 📧

How to Scrape Twitter Tweet Details And Metrics

This tutorial shows how to use Twitter Tweet Details And Metrics API to scrape and crawl structured Twitter data in real-time.
Fetch granular Twitter post data through our API and extract like counts, retweet totals, quote tweets, reply counts, and impression figures for campaign reporting and analysis.

Access Twitter Data in 3 Steps

Start crawling Twitter post details 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 post details data via our REST API!

javascript-logo JavaScript
Twitter Post Info
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/twitter/post/info'
3 const params = {
4   "id"1694791112567967849,
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

id (integer) Tweet ID. 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 Post Info
dataobject9 fields
__typenamestring"Tweet"
rest_idstring"1694791112567967849"
coreobject1 field
user_resultsobject1 field
resultobject8 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_countnumber65598195
friends_countnumber590
has_custom_timelinesbooleantrue
is_translatorbooleanfalse
listed_countnumber119677
locationstring"Seattle, WA"
media_countnumber1521
namestring"Bill Gates"
normal_followers_countnumber65598195
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""
unmention_dataobject0 fields
empty
edit_controlobject4 fields
edit_tweet_idsarray1 item · schema from #0 1 item
0string"1"
1string"6"
2string"9"
3string"4"
4string"7"
5string"9"
6string"1"
7string"1"
8string"1"
9string"2"
10string"5"
11string"6"
12string"7"
13string"9"
14string"6"
15string"7"
16string"8"
17string"4"
18string"9"
editable_until_msecsstring"1692908263000"
is_edit_eligiblebooleantrue
edits_remainingstring"5"
is_translatablebooleanfalse
viewsobject2 fields
countstring"19053154"
statestring"EnabledWithCount"
sourcestring"<a href="https://mobile.twitter.com" rel="nofollow">Twitter Web App</a…"
legacyobject21 fields
bookmark_countnumber1680
bookmarkedbooleanfalse
created_atstring"Thu Aug 24 19:17:43 +0000 2023"
conversation_controlobject2 fields
policystring"Community"
conversation_owner_resultsobject1 field
resultobject2 fields
__typenamestring"User"
legacyobject1 field
screen_namestring"BillGates"
conversation_id_strstring"1694791112567967849"
display_text_rangearray2 items · schema from #0 2 items
empty
entitiesobject6 fields
hashtagsarray0 items
empty
mediaarray1 item · schema from #0 1 item
display_urlstring"pic.x.com/cuqln2fqlw"
expanded_urlstring"https://twitter.com/BillGates/status/1694791112567967849/photo/1"
id_strstring"1694790998864580608"
indicesarray2 items · schema from #0 2 items
empty
media_keystring"16_1694790998864580608"
media_url_httpsstring"https://pbs.twimg.com/tweet_video_thumb/F4Ubbx_aUAAEMmq.jpg"
typestring"animated_gif"
urlstring"https://t.co/CUqLN2fqlW"
ext_media_availabilityobject1 field
statusstring"Available"
sizesobject4 fields
largeobject3 fields
hnumber242
wnumber416
resizestring"fit"
mediumobject3 fields
hnumber242
wnumber416
resizestring"fit"
smallobject3 fields
hnumber242
wnumber416
resizestring"fit"
thumbobject3 fields
hnumber150
wnumber150
resizestring"crop"
original_infoobject3 fields
heightnumber242
widthnumber416
focus_rectsarray0 items
empty
video_infoobject2 fields
aspect_ratioarray2 items · schema from #0 2 items
empty
variantsarray1 item · schema from #0 1 item
bitratenumber0
content_typestring"video/mp4"
urlstring"https://video.twimg.com/tweet_video/F4Ubbx_aUAAEMmq.mp4"
media_resultsobject1 field
resultobject1 field
media_keystring"16_1694790998864580608"
symbolsarray0 items
empty
timestampsarray0 items
empty
urlsarray0 items
empty
user_mentionsarray1 item · schema from #0 1 item
id_strstring"15670515"
namestring"Windows"
screen_namestring"Windows"
indicesarray2 items · schema from #0 2 items
empty
extended_entitiesobject1 field
mediaarray1 item · schema from #0 1 item
display_urlstring"pic.x.com/cuqln2fqlw"
expanded_urlstring"https://twitter.com/BillGates/status/1694791112567967849/photo/1"
id_strstring"1694790998864580608"
indicesarray2 items · schema from #0 2 items
empty
media_keystring"16_1694790998864580608"
media_url_httpsstring"https://pbs.twimg.com/tweet_video_thumb/F4Ubbx_aUAAEMmq.jpg"
typestring"animated_gif"
urlstring"https://t.co/CUqLN2fqlW"
ext_media_availabilityobject1 field
statusstring"Available"
sizesobject4 fields
largeobject3 fields
hnumber242
wnumber416
resizestring"fit"
mediumobject3 fields
hnumber242
wnumber416
resizestring"fit"
smallobject3 fields
hnumber242
wnumber416
resizestring"fit"
thumbobject3 fields
hnumber150
wnumber150
resizestring"crop"
original_infoobject3 fields
heightnumber242
widthnumber416
focus_rectsarray0 items
empty
video_infoobject2 fields
aspect_ratioarray2 items · schema from #0 2 items
empty
variantsarray1 item · schema from #0 1 item
bitratenumber0
content_typestring"video/mp4"
urlstring"https://video.twimg.com/tweet_video/F4Ubbx_aUAAEMmq.mp4"
media_resultsobject1 field
resultobject1 field
media_keystring"16_1694790998864580608"
favorite_countnumber137615
favoritedbooleanfalse
full_textstring"Some memories stick with you forever. Others follow you around the int…"
is_quote_statusbooleanfalse
langstring"en"
possibly_sensitivebooleanfalse
possibly_sensitive_editablebooleantrue
quote_countnumber1310
reply_countnumber1
retweet_countnumber11229
retweetedbooleanfalse
user_id_strstring"50393960"
id_strstring"1694791112567967849"

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

Access detailed Twitter post metrics including impressions, engagement breakdowns, and quote tweet counts and turn them into actionable marketing insights.

deco-icon

Tweet Stats

Get likes, retweets, quotes, and replies for one tweet by ID.

deco-icon

Impression Data

See impression figures alongside core engagement metrics.

deco-icon

Quote Tweet Data

Track quote tweet counts to measure amplification reach.