Instagram Comments Scraper avatar

Instagram Comments Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Instagram Comments Scraper

Instagram Comments Scraper

📸 Instagram Comments Scraper collects public post comments at scale — usernames, text, timestamps, likes, replies & mentions — and exports to CSV/JSON for analysis. ⚙️ Perfect for social listening, sentiment, UGC mining & influencer research. 🚀

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

ScraperForge

ScraperForge

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

0

Monthly active users

22 days ago

Last modified

Share

Instagram Comments Scraper

The Instagram Comments Scraper is a production-ready Apify actor that collects public comment data from Instagram posts and reels at scale. It solves the pain of manual copy-paste by programmatically retrieving comment text, authors, likes, timestamps, and nested replies — then exporting clean datasets you can use for social listening, sentiment analysis, and research. Built for marketers, developers, analysts, and researchers, this Instagram comments extractor helps you scrape Instagram comments quickly, operate as an Instagram comments API alternative, and export Instagram comments to CSV or JSON for downstream use.

What data / output can you get?

Below is the exact structure the actor outputs for each comment. Results are written to the Apify Dataset (one record per comment) and to the Key-Value Store under key OUTPUT (single JSON array). You can export to CSV, JSON, or Excel from the Apify UI.

Data typeDescriptionExample value
idUnique identifier of the comment"17894957058162897"
textFull comment text"Love this! 🔥"
timestampUTC timestamp in ISO format"2025-08-29T21:11:18.000Z"
ownerUsernameCommenter’s Instagram handle"delicious.avocados07"
ownerProfilePicUrlProfile image URL of commenter"https://scontent.cdninstagram.com/...jpg"
commentUrlDirect URL to the comment on the post"https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897"
postUrlSource post or reel URL"https://www.instagram.com/p/DN8-GjPkgjS/"
likesCountLike count on the comment12
repliesCountNumber of replies to this comment3
repliesArray of reply objects (same shape: id, text, ownerUsername, ownerProfilePicUrl, timestamp, repliesCount, replies, likesCount, owner, commentUrl)[ { "id": "1811...", "text": "Agree!", ... } ]
ownerObject with commenter metadata (mirrors Instagram’s user fields used by the actor){"id":"123","username":"delicious.avocados07","is_verified":false,...}

Note: Each reply object includes the same fields as a top-level comment, including commentUrl pointing directly to that reply thread. Bonus metadata inside owner includes: fbid_v2, full_name, id, is_mentionable, is_private, is_verified, latest_reel_media, profile_pic_id, profile_pic_url, username.

Key features

  • 🔒 Reliable, session-based extraction
    Provide a sessionId (your Instagram sessionid cookie) for consistent access to doc_id and media_id, ensuring robust runs even when Instagram serves different content to unauthenticated users.

  • 💬 Replies capture with depth control
    Enable includeNestedComments and set maxReplies to fetch child comments for each top-level comment. The actor transforms replies into structured objects with their own commentUrl.

  • 📈 Batch scraping & bulk automation
    Process multiple posts or reels by supplying a list of directUrls. Ideal for bulk scrape Instagram comments workflows across campaigns.

  • 🧱 Smart fallback networking (proxy optional)
    By default no proxy is used. On platform blocks, the actor automatically falls back to a datacenter proxy, then residential proxy with up to 3 retries, and persists with residential after success.

  • 🧾 Structured outputs for analysis
    Stream records to the Apify Dataset as they’re found (per-comment) and also save a single JSON array under Key-Value Store key OUTPUT for one-file downloads.

  • 💾 Flexible exports
    Export Instagram comments to CSV, JSON, or Excel directly from the Apify platform — perfect for pipelines, BI tools, and reporting.

  • 🧰 Developer-friendly & API-ready
    Trigger runs and fetch results via the Apify API. Integrate with Python, n8n, Make, or internal data pipelines as an Instagram comments API alternative.

  • 🚀 Practical limits for scale
    Control volume with maxComments (capped at 500 per post) and maxReplies (capped at 50 per comment) for predictable performance in bulk scenarios.

How to use Instagram Comments Scraper - step by step

  1. Sign in to Apify
    Log in to your Apify account to access and run the actor.

  2. Open the actor
    Find “Instagram Comments Scraper” in the Apify Store and click Try for free or Start.

  3. Add your input URLs
    In the input form, paste one or more Instagram post or reel URLs into directUrls (e.g., https://www.instagram.com/p/DN8-GjPkgjS/).

  4. Provide your Instagram sessionId
    For reliable extraction, add sessionId (your sessionid cookie from instagram.com). Without it, doc_id and media_id often cannot be found.

  5. Configure limits and options

    • maxComments: Set how many comments per post to collect (capped at 500).
    • includeNestedComments: Toggle fetching replies.
    • maxReplies: Set maximum replies per comment (capped at 50).
    • proxyConfiguration (optional): Leave blank by default; the actor automatically falls back to proxies only if blocked.
  6. Run the scraper
    Click Start. The actor loads each post, resolves GraphQL doc_ids and media_id, paginates comments, and (optionally) fetches replies.

  7. Monitor progress
    Watch the run’s log for per-comment save messages, including likes and reply counts.

  8. Download and export results

    • Dataset: One record per comment, updated in real time. Export to CSV, JSON, or Excel.
    • Key-Value Store: Get a single JSON array under key OUTPUT for a one-file download (e.g., output.json).

Pro Tip: Use the Apify API to schedule runs for recurring social listening, or wire outputs into your data warehouse for ongoing sentiment analysis with an IG comments scraper workflow.

Use cases

Use caseDescription
Social listening & sentiment trackingAggregate and analyze comment text to measure audience sentiment on posts and reels.
UGC mining for marketingIdentify user-generated content, FAQs, and authentic feedback to inform campaigns and creative.
Influencer & campaign analyticsCompare engagement quality across creators by extracting comment likes and replies.
Competitor monitoringTrack comment volume and reactions on competitor posts to benchmark engagement strategy.
Customer support & community managementSurface reply threads and recurring questions to improve response workflows.
Research & academic studiesCollect structured datasets for NLP, topic modeling, and time-series analysis.
API pipeline integrationUse the Apify API to bulk scrape Instagram comments into BI tools and enrichment pipelines.

Why choose Instagram Comments Scraper?

Built for precision, automation, and reliability, this Instagram comments scraping tool delivers structured data you can trust at scale.

  • ✅ Accurate, structured fields (ids, text, likes, timestamps, replies, owners)
  • 🔁 Nested reply capture with per-reply URLs for granular analysis
  • 🌐 Optional proxy fallback to handle blocks gracefully (datacenter → residential with retries)
  • 🧩 Developer-friendly via Apify API for end-to-end automation
  • 📦 Dual outputs: per-comment Dataset + single-array OUTPUT for one-file export
  • 🛡️ Ethical by design — targets public post/reel comment data
  • 🧪 Proven for bulk scrape Instagram comments use cases across marketing and research

Unlike brittle browser extensions or unstable scripts, this Instagram comments scraping service runs on Apify infrastructure with sensible limits and a resilient request strategy.

Yes — when used responsibly. This actor is designed to collect publicly available comment data from Instagram posts and reels.

Guidelines for compliant use:

  • Collect only public content and respect platform terms.
  • Do not attempt to access private profiles or non-public data.
  • Ensure your usage complies with data protection regulations (e.g., GDPR, CCPA).
  • Use sessionId from your own authenticated browser session and handle cookies securely.
  • Consult your legal team for edge cases or regulated use.

Input parameters & output format

Example JSON input

{
"directUrls": [
"https://www.instagram.com/p/DN8-GjPkgjS/"
],
"maxComments": 25,
"maxReplies": 5,
"includeNestedComments": true,
"sessionId": "YOUR_INSTAGRAM_SESSIONID_COOKIE",
"isNewestComments": false,
"proxyConfiguration": {
"useApifyProxy": true
}
}

Parameters

  • directUrls (array)
    Instagram post or reel URLs (e.g. https://www.instagram.com/p/SHORTCODE/). Default: none. Required: no.
  • maxComments (integer)
    Maximum comments to scrape per URL (1–500). Input allows up to 10,000 but the actor enforces a cap of 500. Default: 10. Required: no.
  • maxReplies (integer)
    Maximum replies per comment (0–50). Input allows up to 500 but the actor enforces a cap of 50. Default: 5. Required: no.
  • sessionId (string)
    Instagram sessionid cookie. Required for reliable extraction: without it, doc_id and media_id often cannot be found (Instagram serves different content when unauthenticated). Default: none. Required: no (but strongly recommended).
  • includeNestedComments (boolean)
    Fetch replies for each comment. Default: true. Required: no.
  • isNewestComments (boolean)
    Newest first (not supported). Kept for compatibility with provided script. Instagram GraphQL here only supports popular sorting. Default: false. Required: no.
  • proxyConfiguration (object, nullable)
    Proxy (fallback only). Optional. Used only when the platform blocks direct requests: fallback to datacenter proxy, then residential proxy (3 retries). By default no proxy is used. Default: null. Required: no.

Example JSON output

[
{
"postUrl": "https://www.instagram.com/p/DN8-GjPkgjS/",
"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897",
"id": "17894957058162897",
"text": "None of them. #saynotoaiart",
"ownerUsername": "delicious.avocados07",
"ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/573688225_....jpg",
"timestamp": "2025-08-29T21:11:18.000Z",
"repliesCount": 2,
"replies": [
{
"id": "18110000000000001",
"text": "Agree!",
"ownerUsername": "example_user",
"ownerProfilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/12345_....jpg",
"timestamp": "2025-08-29T21:15:00.000Z",
"repliesCount": 0,
"replies": [],
"likesCount": 1,
"owner": {
"fbid_v2": "",
"full_name": "",
"id": "",
"is_mentionable": true,
"is_private": false,
"is_verified": false,
"latest_reel_media": 0,
"profile_pic_id": "",
"profile_pic_url": "https://scontent.cdninstagram.com/v/t51.2885-19/12345_....jpg",
"username": "example_user"
},
"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897/r/18110000000000001"
}
],
"likesCount": 5,
"owner": {
"fbid_v2": "",
"full_name": "",
"id": "",
"is_mentionable": true,
"is_private": false,
"is_verified": false,
"latest_reel_media": 0,
"profile_pic_id": "",
"profile_pic_url": "https://scontent.cdninstagram.com/v/t51.2885-19/573688225_....jpg",
"username": "delicious.avocados07"
}
}
]

Notes:

  • Records are pushed to the Dataset in real time via dataset.pushData and aggregated into a single JSON array at Key-Value Store key OUTPUT.
  • Some owner fields (e.g., full_name, profile_pic_id) may be empty when not provided by Instagram.
  • Sorting by newest is not supported by the underlying GraphQL in this actor; results use popular sorting.

FAQ

Do I need to log in or provide cookies?

Yes — provide sessionId (your Instagram sessionid cookie) for reliable extraction. Without it, doc_id and media_id often cannot be found because Instagram serves different content when unauthenticated.

Can it scrape replies to comments?

Yes. Set includeNestedComments to true and control depth with maxReplies. The actor outputs replies as nested objects with their own fields and commentUrl.

How many comments per post can I scrape?

You can set maxComments per URL; the actor enforces a practical cap of 500 comments per post to maintain performance and stability.

Can I scrape multiple posts at once?

Yes. Add multiple post or reel URLs to directUrls to bulk scrape Instagram comments across posts in a single run.

How are results stored and exported?

Each comment is pushed to the Apify Dataset and the full run is saved as a single JSON array at Key-Value Store key OUTPUT. You can export datasets to CSV, JSON, or Excel from the Apify UI.

Does it support proxies?

Yes. Proxy is optional and used as a fallback only. If a request is blocked, the actor retries with a datacenter proxy, then a residential proxy (up to 3 retries), and keeps using residential after success.

Is this an Instagram comments API alternative?

Yes. Use this IG comments scraper via the Apify API to programmatically extract Instagram post comments without relying on official APIs.

Does it sort by newest comments?

No. The isNewestComments input is retained for compatibility, but the underlying GraphQL here only supports popular sorting.

Final thoughts

This Instagram Comments Scraper is built to turn public Instagram conversations into structured, analysis-ready datasets. With reliable session-based access, nested reply capture, proxy fallback, and flexible exports, it enables marketers, developers, analysts, and researchers to extract Instagram comments at scale. Use the Apify API to automate pipelines or plug results into your analytics stack — start extracting smarter, high-quality IG comment data today.