Instagram Comments API
Scrape Instagram comment data at scale, useful for sentiment analysis, community research, and tracking customer feedback on any post.
| 1 | import requests |
| 2 | |
| 3 | root = "https://ensembledata.com/apis" |
| 4 | endpoint = "/instagram/post/comments" |
| 5 | params = { |
| 6 | "media_id": "3511510130787749851", |
| 7 | "cursor": "", |
| 8 | "sorting": "popular", |
| 9 | "token": "YOUR-TOKEN-HERE" |
| 10 | } |
| 11 | |
| 12 | res = requests.get(root+endpoint, params=params) |
| 13 | print(res.json()) |
| 14 |
Why Developer Teams Use Our API
Complete Comment Threads
Retrieve replies alongside top-level comments to see full conversations under any post.
Sentiment Pipeline Ready
Clean comment text and timestamps plug directly into NLP or sentiment tools.
Brand Feedback Monitoring
Filter comment text for keywords to track how audiences talk about your brand.
Handles High-Engagement Posts
Paginate through thousands of comments on a viral post without hitting a wall.
Usernames and Timestamps
Every comment includes who posted it and exactly when, ready for reporting.
Compliant Public Collection
Only comments visible to any Instagram viewer are gathered, in line with GDPR.
Scrape Instagram Data Effortlessly
Extract Instagram comment threads, usernames, and timestamps in bulk with our comments API, everything you need for sentiment work or community analysis.
Viral Post Coverage
Pull complete Instagram comment sections even on posts with huge reply counts.
Customer Feedback Mining
Extract Instagram comment text to surface product feedback in a post's discussion.
Reply Count Signals
See reply counts per comment to spot the opinions that sparked the most discussion.
Instagram Scraping Features
Find out what Instagram audiences are saying about your brand or niche. Our comment scraper makes large-scale feedback analysis far more manageable.
- Collect every publicly visible comment on a post, even ones with huge reply counts.
- Reconstruct threaded replies under top-level comments to see full conversations.
- Flag comments written by the post's own author to separate them from audience reaction.
- Feed clean comment text and like counts straight into a sentiment analysis model.
- Filter extracted comment text for brand keywords to monitor mentions in real time.
Starting crawling Instagram now!
Get Your API Key in Minutes
Create a free account (no credit card required) and receive an API token instantly to test endpoints, pull live data, and rapidly prototype integrations. Upgrade as your needs grow.
Get started freeDeveloper Support
Need help integrating or customizing data for your workflows? Our developer success team offers onboarding, guidance, and enterprise support to get your project production-ready.
Contact usFrequently Asked Questions
It returns commenter usernames, comment text, timestamps, and reply counts for a given Instagram post.
Yes, the endpoint paginates through all publicly visible comments, so you can collect the full comment thread even on high-engagement posts.
Yes, comment text and timestamps are commonly pulled into sentiment analysis pipelines to understand how audiences are reacting to a brand or post.
Yes, reply threads under top-level comments are included, so you can reconstruct full conversations.
Comments come back in the order Instagram's public feed serves them; there's no separate sort-by-likes parameter, though each comment includes its like count for client-side sorting.
Yes, a field on each comment indicates whether it was written by the account that published the post, useful for separating creator replies from audience comments.
Each response includes a cursor for the next batch; keep passing it back until the API indicates no further pages remain.
You can pass either the post's shortcode or its full URL, and the endpoint resolves it the same way.
Yes, many customers pull comment text at scale and filter it for brand keywords to monitor mentions and community sentiment.