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 extracts comments from public Instagram posts—usernames, text, timestamps, replies, mentions & hashtags—and exports to CSV/JSON. 🔍 Perfect for social listening, UGC mining, sentiment, and campaign tracking. ✅ Compliant, fast, scalable. 🚀

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

ScrapeMesh

ScrapeMesh

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Instagram Comments Scraper

The Instagram Comments Scraper is a purpose-built Apify actor that extracts structured comment data from public Instagram posts and reels. It solves the hassle of manual copy-paste by turning comment threads into clean datasets you can analyze and export. Built for marketers, developers, data analysts, and researchers, this instagram comments extractor helps you scrape instagram comments at scale for social listening, UGC mining, sentiment, and campaign tracking—so you can move from raw conversations to insights fast. 🚀

What data / output can you get?

Get structured, analysis-ready records for each comment you collect. Below are the exact fields the actor outputs, with examples:

Data typeDescriptionExample value
postUrlThe source Instagram post or reel URLhttps://www.instagram.com/p/DN8-GjPkgjS/
commentUrlDirect URL to the specific comment (or reply)https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897
idComment ID (string)17894957058162897
textComment text bodySomeone point me to the Instagram logo ferris wheel NEOW!!
ownerUsernameCommenter’s handlesokarlnerry
ownerProfilePicUrlPublic profile image URL of the commenterhttps://scontent-iad3-2.cdninstagram.com/v/t51.2885-19/...jpg
timestampUTC timestamp in ISO 8601 with milliseconds2025-08-29T21:07:02.000Z
repliesCountNumber of direct replies to the comment2
likesCountNumber of likes for the comment5
repliesArray of nested reply objects (same core shape)[ { id, text, ownerUsername, ... } ]
ownerStructured owner object with basic public fields{ "username": "sokarlnerry", "profile_pic_url": "...", "is_verified": false, ... }

Notes:

  • Each comment is pushed to the Apify Dataset in real time, and a single JSON array of all comments is stored under Key-Value Store key “OUTPUT”.
  • You can download results from the Dataset or the OUTPUT key in popular formats like JSON or CSV via the Apify UI or API.
  • Reply objects include their own commentUrl in the format {postUrl}/c/{parent_comment_id}/r/{reply_id}.

Key features

  • 🔬 Powerful GraphQL extraction Uses Instagram’s public GraphQL endpoints to collect comment edges with stable pagination for consistent, structured results.

  • 🧵 Nested replies capture Toggle reply collection with includeNestedComments and control depth with maxReplies to collect a compact or rich comment tree.

  • 📦 Real-time streaming + aggregated output Pushes each comment into the Dataset as it’s fetched and also writes a single JSON array of all comments to the Key-Value Store at key “OUTPUT”.

  • 📋 Fine-grained limits & sorting behavior Control volume with maxComments (runtime-clamped to 1–500) and maxReplies (runtime-clamped to 0–50). Sorting uses Instagram’s “popular” order; isNewestComments is kept for compatibility but not supported.

  • 🔒 Session-based reliability Provide your Instagram sessionid via sessionId for reliable extraction of doc_id and media_id. Without it, Instagram often serves different content and extraction can fail.

  • 🌍 Resilient proxy fallback Automatic connection strategy: direct → datacenter proxy → residential proxy (with retries). Configurable via proxyConfiguration for robust, large-scale runs.

  • 🧑‍💻 Developer-friendly integration Works seamlessly with the Apify API and SDKs, making it easy to build instagram comments scraper Python pipelines, automate runs, and export to downstream systems.

  • 📊 Structured schema for analytics Output includes postUrl, commentUrl, id, text, likesCount, repliesCount, replies[], owner, and normalized timestamps—ideal for dashboards, NLP, and BI tools.

How to use Instagram Comments Scraper - step by step

  1. Create or log in to your Apify account.
  2. Open the Instagram Comments Scraper actor.
  3. Add input data:
  4. Tune settings:
    • maxComments to limit how many comments you collect per post (runtime-clamped to 1–500).
    • includeNestedComments to enable/disable replies; adjust maxReplies (runtime-clamped to 0–50).
    • Leave isNewestComments as false (not supported; sorting is “popular”).
    • Optionally set proxyConfiguration for fallback connectivity.
  5. Run the scraper:
    • Click Start. The actor logs progress and streams comments into the Dataset as they’re saved.
  6. Monitor progress:
    • Check the run logs to see per-comment saves with likes and replies counts.
  7. Download results:
    • Dataset: one record per comment (export as JSON, CSV, or Excel).
    • Key-Value Store: download the single-file JSON array at key “OUTPUT”.

Pro Tip: Use the Apify API to fetch Dataset items or the OUTPUT JSON for automation—ideal for bulk instagram comments downloader workflows, CRM sync, or sentiment pipelines.

Use cases

Use case nameDescription
Social listening & sentimentAggregate and analyze audience tone by collecting instagram post comments at scale for sentiment dashboards.
UGC mining for marketingExtract instagram comments to CSV to surface authentic quotes and themes for campaigns and landing pages.
Influencer & campaign trackingCompare repliesCount and likesCount across posts to measure engagement lift from creators and paid campaigns.
Competitor monitoringCollect instagram comments on competitor posts to identify objections and opportunities in real time.
Customer support triagePull recent comments on product posts to spot issues, FAQs, and prioritize response workflows.
Academic & NLP researchBuild labeled corpora from public comments for topic modeling and language research in a compliant way.
API pipeline for analyticsUse the Apify API to automate a recurring instagram comments export tool that feeds BI/ETL stacks.

Why choose Instagram Comments Scraper?

This scraper focuses on precision, structure, and reliability—built for production workflows, not one-off copy-paste.

  • ✅ Accurate, structured output designed for analysis (clean fields, normalized timestamps, owner object).
  • 🧵 Replies support with tight controls (includeNestedComments, maxReplies) to right-size your dataset.
  • 📚 Batch-friendly via directUrls for multi-URL, bulk instagram comments downloader runs.
  • 🧑‍💻 Developer-ready with Apify API/SDK access for pipelines and automation.
  • 🌐 Resilient connection strategy with proxy fallback (datacenter → residential, with retries) when blocked.
  • 🔒 Session-based reliability: sessionId improves success rates by accessing the same content you see in your browser.
  • 🧠 Better than brittle extensions: avoids manual steps and unstable browser plugins with a server-side, GraphQL-based approach.

In short, it’s a reliable instagram comments scraping tool that balances control, scale, and data quality for teams who need consistent results.

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

Guidelines:

  • Only extract public comments you’re authorized to access with your session.
  • Avoid collecting private or sensitive data; this tool does not target private profiles.
  • Review and comply with Instagram’s Terms of Service.
  • Follow applicable data protection laws (e.g., GDPR, CCPA) and your organization’s policies.
  • Consult your legal team for edge cases or jurisdiction-specific requirements.

Input parameters & output format

Example input

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

Parameters

FieldTypeRequiredDefaultDescription
directUrlsarrayNoInstagram post or reel URLs (e.g. https://www.instagram.com/p/SHORTCODE/).
maxCommentsintegerNo10Maximum comments to scrape per URL (input accepts 1–10000; actor enforces 1–500 at runtime).
maxRepliesintegerNo5Maximum replies per comment (input accepts 0–500; actor enforces 0–50 at runtime).
sessionIdstringNoInstagram sessionid cookie. Required for reliable extraction; without it, doc_id and media_id often cannot be found.
includeNestedCommentsbooleanNotrueFetch replies for each comment (set to false to skip replies).
isNewestCommentsbooleanNofalseKept for compatibility; this flow only supports “popular” sorting.
proxyConfigurationobjectNoOptional. Used only if blocked: fallback to datacenter proxy, then residential proxy (3 retries). By default no proxy is used.

Notes:

  • All fields are optional in the schema; however, providing sessionId is strongly recommended for consistent results.
  • Sorting is “popular” regardless of isNewestComments.

Example output

Each Dataset item represents one comment. The Key-Value Store also stores a single JSON array of all comments under key “OUTPUT”.

{
"postUrl": "https://www.instagram.com/p/DN8-GjPkgjS/",
"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897",
"id": "17894957058162897",
"text": "Someone point me to the Instagram logo ferris wheel NEOW!!",
"ownerUsername": "sokarlnerry",
"ownerProfilePicUrl": "https://scontent-iad3-2.cdninstagram.com/v/t51.2885-19/...jpg",
"timestamp": "2025-08-29T21:07:02.000Z",
"repliesCount": 2,
"replies": [
{
"id": "18139555500000000",
"text": "Same here! 🎡",
"ownerUsername": "example_user",
"ownerProfilePicUrl": "https://scontent-iad3-2.cdninstagram.com/v/t51.2885-19/...jpg",
"timestamp": "2025-08-29T21:10:12.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-iad3-2.cdninstagram.com/v/t51.2885-19/...jpg",
"username": "example_user"
},
"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897/r/18139555500000000"
}
],
"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-iad3-2.cdninstagram.com/v/t51.2885-19/...jpg",
"username": "sokarlnerry"
}
}

Field behavior:

  • timestamp is normalized to UTC with millisecond precision (YYYY-MM-DDTHH:mm:ss.000Z).
  • owner.full_name and some IDs may be empty strings when not provided publicly.
  • replies is an array; it’s empty when includeNestedComments is false or the comment has no replies.

FAQ

Do I need to log in or provide cookies?

Yes—provide your Instagram sessionid in the sessionId input for reliable results. Without it, Instagram often serves different content and the actor may not find required identifiers, causing extraction to fail.

Can it scrape replies and nested threads?

Yes. Set includeNestedComments to true (default) and control depth with maxReplies. Each reply includes its own fields (id, text, ownerUsername, timestamp, likesCount) and a reply-specific commentUrl.

How many comments can I collect per post?

You control volume with maxComments. While the input allows up to 10,000, the actor enforces a 1–500 limit at runtime for stability. Similar constraints apply to maxReplies (0–50).

Does it work for Instagram Reels?

Yes. The scraper supports standard posts and reels. Provide valid /p/ or /reel/ URLs in directUrls to collect comments.

What happens if requests get blocked?

The actor retries with a resilient fallback strategy: direct connection → datacenter proxy → residential proxy with limited retries. Configure proxyConfiguration if you want to use Apify Proxy groups during fallback.

What output formats are supported?

Data is written to the Apify Dataset (one record per comment) and to the Key-Value Store at key OUTPUT (full JSON array). You can download from the Dataset as JSON, CSV, or Excel via the Apify UI/API.

Can I run it on multiple posts at once?

Yes. Add multiple post or reel URLs to directUrls for batch processing. The actor logs per-post progress and streams comments as they’re saved.

Does it sort by newest comments?

No. The underlying GraphQL flow here supports only “popular” sorting. The isNewestComments input is present for compatibility but is not supported.

Closing thoughts

The Instagram Comments Scraper is built to collect clean, structured comment data from public Instagram posts and reels—fast and reliably. With session-based reliability, reply capture, proxy fallback, and real-time streaming to datasets, it’s ideal for marketers, developers, analysts, and researchers alike. Use the Apify API to automate your instagram comments export tool or integrate with a python-based workflow, and start turning Instagram conversations into actionable insight today.