Support needed? Reach out! 📧

How to scrape Instagram Post Comments

This tutorial shows how to use Instagram Post Comments API to scrape and crawl structured Instagram data in real-time.
Collect Instagram comment threads in bulk including commenter usernames, text, timestamps, and reply counts for sentiment and community research.

Access Instagram Data in 3 Steps

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

javascript-logo JavaScript
Instagram Post Comments
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/instagram/post/comments'
3 const params = {
4   "media_id""3511510130787749851",
5   "cursor""",
6   "sorting""popular",
7   "token""YOUR-TOKEN-HERE"
8 }
9  
10 const queryString = new URLSearchParams(params).toString();
11 const url = `${root}${endpoint}?${queryString}`;
12  
13 await fetch(url)
14   .then(response => response.json())
15   .then(data => console.log(data))
16   .catch(error => console.error(error));
17  

Parameters

media_id (integer) Media ID can be found using the other APIs. REQUIRED
cursor (string) Parameter to manually handle pagination. Each response contains a `nextCursor` which can be used to retrieve the next page of results by sending it as the next `cursor`. If the `nextCursor` is not present in the response, it means that there are no more results to retrieve. REQUIRED
sorting Fetch TOP comments (only 15 allowed) OR RECENT (start from most recent and iterate) REQUIRED
token (string) Private token assigned to each client to access the APIs. REQUIRED

Fetch Instagram Data at Scale

Use Instagram comment data to run sentiment analysis, monitor community discussions, and improve how you engage with your target audience.

deco-icon

Quick Integration

Connect in minutes using our REST endpoints or ready-made SDKs. One API call is all you need to crawl data.

deco-icon

Live Data Delivery

Retrieve fresh, up-to-the-minute data with every request. No cached or outdated datasets, always real-time accuracy.

deco-icon

Custom Solutions

Tailor API parameters, output formats, and delivery schedules to match your specific business intelligence requirements.

What You Can Scrape from Instagram

  • How To Scrape Instagram Comments Via Api
  • Extract Instagram Comment Data By Post Id
  • Instagram Comment Sentiment Analysis Api
  • Bulk Export Instagram Comments Programmatically
  • Instagram Reply Thread Extraction Endpoint
  • Instagram Brand Monitoring Via Comments Api
  • Pull Instagram Comment Timestamps And Usernames
  • Instagram Community Feedback Data Api

Frequently Asked Questions

Our Instagram post comments API lets you send simple REST requests to extract structured public data from Instagram in real time. You provide parameters such as keywords, usernames, or hashtags, and the API returns clean JSON responses ready for analysis, reporting, or integration into your applications.

Yes. EnsembleData only collects publicly available Instagram data and operates in full compliance with GDPR and applicable data privacy laws. We never access private accounts or restricted content, so your data collection workflows remain ethical and lawful.

The API supports extracting a wide range of public Instagram data, including user profiles, posts, videos, comments, likes, shares, hashtags, follower counts, engagement metrics, and trending content; all returned as structured JSON for easy processing.

Responses are returned in real time, typically within 2–4 seconds per request. Our infrastructure maintains 99.9%+ uptime with automatic failover, ensuring you always receive fresh, up-to-date Instagram data whenever you need it.

Yes. You can sign up for a free account, no credit card required, and receive API credits to test any endpoint immediately. This lets you validate data quality and integration before committing to a paid plan that scales with your usage.