Instagram Post Scraper & Comment Replies
Pricing
from $4.99 / 1,000 results
Instagram Post Scraper & Comment Replies
Instagram Post Scraper & Comment Replies — Scrape Instagram posts with captions, media details, likes, timestamps, and comments, including comment replies. Extract structured engagement data for content research, audience analysis, and social media insights.
Pricing
from $4.99 / 1,000 results
Rating
0.0
(0)
Developer
API Empire
Maintained by CommunityActor stats
0
Bookmarked
5
Total users
4
Monthly active users
2 days ago
Last modified
Categories
Share
Instagram Comment Scraper — Extract Posts, Comments and Replies
Instagram Post Scraper & Comment Replies pulls posts, reels and TV videos from any public profile or post URL and returns the full comment thread underneath each one — including nested replies when you supply your own session cookie. Every post, comment and reply comes back as typed, normalized JSON: no HTML, no selectors, nothing to parse before it hits your database, spreadsheet or LLM context window. Two honest counters — declared vs. collected — travel with every row, so you always know how much of a thread you actually got instead of a number that only looks complete. Feed in a handful of usernames or a single post URL and walk away with a structured dataset of everything Instagram showed you.
What is Instagram Post Scraper & Comment Replies?
Instagram Post Scraper & Comment Replies is an Apify Actor that scrapes Instagram posts, the comments underneath them, and — with an optional session cookie — the replies nested under those comments. No Instagram account is required to collect posts or top-level comments; the Actor reads Instagram's own logged-out web and app surfaces directly. A session cookie is only needed to unlock real reply counts and reply text, and the run continues normally without one.
- Scrape posts, reels and IGTV videos from a username, a profile URL, or a single post/reel/tv URL
- Scrape the comment thread under each post, newest-first, up to your own cap
- Scrape replies nested under each comment when a session cookie is supplied
- Export as JSON, CSV, Excel or HTML table directly from the Apify Console, or pull it over the API
- No proxy management and no HTML parsing — Apify Proxy and the Actor's own parser handle both
What data does Instagram Post Scraper & Comment Replies collect?
The Actor returns three related entity types in a single run: the post itself, the comments underneath it, and the replies underneath those comments.
| Data Type | Key Fields | JSON Field Names |
|---|---|---|
| Posts | caption, likes, timestamp, media URLs, hashtags, mentions, owner | caption, likesCount, timestamp, displayUrl, images, hashtags, mentions, ownerUsername |
| Comments | comment text, author, likes, reply count | text, ownerUsername, likesCount, repliesCount, latestComments[] |
| Replies | reply text, author, timestamp, thread position | text, ownerUsername, timestamp, parentCommentId, latestComments[].replies[] |
Need more Instagram data?
If your project also needs profile-level data — bios, follower counts, following lists — or hashtag and location feeds, look for a dedicated Instagram profile or hashtag scraper elsewhere in the API Empire catalog rather than trying to stretch this Actor's comment-focused pipeline to cover them.
How does Instagram Post Scraper & Comment Replies differ from the official Instagram API?
Meta's Graph API for Instagram gives an app access to comment moderation and content on accounts the app owner controls, not arbitrary public accounts across the platform — this Actor reads any public profile or post directly.
| Feature | Instagram Graph API | Instagram Post Scraper & Comment Replies |
|---|---|---|
| Account scope | Your own connected Instagram business/creator account | Any public profile, post, reel or TV URL |
| Setup | Meta app review, Facebook Page linkage, OAuth token | Paste a target and press Start |
| Comment replies | Manage comments on your own posts | Reads reply threads under any public post (session cookie unlocks real counts) |
| Approval process | Meta app review required for most permissions | None — runs on the Apify platform immediately |
| Output consistency | Structured per Meta's schema, scoped to owned content | Structured JSON, same schema across every target |
| Historical posts | Limited to what your connected account manages | Paginates a profile's public post history up to your resultsLimit |
The Graph API is the right tool when you manage the Instagram account yourself and only need to moderate or read your own content. Instagram Post Scraper & Comment Replies is the right tool when you need structured data from accounts you do not control — competitors, creators, or any public conversation.
Why do developers and teams scrape Instagram comments and replies?
For AI engineers and agent builders
Comment threads are a direct feed of real, timestamped natural-language text tied to a specific post and author — useful for training sentiment classifiers, building RAG indexes over brand or product discussions, or giving an agent a tool call that returns latestComments[] and replies[] as ready-to-embed JSON instead of scraped HTML it has to clean up first.
For marketers and brand teams
Pull the comment thread under a competitor's campaign post or your own to see what the audience is actually saying — positive reactions, complaints, questions repeated across threads — without manually scrolling and copy-pasting. The topCommenters and verifiedCommentersCount fields make it easy to spot who is driving the conversation on a given post.
For researchers and analysts
Public comment threads are a legitimate, publicly-accessible data source for studying online discourse, community reaction to events, or engagement patterns over time. The Actor only returns what Instagram already serves to a logged-out visitor (plus replies, with your own session), so the scope stays limited to public data.
For developers building data products
Because every field name and type stays stable across runs, the output can sit directly behind a scheduled Apify run feeding a database, a dashboard, or a customer-facing API — no per-run schema surprises to code around.
How to scrape Instagram comments and replies (step by step)
- Open Instagram Post Scraper & Comment Replies on its Apify Store listing and click Try for free.
- Provide the required
usernameinput — one or more usernames, profile URLs, or post/reel/tv URLs, mixed freely in the same list. - Set
resultsLimit,maxCommentsandmaxRepliesPerCommentto control how deep the run goes, and choosedataDetailLevel(basicDatafor posts only,detailedDatafor the full comment thread). - Click Start and watch the run log, which reports per-post progress and a final summary of how many replies were fetched versus declared.
- Download the results as JSON, CSV, Excel or HTML table from the Storage tab, or pull them programmatically through the Apify API.
What to do when Instagram changes its structure
The Actor is actively maintained against Instagram's live web and app surfaces, and the output schema is designed to stay stable — field names and types on your end don't change even when the underlying page structure does.
⬇️ Input
All 12 input fields, read directly from the Actor's input schema:
| Parameter | Required | Type | Description | Example Value |
|---|---|---|---|---|
username | Yes | array | Usernames, profile URLs, or post/reel/tv URLs — one target per entry, mixed freely. Duplicates (natgeo, @natgeo, and the profile URL) are collapsed automatically. | ["natgeo", "https://www.instagram.com/p/SHORTCODE/"] |
resultsLimit | No | integer (default 10, min 1, max 100000) | Maximum posts saved per profile target. Ignored for single post URLs — one URL is always one row. | 25 |
maxComments | No | integer (default 50, min 0, max 5000) | Hard cap on top-level comments collected per post. Set to 0 to skip comments entirely. Only applies when dataDetailLevel is detailedData. | 100 |
onlyCommentsNewerThan | No | string, nullable (default null) | Keep only comments posted after this UTC moment. Accepts an absolute date/timestamp (2026-07-20) or a relative value (6 hours, 3 days, 1 week, 2 months, 1 year). | "3 days" |
emitCommentsDataset | No | boolean (default true) | When on, every comment (and every fetched reply) is additionally written to a second dataset named ig-comments-<runId>, one row per comment/reply. | true |
includeReplies | No | boolean (default true) | When on and a session cookie is supplied, real reply counts are read and replies are fetched into latestComments[].replies[]. When off, replies stays [] and repliesCount stays null. | true |
maxRepliesPerComment | No | integer (default 50, min 0, max 1000) | Cap on replies fetched under a single comment. Set to 0 to disable reply fetching entirely. | 50 |
sessionId | No | string, secret | Your Instagram sessionid cookie value, or the full cookie string (sessionid=...; csrftoken=...) — either form is accepted. Required only to unlock replies. | "58012345678%3Aabc123%3A..." |
skipPinnedPosts | No | boolean (default false) | When on, posts pinned to the top of the scraped profile's grid are dropped. | false |
onlyPostsNewerThan | No | string, nullable (default null) | Keep only posts published after this UTC moment. Same absolute/relative format as onlyCommentsNewerThan. | "2026-06-01" |
dataDetailLevel | No | string, enum (default "detailedData") | "detailedData" collects posts plus comment threads, alt text, carousel children, music info and paid-partnership flag. "basicData" collects posts only — fastest, no comments. | "detailedData" |
proxyConfiguration | No | object (default {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}) | Apify Proxy configuration for the run. | {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]} |
Example JSON input, every field shown:
{"username": ["natgeo", "https://www.instagram.com/p/C1a2B3cDeFg/"],"resultsLimit": 25,"maxComments": 100,"onlyCommentsNewerThan": "3 days","emitCommentsDataset": true,"includeReplies": true,"maxRepliesPerComment": 50,"sessionId": "","skipPinnedPosts": false,"onlyPostsNewerThan": "2026-06-01","dataDetailLevel": "detailedData","proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]}}
The single most common input mistake is expecting repliesCount to populate without a session cookie: logged out, Instagram itself never reports a reply count, so the Actor correctly returns null (unknown) instead of a fabricated 0 — paste a sessionId if you need real reply counts and reply text.
⬆️ Output
Every run writes typed, normalized JSON rows to the default dataset — one row per post — exportable as JSON, CSV, Excel, or HTML table from the Apify Console, or fetched through the API. Comments and replies are nested inside each post row's latestComments[] array; when emitCommentsDataset is on, they are additionally flattened into a second dataset, one row per comment and one row per fetched reply. The default dataset view surfaces 41 of the post row's fields as table columns; five conditional fields (videoUrl, videoDuration, videoViewCount, videoPlayCount, musicInfo) are always present in the underlying row's schema but only populated on video or clips posts, so they are left out of the default table view. All fields below are what the row-building code actually writes.
Scraped post
{"inputUrl": "https://www.instagram.com/natgeo/","id": "3312345678901234567","type": "Sidecar","shortCode": "C1a2B3cDeFg","caption": "A green sea turtle glides through the reef. #ocean #wildlife","hashtags": ["ocean", "wildlife"],"mentions": [],"url": "https://www.instagram.com/p/C1a2B3cDeFg/","commentsCount": 842,"commentsCollected": 100,"commentsHasMore": true,"commentsFetchStatus": "ok","commentsStoppedByDateCutoff": false,"commentsRequests": 8,"newestCommentAt": "2026-07-29T14:02:11.000Z","oldestCommentAt": "2026-07-22T09:41:03.000Z","verifiedCommentersCount": 3,"topCommenters": [{"username": "reefwatcher", "comments": 4}],"firstComment": "This made my day!","latestComments": [{"id": "17998812340012345","text": "This made my day!","ownerUsername": "reefwatcher","ownerProfilePicUrl": "https://scontent.cdninstagram.com/...","timestamp": "2026-07-29T14:02:11.000Z","repliesCount": 3,"replies": [{"id": "18007712340098765","text": "Same here!","timestamp": "2026-07-29T14:10:44.000Z","likesCount": 2,"parentCommentId": "17998812340012345","repliedToCommentId": null,"isReplyToReply": false,"position": 0,"isEdited": false,"byMediaOwner": false,"ownerUsername": "coralkeeper","ownerFullName": "Coral Keeper","ownerId": "9988776655","ownerIsVerified": false,"ownerIsPrivate": false,"ownerProfilePicUrl": "https://scontent.cdninstagram.com/...","ownerProfileUrl": "https://www.instagram.com/coralkeeper/","replyUrl": "https://www.instagram.com/p/C1a2B3cDeFg/c/17998812340012345/r/18007712340098765/"}],"likesCount": 56,"owner": {"id": "11223344556","is_verified": false,"profile_pic_url": "https://scontent.cdninstagram.com/...","username": "reefwatcher"},"commentUrl": "https://www.instagram.com/p/C1a2B3cDeFg/c/17998812340012345/","ownerProfileUrl": "https://www.instagram.com/reefwatcher/","ownerIsVerified": false,"gifUrl": null}],"repliesNotCollected": null,"repliesNotCollectedShare": null,"repliesCollected": 3,"repliesDeclared": 11,"repliesProbed": 9,"replyAccessStatus": "ok","timestamp": "2026-07-29T08:00:00.000Z","displayUrl": "https://scontent.cdninstagram.com/...","images": ["https://scontent.cdninstagram.com/..."],"alt": "Photo by National Geographic on July 29, 2026.","dimensionsHeight": 1350,"dimensionsWidth": 1080,"childPosts": [{"id": "3312345678901234568","type": "Image","shortCode": "C1a2B3cDeFg","url": "https://www.instagram.com/p/C1a2B3cDeFg/","dimensionsHeight": 1350,"dimensionsWidth": 1080,"displayUrl": "https://scontent.cdninstagram.com/...","images": ["https://scontent.cdninstagram.com/..."],"alt": "A green sea turtle over a coral reef."}],"productType": "carousel_container","isPaidPartnership": false,"isCommentsDisabled": false,"ownerUsername": "natgeo","ownerFullName": "National Geographic","ownerId": "528817151"}
Video posts additionally carry videoUrl, videoViewCount, videoDuration and, on detailed runs, videoPlayCount; carousel/clips posts additionally carry productType and (on detailed runs) musicInfo when Instagram supplies audio attribution; posts with tagged accounts or collaborators additionally carry taggedUsers and coauthorProducers.
Scraped comment (flat comments dataset row)
{"postShortCode": "C1a2B3cDeFg","postUrl": "https://www.instagram.com/p/C1a2B3cDeFg/","postOwnerUsername": "natgeo","postTimestamp": "2026-07-29T08:00:00.000Z","isReply": false,"parentCommentId": null,"repliedToCommentId": null,"commentId": "17998812340012345","commentUrl": "https://www.instagram.com/p/C1a2B3cDeFg/c/17998812340012345/","text": "This made my day!","timestamp": "2026-07-29T14:02:11.000Z","likesCount": 56,"repliesCount": 3,"repliesCollected": 3,"ownerUsername": "reefwatcher","ownerProfileUrl": "https://www.instagram.com/reefwatcher/","ownerIsVerified": false,"ownerProfilePicUrl": "https://scontent.cdninstagram.com/...","gifUrl": null}
Scraped reply (flat comments dataset row)
{"postShortCode": "C1a2B3cDeFg","postUrl": "https://www.instagram.com/p/C1a2B3cDeFg/","postOwnerUsername": "natgeo","postTimestamp": "2026-07-29T08:00:00.000Z","isReply": true,"parentCommentId": "17998812340012345","repliedToCommentId": null,"commentId": "18007712340098765","commentUrl": "https://www.instagram.com/p/C1a2B3cDeFg/c/17998812340012345/r/18007712340098765/","text": "Same here!","timestamp": "2026-07-29T14:10:44.000Z","likesCount": 2,"repliesCount": null,"repliesCollected": 0,"ownerUsername": "coralkeeper","ownerProfileUrl": "https://www.instagram.com/coralkeeper/","ownerIsVerified": false,"ownerProfilePicUrl": "https://scontent.cdninstagram.com/...","gifUrl": null}
How does Instagram Post Scraper & Comment Replies compare to other Instagram scrapers?
| Feature | Instagram Post Scraper & Comment Replies | Generic alternative |
|---|---|---|
| Output format | Typed, normalized JSON, stable field names | Often the same, but varies by tool |
| Reply/nested-comment extraction | Fetches replies into latestComments[].replies[], session-gated | Frequently limited to top-level comments only |
| Input flexibility | Accepts usernames, profile URLs, and post/reel/tv URLs in one list | Often restricted to one input type per run |
| Declared vs. collected honesty | Publishes repliesDeclared and repliesCollected side by side, null when unknown | Often reports a single count with no distinction between declared and fetched |
| Proxy/anti-bot handling | Apify Proxy with residential default, automatic retries and concurrency limits | Varies; some require you to supply your own proxy |
Checked on the Apify Store on 2026-07-30: Export Instagram Comments and Posts is a free wrapper Actor whose own README states it triggers two separate pay-per-event Actors ($2.30 per 1,000 scraped results each) and does not document reply or child-comment extraction in its output. Instagram [Only $0.75💰] Get Post info - All Comments & Replies does fetch nested replies but its input is post URLs only — it does not document paginating a profile's post history the way this Actor's username + resultsLimit inputs do.
If you're building an AI agent or RAG pipeline, the output format row is the decision-maker — parsing HTML inside an agent loop is a reliability failure mode, not a feature.
How many results can you scrape with Instagram Post Scraper & Comment Replies?
resultsLimit accepts up to 100,000 posts per profile (default 10), maxComments accepts up to 5,000 top-level comments per post (default 50), and maxRepliesPerComment accepts up to 1,000 replies per comment (default 50) — there is no hard cap in the Actor itself below those schema maximums. Pagination is automatic: profiles are paged through Instagram's feed 12 posts at a time, comments are paged roughly 13 at a time (roughly 15 at a time from the session-only threaded listing), and replies are paged 6-9 at a time, all until your cap, the date cutoff, or Instagram's own thread runs out. Two built-in ceilings exist purely as cost guards and apply regardless of your inputs: the session-only threaded comment listing reads at most 60 pages per post, and reply fetching probes at most 500 comment threads per post. Larger requests take longer — they are not blocked, just slower.
Integrate Instagram Post Scraper & Comment Replies and automate your workflow
Instagram Post Scraper & Comment Replies works with any language or tool that can send an HTTP request, since every run is driven through the Apify platform's REST API and client libraries.
REST API integration
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_API_TOKEN>")run = client.actor("instagram-post-scraper-comment-replies").call(run_input={"username": ["natgeo"],"resultsLimit": 25,"maxComments": 100,"includeReplies": True,})for post in client.dataset(run["defaultDatasetId"]).iterate_items():print(post["shortCode"], post["commentsCollected"], post["repliesDeclared"])
Works in Python, Node.js, Go, Ruby, cURL — anything that can call the Apify API and read back a dataset.
Automation platforms (n8n, Make, LangChain)
The Actor runs like any Apify Actor inside Apify's own integrations: trigger it from a Make scenario using the Apify module's "Run an Actor" action, or from n8n using the Apify node, either passing the same input JSON shown above and reading the resulting dataset back into the rest of your flow. A LangChain or similar agent framework can call it as a tool by wrapping the apify_client call above and returning dataset.iterate_items() directly as the tool's structured result.
Is it legal to scrape Instagram comments?
Scraping public data is generally legal, but this Actor returns personal data — usernames, profile pictures, and comment or reply text tied to identifiable people — so privacy law applies to what you do with it, not just to collecting it. Instagram Post Scraper & Comment Replies only reads content that Instagram already serves to a logged-out visitor (or, for replies, to your own logged-in session), and never accesses private accounts or restricted content. Storing or processing comments and replies at scale can bring you under GDPR, CCPA, or similar privacy regimes depending on your jurisdiction and the data subjects involved, on top of Instagram's own Terms of Service. Consult legal counsel for commercial use cases involving bulk personal data.
❓ Frequently asked questions
Does Instagram Post Scraper & Comment Replies work without an Instagram account?
Yes for posts and top-level comments — both are read from Instagram's logged-out web and app surfaces with no credentials at all. A session cookie (sessionId) is only needed to unlock real reply counts and reply text; without one, every repliesCount stays null (unknown, never a fabricated zero).
How often is the scraped data updated?
Every run performs a live fetch directly against Instagram at the moment it executes — nothing is served from a cache. Run the Actor again, or put it on an Apify schedule, whenever you need fresher data.
What happens if a post is deleted, private, or age-gated?
The Actor reports the failure per target instead of silently returning nothing: a private account is flagged as "the account is PRIVATE — no posts are readable", and a post URL that returns HTTP 200 with no media object is reported as private, removed, or behind an age/login gate. The run only fails outright if every target in the input produces zero rows.
Can I scrape private Instagram accounts or restricted content?
No. Only publicly accessible profiles, posts and comment threads are returned. A session cookie extends access to reply text and real reply counts on public posts — it does not unlock private accounts.
What exactly gets charged when I run this Actor?
Only saved post rows are billed, under the row_result pay-per-event: one charge per post written to the default dataset. The optional flat comments dataset (ig-comments-<runId>, enabled by emitCommentsDataset) writes one row per comment and one row per fetched reply, and none of those extra rows are charged — they ride along for free on top of the post you already paid for.
Does Instagram Post Scraper & Comment Replies work for AI agent workflows and LLM pipelines?
Yes. It is callable as an HTTP endpoint through the Apify API from any agent framework — every response is typed JSON with stable field names, so there is no HTML or selector-parsing step before passing a post or comment thread into an LLM context window or a vector store.
How does Instagram Post Scraper & Comment Replies handle Instagram's anti-bot system?
Requests run through Apify Proxy (residential by default, with a datacenter group as a configurable, cheaper alternative), each request retries up to 3 times with a linear backoff, and post and reply fetching are concurrency-limited (6 posts and 3 reply threads in flight at a time) rather than fired all at once. A supplied session cookie is verified once at the start of the run; if Instagram rejects it, the Actor logs that once, drops the cookie, and finishes the run logged out instead of retrying in a loop or failing.
How does Instagram Post Scraper & Comment Replies compare to other Instagram scrapers?
Checked on the Apify Store on 2026-07-30: Export Instagram Comments and Posts does not document reply or nested-comment extraction and its README states it triggers two additional pay-per-event Actors to do the actual scraping. Instagram [Only $0.75💰] Get Post info - All Comments & Replies does fetch replies but only accepts post URLs as input, with no documented profile-level pagination.
Does Instagram Post Scraper & Comment Replies return data in a format LLMs can use directly?
Yes. Every post, comment and reply is typed, normalized JSON with stable field names — no HTML, no selectors, no parsing step. Pass it directly into an LLM prompt, index it into a vector store, or route it through an agent tool call.
Can I use Instagram Post Scraper & Comment Replies without managing proxies?
Yes. Apify Proxy is wired in by default (RESIDENTIAL group) and is fully configurable through the proxyConfiguration input; you never need to source, rotate, or pay for proxies yourself.
What happens when Instagram changes its structure or blocks the scraper?
The Actor is actively maintained and the output schema is designed to stay stable — field names and types on your end don't change even when Instagram's underlying page or API structure does.
💬 Your feedback
Found a bug or missing a field? We want to know. Reach out through the Actor's page on the Apify Store or your Apify Console support channel, and we'll take a look.