Instagram Comment Scraper avatar

Instagram Comment Scraper

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Instagram Comment Scraper

Instagram Comment Scraper

Extract available comments from public Instagram posts and reels: comment text, usernames, user IDs, verified badges, timestamps, like counts, and post links. With an optional Session ID, a run can go past the public preview and collect replies.

Pricing

from $1.00 / 1,000 results

Rating

5.0

(2)

Developer

Rush

Rush

Maintained by Community

Actor stats

5

Bookmarked

381

Total users

34

Monthly active users

2 days ago

Last modified

Share

Extract available comments and replies from public Instagram posts and reels. Get comment text, usernames, timestamps, and post context when Instagram supplies them. Leave Session ID empty for available public previews, or provide a Session ID for signed-in collection. A supplied session must pass verification before collection starts.

Features

  • Public preview or signed-in collection — choose available public previews or use your Session ID to request more comments and replies
  • Comments and replies — one row per top-level comment, with available replies nested inside it when requested with a Session ID
  • Source-based fields — text, author, verification status, profile picture, timestamp, and counts when available; unknown counts stay null
  • Progressive results — saved comments appear in the dataset during the run
  • Batch processing — up to 50 posts or reels per run
  • Checked progress — saved progress is checked against the dataset before continuing after a restart; an unconfirmed save stops for review

Collection is bounded: Max Comments Per Post defaults to 200 (range: 10–100,000), and the whole run can save at most 100,000 top-level comment rows. Requests, reply collection, and available run resources are also limited. These are upper bounds, not promises to collect every comment or reach a requested count.

What data do you get

For each comment extracted, you receive:

  • Comment text — comment content supplied by Instagram
  • Commenter info — username, user ID, verification status, and profile picture URL when available
  • Timestamp — posting time in ISO 8601 format, or null when unavailable
  • Comment likes — reported like count, or null when unknown
  • Reply comments — available reply content nested inside each parent comment when requested with a Session ID
  • Reply count — reported number of replies, or null when unknown
  • Post context — post URL and shortcode, plus the author username and reported comment total when available

How to use

  1. Go to the Input tab
  2. Add Instagram post or reel URLs, one per line (up to 50 per run)
  3. (Optional) Add your Session ID to request signed-in comments and replies
  4. (Optional, requires Session ID) Enable Include Reply Comments to request available reply content
  5. Click Start and wait for the results
  6. Open Comments Overview or Full Details, then check Run summary and the run log for limits, missing data, or saving issues before using the export

Accepted input formats

FormatExample
Post URLhttps://www.instagram.com/p/ABC123/
Reel URLhttps://www.instagram.com/reel/ABC123/
Link with the author's namehttps://www.instagram.com/username/reel/ABC123/
ShortcodeABC123

Links copied from Instagram also work as /reels/ABC123/, /tv/ABC123/, embed links, comment and reply links, instagr.am and m.instagram.com links, links typed with full-width characters, and links without https://. Duplicate inputs pointing to the same post are combined. Each URL or shortcode can contain at most 512 characters; Session ID has the same limit, checked when the run starts.

An input that cannot be read as an Instagram post or reel link, such as a profile link, a share link, or an entry that names more than one post or holds extra text beside its link, is skipped and the other posts are still collected. The log names the first 10 skipped inputs with the reason, the run summary counts all of them, and the run's status is partial. Blank entries are ignored. When no input can be read as a post or reel, the run stops before collecting and writes no run summary. Some usernames look like shortcodes and are tried as posts; use the post's link instead.

Input example

Illustrative input only. Replace ABC123 with a post you want to collect; it is not a verified example post. This example uses public-preview mode.

{
"postUrls": ["https://www.instagram.com/p/ABC123/"],
"maxComments": 200,
"includeReplies": false
}

Using a Session ID (optional)

With no Session ID, the scraper requests the public comment preview Instagram makes available. For signed-in comment collection and optional reply extraction, provide your Instagram Session ID. A session does not guarantee access to a post, complete threads, or known like counts.

What you get with a Session ID

FeatureWithout Session IDWith Session ID
Comments per postAvailable public preview, up to your limitAvailable signed-in results, up to your limit and run limits
Reply commentsNot supportedAvailable replies when Include Reply Comments is enabled
Comment like countsReported count, or null if unknownReported count, or null if unknown
Posts restricted to signed-in viewersCannot be collected without an allowed sessionAccess depends on Instagram and the account's permissions
Session verificationNot usedRequired; failure stops the run

How to find your Session ID

Method 1 — Browser Developer Tools

  1. Log in to Instagram in your browser
  2. Open Developer Tools (F12)
  3. Go to Application → Cookies → https://www.instagram.com
  4. Find the cookie named sessionid
  5. Copy its value and paste it into the Session ID field. If you paste sessionid=… or a whole cookie line instead, only the sessionid value is used

Method 2 — Cookie Editor extension

  1. Install a cookie editor extension for your browser (e.g., Cookie-Editor for Chrome/Firefox/Edge)
  2. Go to instagram.com and make sure you are logged in
  3. Click the extension icon
  4. Find the cookie named sessionid
  5. Copy its Value and paste it into the Session ID field

Note: Cookie editor extensions are third-party tools not affiliated with this scraper or Apify. Use them at your own discretion and only install extensions from trusted sources.

Important notes

  • The Session ID field is marked as secret in the input form. Treat its value as an account credential and do not put it in shared examples or support messages
  • If a supplied session is invalid, expired, or cannot be verified, the run stops instead of switching to public-preview mode. Public-preview mode is selected only when no Session ID is supplied
  • Before each run, confirm the account can open Instagram normally and copy a fresh Session ID. A fresh Session ID does not guarantee access or prevent restrictions
  • Use Max Comments Per Post to limit top-level rows (default: 200, range: 10–100,000). The run-wide cap is 100,000 rows across all posts, including rows already saved before a restart
  • Enable Include Reply Comments with a Session ID to request available replies. Replies are nested in their parent row and do not count as additional top-level rows. Without a Session ID, replies are not collected: the run saves the comments, reports itself partial, and says that replies need a Session ID
  • Collecting replies takes more requests and time per comment, so a run with replies can stop before reaching Max Comments Per Post. The run summary then says which limit was reached

Usage considerations

  • Start small — Begin with 1 post, Max Comments set to 10, and replies disabled. Check the saved results and confirm normal account access before increasing the scope. A small result limit does not remove the risk of account restrictions.
  • Automated activity may be flagged by Instagram and can lead to temporary limits or, in more serious cases, restrictions on an account — please use this scraper thoughtfully and avoid excessive back-to-back runs
  • Using a Session ID means your account is being used for automated data access. This can result in temporary rate limiting, session expiration, or in more serious cases account restrictions
  • Use a secondary or dedicated account instead of your main account. Avoid frequent or back-to-back runs; Instagram may identify automated activity and temporarily restrict the account
  • Comments are saved progressively. When replies are enabled, the scraper requests replies before saving the parent comment
  • Comments may be saved in a different order from Instagram's display. The index field records the saved order within each post
  • A run has a 10,000-request allowance, including retries and redirects. Reply requests share this allowance, and individual comment and reply collections have additional bounds. Available run resources can stop collection earlier. Already collected comments are kept when they can be saved and verified within the remaining allowance

Output

Overview fields

FieldDescription
postShortcodeInstagram shortcode identifier
usernameCommenter username
profileUrlLink to the commenter's Instagram profile
textComment text supplied by Instagram
repliesCountReported reply count, or null
commentLikeCountReported like count, or null
timestampPosting time, or null
postUrlLink to the original post

Full detail fields

FieldTypeDescription
postUrlstringDirect URL to the Instagram post or reel
postShortcodestringInstagram shortcode identifier
postOwnerUsernamestring/nullUsername of the post author
postCommentCountinteger/nullComment total reported for the post; not a count of rows saved
commentIdstringRequired top-level comment identifier: 1–32 decimal digits. A row without a valid ID cannot be saved
textstringSupplied comment text; empty when unavailable. A GIF URL may be represented as [GIF] <url>
usernamestring/nullCommenter username
profileUrlstring/nullDirect link to the commenter's Instagram profile
userIdstring/nullCommenter user ID
isVerifiedboolean/nullReported verification status, or null when unknown
profilePicUrlstring/nullURL of commenter's profile picture
timestampstring/nullWhen the comment was posted (ISO 8601)
commentLikeCountinteger/nullReported non-negative like count, or null when unknown
repliesCountinteger/nullReported non-negative reply count, or null when unknown
repliesarrayCollected replies; may be empty or incomplete even when repliesCount is positive
indexintegerSaved row position within this post (1-based), not Instagram's ranking
scrapedAtstringExtraction timestamp (ISO 8601)

Reply comment fields

Each reply in the replies array contains:

FieldTypeDescription
idstringRequired reply identifier: 1–32 decimal digits. Replies without a valid ID are not saved
textstringSupplied reply text; empty when unavailable. A GIF URL may be represented as [GIF] <url>
ownerUsernamestring/nullReply author username
ownerProfileUrlstring/nullDirect link to the reply author's Instagram profile
ownerProfilePicUrlstring/nullURL of reply author's profile picture
timestampstring/nullWhen the reply was posted (ISO 8601)
likesCountinteger/nullReported non-negative like count, or null when unknown
repliesCountinteger/nullReported non-negative child count, or null when unknown; not assumed to be zero
repliesarrayEmpty; further nesting is not collected

Unknown or invalid counts remain null. Counts are accepted only as non-negative safe integers; they are not guessed, rounded, or filled from the number of collected replies. 0 means the source supplied zero. An empty replies array does not prove that no replies exist.

Run summary

The Run summary output links to the OUTPUT record. Check it together with the run status and log; a successful platform status alone does not establish complete collection.

statusMeaning
completeCollection finished within the configured scope without a recorded shortfall. This does not certify that every Instagram comment or reply was collected
partialSome requested information could not be collected, an input was skipped, a public preview was used, or collection was interrupted or limited
budget_reachedThe run reached one of its limits: its request or resource allowance, its time limit, the maximum charge set for it, or the run-wide saved-row cap
failedCollection or saving could not be safely completed; review the message, log, and saved results

The record also contains savedComments (saved top-level rows), requestedPosts (distinct valid posts), skippedInputs (inputs skipped because they are not post or reel links), requestCount, a message, and a posts array with each shortcode and its savedComments. Replies remain inside their parent rows. An early startup or storage failure may prevent a summary from being written; a missing summary is not evidence of success.

Before continuing the same run, the scraper checks its remaining resources and then verifies saved progress against the dataset. If the remaining allowance cannot be verified or has been exhausted, collection stops and existing saved comments are kept. A run that stopped because its resource allowance or time limit was reached may be continued; the continuation checks its own resources first and starts from the first post that was not finished. Each continuation is charged as a new Actor start, and it does not add replies to comments that were already saved. A run that reached its maximum charge, its request allowance, or the run-wide saved-row cap collects nothing more when continued; start a new run instead. If those resources cannot cover the progress already saved, the continuation stops before making any request and keeps what was saved. This can also prevent older runs from continuing after an update. If a previous append has an uncertain outcome and verification can proceed, the scraper checks whether that comment is present. If it cannot confirm the save, it stops for review instead of blindly appending the comment again. This is not a guarantee of uninterrupted or exactly-once delivery. Review saved results before starting another run; a new run creates a separate collection.

Sample output

Illustrative only: These examples describe the output structure, not observed Instagram data. All post identifiers, accounts, IDs, text, counts, and timestamps are fictional. The placeholder posts are not verified to exist. null demonstrates an unknown value.

Post URL example (/p/)

{
"postUrl": "https://www.instagram.com/p/ABC123/",
"postShortcode": "ABC123",
"postOwnerUsername": null,
"postCommentCount": null,
"commentId": "18000000000000001",
"text": "Example comment text.",
"username": "example_commenter",
"profileUrl": "https://www.instagram.com/example_commenter",
"userId": "12345678",
"isVerified": null,
"profilePicUrl": null,
"timestamp": "2026-02-15T08:30:22.000Z",
"commentLikeCount": null,
"repliesCount": null,
"replies": [],
"index": 1,
"scrapedAt": "2026-02-23T04:01:31.984Z"
}

Reel URL example (/reel/)

{
"postUrl": "https://www.instagram.com/reel/REEL01/",
"postShortcode": "REEL01",
"postOwnerUsername": "example_post_author",
"postCommentCount": 10,
"commentId": "18000000000000002",
"text": "Example question about the reel.",
"username": "example_commenter",
"profileUrl": "https://www.instagram.com/example_commenter",
"userId": "12345678",
"isVerified": false,
"profilePicUrl": null,
"timestamp": "2026-01-09T14:56:18.000Z",
"commentLikeCount": 0,
"repliesCount": 1,
"replies": [
{
"id": "18000000000000003",
"text": "Example reply to the question.",
"ownerUsername": "example_reply_author",
"ownerProfileUrl": "https://www.instagram.com/example_reply_author",
"ownerProfilePicUrl": null,
"timestamp": "2026-01-09T15:02:45.000Z",
"likesCount": null,
"repliesCount": null,
"replies": []
}
],
"index": 1,
"scrapedAt": "2026-02-23T04:01:31.984Z"
}

Tips and best practices

  • Export formats — Download results as JSON, CSV, or Excel from the dataset. Use JSON to retain nested reply objects
  • Scheduling — Set up automatic runs to track comments on posts over time
  • API access — Integrate with your tools using the Apify API

Integrations

Connect your data to Google Sheets, Slack, Zapier, Make, or any tool via the Apify integrations.

Use cases

  • Social listening — Monitor what people say about brands, products, or topics
  • Sentiment analysis — Analyze comment tone and keywords at scale
  • Competitor research — Track audience reactions to competitor content
  • Content strategy — Understand which posts generate the most engaging discussions
  • Influencer marketing — Evaluate comment quality and engagement authenticity

FAQ

How many comments are extracted per post? Max Comments Per Post is an upper bound on saved top-level rows, not a promised count. The whole run is limited to 100,000 saved rows across all posts and a shared request allowance. Public previews, access restrictions, unavailable replies, and collection limits can all reduce the result count. Collecting replies takes more requests and time per comment and can stop a run sooner. Neither reaching your limit nor complete means every comment on Instagram was collected.

Does this scraper need an Instagram account? Not for an available public preview. Signed-in collection and reply extraction require a Session ID. Counts can still be unknown in either mode.

What happens if my Session ID expires? If the supplied session cannot be verified, the run stops. It does not silently switch to public-preview mode. Check the account in Instagram and provide a current Session ID. If Instagram refuses the signed-in requests during a run, the run stops there, keeps the comments it saved, and says so. Try again later in a new run, with a fresh Session ID if it keeps happening: continuing the same run would send the same Session ID again. If you deliberately want a public-preview run, remove the Session ID before starting a new run; replies are not collected without one.

The run says Instagram wants my account to complete a security check — what is that? Open Instagram in a browser, sign in to the account, and follow any verification instructions it shows. Then check the Session ID before another run. This can also happen during a run: the run then stops and keeps the comments it saved. Already saved rows remain available for review. A security-check message alone does not establish whether the session, posts, or later requests will work after verification.

What happens if a post is private or deleted? The scraper reports posts it cannot access. That does not prove they are private or deleted: access restrictions or an unreadable response can also prevent collection. Other posts may still be processed unless a run-wide restriction, limit, or saving issue stops the run.

Why does a post say it can only be viewed while signed in? Instagram indicated that signed-in access is needed. Check that your account can open the post and supply its Session ID for a new run. A Session ID does not guarantee that Instagram will provide the requested comments.

What happens if the scraper is rate limited? Without a Session ID, a request that is refused, answers with a server error, or does not answer is tried again on another connection a limited number of times. When no other connection is available, a refused or unanswered post is skipped, and a server error stops the run so it can be continued later. A post that still cannot be opened is skipped and named by its link in the log, and the run moves on to the next post; a skipped post is not reopened by continuing the run, so include it in a new run. When several posts in a row cannot be opened, or the last post cannot be opened, the run stops there; the posts skipped just before it are handed back, and continuing the run tries them again. The same hand-back applies when the run stops while opening a post for another reason that a continuation can clear, including when its allowance or time limit is reached. With a Session ID, collection stops at the first restriction to protect the account. Review the already saved rows, run log, and summary; do not assume the remaining comments were collected or that an immediate rerun will succeed.

A post's log line says "some requested information could not be collected" — what does that mean? The scraper could not establish that collection reached the end. Without a Session ID this is expected: Instagram's public preview shows only part of a post's comments, so every public-preview post is reported this way, including a post that shows no comments. More data may exist, but it could not be requested or read within the run's limits. Review the saved rows and OUTPUT; another run is not guaranteed to return the missing comments.

A post "opened but its comments could not be read" — is it broken? The response identified the post, but the scraper could not read the expected comment information. This does not prove the post is deleted or that the problem is temporary. Check the post in Instagram and review the run log before deciding whether to try again.

Can I scrape reply comments (nested comments)? Enable Include Reply Comments and provide a Session ID. Collected replies appear in the parent's replies array. Replies may be incomplete, and their count and like fields may be null. Further reply nesting is not collected. Without a Session ID, the comments are still saved without replies, the run is partial, and its summary says that replies need a Session ID.

Why are counts blank or null? Instagram did not provide a valid non-negative integer for that field. Unknown is not zero. The number of saved replies is not used to invent repliesCount, and a Session ID does not guarantee known counts.

Why is repliesCount different from the number of saved replies? repliesCount preserves Instagram's reported count, while replies contains the replies actually collected. When reply collection is enabled, a known mismatch makes the run summary partial, even if Instagram stops offering more replies. The mismatch alone does not tell us whether a reply was deleted, hidden, or unavailable for another reason. Valid replies already collected are kept; a very large thread is cut at a reply limit.

Can a run continue after a restart or an uncertain save? The scraper can continue unfinished posts when the same run's remaining resources, input, progress, and dataset pass verification. Exhausted or unverifiable resources can prevent continuation, including for older runs after an update; already saved comments remain available. A temporary connection interruption keeps unfinished posts available for a later continuation; it does not automatically restart collection. When Instagram refuses the signed-in requests or asks for a security check, the run says what to do instead. Check that the account can open Instagram normally before continuing, and avoid immediate repeated attempts after a restriction.

A continuation uses the original inputs, including the Session ID, and shares the run's existing limits. To change those inputs, start a new run. Already saved comments and their replies are kept without replacement, and posts previously marked finished are not reopened. An uncertain save must be confirmed in the dataset before collection continues; otherwise the run stops for review. Review the dataset and summary so you do not mistake repeated collection for new comments.

Do I have to wait for the whole run to finish? You can inspect already saved comments while the run is in progress. When replies are enabled, reply collection happens before the parent row is saved. Wait for the final run status and review OUTPUT before treating an export as the run's finished result.

More Actors

Looking for other Instagram data? Explore more scrapers by futurizerush.

Disclaimer

This tool is provided for educational and research purposes only. Users are solely responsible for ensuring their use complies with Instagram's Terms of Service and all applicable laws and regulations.

By using this scraper, you acknowledge that:

  • Automated data collection from Instagram carries inherent risks, including potential account restrictions or suspension
  • Providing a Session ID means authorizing this tool to make requests on behalf of your Instagram account. Instagram may classify this activity as automated access
  • The developers of this tool are not responsible for any consequences resulting from its use, including but not limited to account restrictions, data loss, or legal liability
  • You should use this tool ethically and responsibly, respecting the privacy and rights of content creators and commenters
  • Extracted data should be handled in compliance with applicable data protection regulations

Keywords: Instagram comment scraper, Instagram comments export, extract Instagram comments, Instagram reel comments, comment scraper, social media data, audience insights, Claude Code, OpenClaw, Gemini, Antigravity, Codex, ChatGPT