"Scrape" and "export" sound similar but signal different intent. People searching for an Instagram exporter want a CSV. People searching for "how to scrape Instagram comments" usually want code — Python, an Apify actor, or an API client they can wire into a pipeline. This guide is for the second group.
Below: the four real methods, what each costs, sample code where useful, and the ToS reality you should understand before you ship anything to production.
The four methods at a glance
| Method | Setup | Cost | Works on any public post? | ToS-safe? |
|---|---|---|---|---|
| Instagram Graph API | App + OAuth per Page | Free | No — only your own Pages | Yes |
| Apify / paid actors | Account + API key | Pay-per-run (~$0.50–$5+) | Yes (public) | Grey zone |
| Custom Python scraper | Code + proxies | Your time + proxies | Yes (public) | Grey zone, maintenance heavy |
| No-code exporter API | None / API key | Free / $9 pass | Yes (public) | Vendor handles |
Method 1: Instagram Graph API (the official, narrow path)
Meta's Graph API is the only path Instagram explicitly authorizes. It works — for accounts you own or manage. It does not work for competitor accounts, creators you want to research, or arbitrary public posts.
Setup:
- The target Instagram account must be a Business or Creator account linked to a Facebook Page.
- Create a Facebook app at developers.facebook.com.
- Obtain a Page Access Token with scopes:
instagram_basic,instagram_manage_comments,pages_read_engagement. - Get the IG media ID from the post URL (Graph API helper endpoint).
- Query
GET https://graph.facebook.com/v22.0/{ig-media-id}/comments?fields=id,text,username,timestamp,like_count,replies{id,text,username,timestamp,like_count}&access_token=TOKEN. - Paginate via the
paging.nextcursor.
Pros: Free, official, sustainable, won't get your IP rate-limited. The right answer for any production feature on your own account.
Cons: Cannot read comments on accounts you don't manage. App Review is required for production scopes. Token refreshing and Page-level OAuth add real engineering overhead. If your use case is competitor or creator research, this is not the answer — keep reading.
Method 2: Apify or paid scraper platforms
Apify hosts community-maintained "actors" that scrape Instagram comments from any public post. You call the actor's API, the platform handles proxies and pagination, you pay per run (typical: $0.50–$5 depending on comment volume).
Sample call (pseudocode):
POST https://api.apify.com/v2/acts/ACTOR_ID/runs?token=APIFY_KEY
{
"directUrls": ["https://www.instagram.com/p/ABC123/"],
"resultsLimit": 1000
}
Pros: Works on any public post. No infrastructure to maintain. Native bulk and scheduling.
Cons: Pay-per-run adds up across many posts. You still wire the API client and turn JSON into usable data. Operates outside Meta's documented API, which means it's grey-zone vs ToS even though it's widely used.
We dug into the trade-off for TikTok in ZocialComment vs Apify; the same conclusion applies to Instagram: Apify wins when you genuinely need actor-style customization, no-code wins when you don't.
Method 3: Custom Python scraper (the expensive learning experience)
You can write your own scraper. People do this all the time, and most of them regret it within three months.
The realistic stack: httpx or aiohttp for requests, residential proxies (Bright Data, Smartproxy, ~$8/GB), a TLS-fingerprint library to avoid being detected as a bot (curl_cffi), and a queue/retry layer (Celery, RQ).
Key challenges:
- Anti-bot defenses change. Meta updates request signing, GraphQL hash parameters, and rate-limit thresholds regularly. Your scraper is a maintenance commitment, not a one-time build.
- Proxies are real money. Residential proxy traffic costs several dollars per gigabyte; comment scraping is JSON-light, but at scale it adds up.
- ToS exposure. Self-scraping public data is a grey zone — widely done, not authorized. If your use case is regulated (healthcare, finance, large dataset for publication) understand the risk.
When this is the right answer: Very rarely. Almost only when you're an engineering team with specific requirements (geo-distributed scraping, very high volume, custom anti-bot work) that no vendor satisfies.
Method 4: Use a no-code exporter as a "scraper" (the lazy-good answer)
A no-code exporter is a scraper with the maintenance abstracted away. You don't write any scraping code; you call the exporter's web UI or, if you need automation, hit its export endpoint from your script.
For ZocialComment's Instagram export, the workflow:
- Validate the export works manually in the browser with a free run.
- If you need recurring or programmatic exports, run them from a scheduler — three free runs per IP per day, or use the $9 unlimited pass for a 3-day window.
- Pull the CSV or JSON output into your script. The schema is consistent across TikTok, YouTube, and Instagram exports so downstream code doesn't fork by platform.
When this is the right answer: Whenever you'd rather work on the analysis than on a scraper. Most "I need to scrape Instagram comments" projects are actually "I need a clean CSV reliably" — and that's a solved problem.
Decision tree
- Scraping comments on your own Pages? Graph API. It's free and ToS-safe.
- Engineering team with a pipeline that needs JSON on a schedule? Apify actor — pay-per-run, programmatic, no infrastructure.
- You're a researcher or analyst doing this manually a few times a week? No-code exporter. Free tier covers it.
- Doing thousands of posts a day across many accounts? Custom scraper with proxies, or a higher-tier Apify plan. Budget for maintenance.
- You just want a CSV? No-code exporter. Stop reading "scraping" tutorials.
Legal and ToS reality
Public Instagram comments are public data — courts have generally upheld that public web scraping is not unauthorized access under the CFAA (hiQ v. LinkedIn). But "not illegal" is not the same as "Meta won't try to stop you" or "ethical regardless of use case."
Practical guidance:
- Inside the Graph API on your own Pages — fully authorized. No grey zone.
- Outside the Graph API on public posts — grey zone. Meta blocks technically, doesn't generally pursue legally for normal use, but reserves the right to. Higher risk if you're collecting at very large scale, publishing the dataset, or building a product that resells Instagram data.
- Always — don't republish individual comments tied to usernames without reason. Don't use scraped data for individual ad targeting. Don't pretend scraped data is manual research when disclosing to clients.
What schema to expect
Whichever method you use, expect these fields per comment:
id— Instagram's comment IDtext— the comment bodyusername— author's IG handletimestamp— ISO 8601 UTClike_count— likes on the commentreply_count— number of replies (or a nestedrepliesarray)parent_id— for replies, the ID of the parent comment
ZocialComment's CSV ships a couple of additional convenience columns (author display name where available, parent flag) so you don't have to derive them. JSON preserves nested replies more cleanly than CSV — pick JSON if you're loading into pandas.
Frequently asked questions
Can I scrape comments on a post I don't own using the Graph API?
No. The Graph API only returns data for Pages your app has been authorized for. For competitor and creator research, you need a no-code exporter or Apify actor.
Will Meta block my scraper?
If you scrape from your own IP at any meaningful rate, eventually yes — Instagram returns challenge pages and rate-limit responses. Residential proxies and slow-pacing reduce the risk; hosted exporters handle this for you.
What's the cheapest way to scrape Instagram comments?
For one-off use, the no-code exporter free tier (3 posts/day, 100 comments each) is genuinely free. For automation, the $9 unlimited 3-day pass is usually cheaper than equivalent Apify run charges.
Can I scrape Instagram Stories?
No. Story replies are DMs, not public comments. The Graph API gives Story insights for your own account; no third party has access to Story replies on accounts they don't own.
How do I avoid getting rate-limited?
Within the Graph API, stay under the documented rate limits per Page. Outside it, use residential proxies and pace requests — but most projects don't need to solve this themselves because a hosted exporter already has.
Is there an Instagram comments API I can pay for?
Meta's Graph API is the only first-party option, and it's free but scoped to your own accounts. Third parties (Apify, hosted exporters) sell access programmatically — that's the effective "API" for everyone else.
Start with the lazy-good answer
Almost every "I need to scrape Instagram" project ends with a CSV. Skip the scraper-maintenance trap: run a free Instagram export to validate the data, grab the $9 pass if you need automation, and only build a custom scraper if a vendor genuinely can't serve your use case. AI analysis is a $20/mo subscription if you want scored sentiment instead of raw rows.