How to Scrape Instagram Post Details And Engagement
This tutorial shows how to use Instagram Post Details And Engagement API to scrape and crawl structured Instagram data in real-time.
Fetch detailed metadata for individual Instagram posts including like counts, comment totals, hashtags, and timestamps through our API for performance benchmarking.
Access Instagram Data in 3 Steps
Start crawling Instagram post details 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 Instagram 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!
| 1 | const root = 'https://ensembledata.com/apis' |
| 2 | const endpoint = '/instagram/post/details' |
| 3 | const params = { |
| 4 | "code": "CjDN1tzMIjR", |
| 5 | "n_comments_to_fetch": 0, |
| 6 | "token": "YOUR-TOKEN-HERE" |
| 7 | } |
| 8 | |
| 9 | const queryString = new URLSearchParams(params).toString(); |
| 10 | const url = `${root}${endpoint}?${queryString}`; |
| 11 | |
| 12 | await fetch(url) |
| 13 | .then(response => response.json()) |
| 14 | .then(data => console.log(data)) |
| 15 | .catch(error => console.error(error)); |
| 16 |
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.
dataobject36 fields
dimensionsobject2 fields
sharing_friction_infoobject2 fields
display_resourcesarray3 items · schema from #0 3 items
edge_media_to_tagged_userobject1 field
edgesarray0 items
edge_media_to_captionobject1 field
edgesarray1 item · schema from #0 1 item
nodeobject1 field
edge_media_to_commentobject3 fields
page_infoobject2 fields
edgesarray0 items
edge_media_preview_likeobject2 fields
edgesarray0 items
edge_media_to_sponsor_userobject1 field
edgesarray0 items
ownerobject15 fields
edge_owner_to_timeline_mediaobject1 field
edge_followed_byobject1 field
edge_web_media_to_related_mediaobject1 field
edgesarray0 items
edge_related_profilesobject1 field
edgesarray0 items
Response Codes
Status codes this endpoint can return, so you can handle errors before they surprise you in production.
API Pricing
Fetch Instagram Data at Scale
Access detailed post analytics including engagement breakdowns, comment volumes, and hashtag usage to sharpen your Instagram marketing strategy.
Single Post Stats
Get likes, comments, hashtags, and timestamp for one Instagram post.
Comments Included
Retrieve post metadata and comment data in a single API call.
Hashtag Data
See every hashtag used to measure campaign reach per post.