Instagram Comment Scraper avatar

Instagram Comment Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Instagram Comment Scraper

Instagram Comment Scraper

Extract comments from Instagram posts and reels with complete metadata including replies, likes, and author details. Features smart pagination, reply threading, and safe browser automation.

Pricing

from $5.00 / 1,000 results

Rating

5.0

(1)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

3

Bookmarked

126

Total users

11

Monthly active users

4 days ago

Last modified

Share

Scrape comments from any Instagram post or reel with complete metadata — author info, likes, reply threading, timestamps, mentions, hashtags, and media attachments. Supports both /p/ post URLs and /reel/ URLs. Handles all comment types including text, images, GIFs, stickers, and shared reels.

What this actor does

  • Posts & Reels — Works with both /p/ and /reel/ Instagram URL formats
  • Full comment metadata — Text, author details, likes, timestamps, mentions, hashtags, edit status
  • Reply threading — Expands nested reply threads and links each reply back to its parent comment and author
  • Smart pagination — Automatically fetches all available comment pages up to your configured limit
  • Media comments — Detects and labels image, video, reel, GIF, and sticker comments with readable placeholders when URLs are unavailable
  • Multiple posts — Process a batch of URLs in a single run
  • Reliable — Built-in retry logic and automatic managed session rotation

Authentication

This actor requires Instagram session cookies to access post comments (Instagram does not expose comment data to logged-out users). You can either:

  1. Paste your own cookies — export from a logged-in browser session using a tool such as Cookie-Editor and paste the JSON into the cookies field.
  2. Leave the cookies field blank — the actor will automatically use a managed pool of shared Instagram sessions. This is the recommended option for most users.

If your cookies expire mid-run, re-export them from your browser and restart the actor.

Output per comment record

Always present

  • commentId — unique numeric identifier for the comment
  • text — comment text; media-only comments show a readable placeholder such as [Image], [GIF:id], [Reel: url], or [Photo unavailable]
  • commentType — content type: text, image, video, reel, photo_share, album_share, gif, sticker
  • isGiftrue if the comment is a GIF reaction
  • authorUsername — Instagram handle of the commenter
  • authorId — numeric Instagram user ID of the commenter
  • authorIsVerifiedtrue if the commenter has a blue verification badge
  • authorProfilePic — CDN URL of the commenter's profile picture
  • timestamp — when the comment was posted (ISO 8601)
  • likesCount — number of likes on the comment
  • replyCount — number of replies to this comment
  • isReplytrue if this is a reply to another comment
  • isEditedtrue if the comment was edited after posting
  • mentions — list of @mentioned usernames extracted from the comment text
  • hashtags — list of #hashtags extracted from the comment text
  • postUrl — URL of the Instagram post being scraped
  • postShortcode — short alphanumeric identifier of the source post
  • commentUrl — direct URL to this specific comment
  • scrapedAt — ISO 8601 timestamp of when the record was collected

Present only for replies

  • parentCommentId — ID of the top-level comment this reply belongs to
  • parentCommentAuthor — username of the top-level comment author

Present when a media URL is available

  • mediaUrl — CDN URL of the attached media file; currently only populated for GIF comments, where Instagram's API returns a direct link

Input

FieldTypeDefaultDescription
postUrlsarrayrequiredInstagram post or reel URLs to scrape
maxCommentsPerPostinteger100Max comments per post, up to 10000
includeRepliesbooleantrueExpand and include reply threads
maxRepliesPerCommentinteger0Max replies to fetch per individual comment thread. 0 = unlimited. Applied to every thread when includeReplies is true
cookiesstringInstagram cookies in JSON format. Leave blank to use the managed session pool
sessionNamestringKey-value store key for a previously saved session (advanced use)

Example: scrape comments from a single post

{
"postUrls": ["https://www.instagram.com/p/ABC123xyz/"],
"maxCommentsPerPost": 100,
"includeReplies": true,
"maxRepliesPerComment": 20
}

Example: multiple posts, top-level comments only

{
"postUrls": [
"https://www.instagram.com/p/ABC123xyz/",
"https://www.instagram.com/reel/DEF456uvw/"
],
"maxCommentsPerPost": 200,
"includeReplies": false
}

Example: large crawl with your own cookies

{
"postUrls": ["https://www.instagram.com/p/ABC123xyz/"],
"maxCommentsPerPost": 10000,
"includeReplies": true,
"maxRepliesPerComment": 50,
"cookies": "[{\"name\":\"sessionid\",\"value\":\"YOUR_SESSION_ID\",...}]"
}

Example output

{
"commentId": "17843670504683182",
"text": "Congrats! 🎉 @friendname check this out",
"commentType": "text",
"isGif": false,
"authorUsername": "user123",
"authorId": "427553890",
"authorIsVerified": false,
"authorProfilePic": "https://scontent.cdninstagram.com/...",
"timestamp": "2025-05-01T14:32:10",
"likesCount": 12,
"replyCount": 3,
"isReply": false,
"isEdited": false,
"mentions": ["friendname"],
"postUrl": "https://www.instagram.com/p/ABC123xyz/",
"postShortcode": "ABC123xyz",
"commentUrl": "https://www.instagram.com/p/ABC123xyz/c/17843670504683182/",
"scrapedAt": "2025-12-04T13:06:03.499460"
}

Media comment limitation

Instagram's web API withholds the direct CDN URL for most attached media (image, video, reel) and only returns a placeholder string (e.g. "Photo unavailable") or, in some cases, no field at all — GIF comments are the exception, where a real CDN URL is available.

Situationtext fieldmediaUrl
Regular text commentFull comment text
Image comment (web API restricted)[Photo unavailable] or [Image]
Reel/video comment (web API restricted)[Reel unavailable] or [Video unavailable]
GIF (Giphy) comment[GIF:id]CDN URL ✓
Shared reel or post[Reel: url] or [Post: url]

The commentType field is always set (image, video, reel, gif, etc.) so you can identify what kind of media was attached even when no URL is available. Comments with no text and no matching media field from Instagram default to commentType: "image", since that's the most common cause of this pattern.

Use cases

  • Sentiment analysis — collect comment text at scale to understand audience reaction to a post or campaign
  • Community moderation — monitor comments on your own posts to identify spam, toxicity, or rule violations
  • Influencer research — analyse engagement quality on an influencer's posts before signing a collaboration
  • Competitor benchmarking — compare comment volume and engagement patterns across competing accounts
  • Trend detection — track which topics and hashtags are being mentioned in comments on viral posts
  • Lead generation — identify users who have commented on relevant posts in your niche
  • Content research — see what questions and feedback audiences leave on posts similar to yours

FAQ

Do I need an Instagram account to use this actor? The actor accesses Instagram as a logged-in user because comment data is not fully accessible to logged-out visitors. You can either provide your own cookies or leave the field blank and use the built-in managed session pool.

Will this work on private accounts? Comments on private posts are only accessible if the session used belongs to an account that follows the private profile. If the session does not follow the account, the actor will return zero comments for that post.

How many comments can I scrape per run? Up to 10000 comments per post — set maxCommentsPerPost accordingly. Unlimited scraping isn't supported, so very popular posts with more comments than that will be capped at the first 10000.

What does maxRepliesPerComment control? When includeReplies is true, replies are fetched for every comment thread that has them. maxRepliesPerComment caps how many replies are returned per individual thread — for example, 5 means at most 5 replies per parent comment. Set it to 0 (the default) to fetch all replies for every thread.

Why do some comments show [Photo unavailable] instead of an image? Instagram's web API withholds media file URLs for certain comment types and only returns a placeholder string. The commentType field will still show image so you know a media comment was present. See the Media comment limitation section for full details.

How fresh is the data? Data is scraped live at the time of the run. Comments reflect the current state of the post at the moment of scraping.

Is this actor affiliated with Instagram or Meta? No. This is an independent third-party tool that automates interaction with the public Instagram website. It is not endorsed by or affiliated with Meta Platforms, Inc.

Other Instagram Scrapers

Want to get other data from Instagram? Check out our complete suite of Instagram scrapers:

ActorDescription
Instagram Post ScraperScrape public posts, reels, IGTV, and carousel posts from direct URLs — no login or cookies required
Instagram Profile ScraperExtract profile data, bio, follower counts, and more
Instagram Followers & Following ScraperScrape followers and following lists from any profile
Instagram Tagged Posts ScraperCollect posts where a user has been tagged
Instagram Hashtag ScraperScrape posts and profiles by hashtag
Instagram Story DownloaderDownload stories from Instagram profiles
Instagram Downloader APIDownload photos, videos, and reels from Instagram
Instagram Keyword ScraperSearch and scrape posts by keyword
Instagram Keyword Search ScraperSearch Instagram accounts and posts by keyword
Instagram Transcript ScraperExtract transcripts from Instagram video content