Instagram Comments Scraper
Pricing
$19.99/month + usage
Instagram Comments Scraper
Instagram Comments Scraper extracts comments from Instagram posts. It collects usernames, comment text, likes, timestamps, and reply data. Ideal for audience sentiment analysis, engagement tracking, influencer research, and social media monitoring.
Pricing
$19.99/month + usage
Rating
0.0
(0)
Developer
ScrapeBase
Actor stats
0
Bookmarked
3
Total users
1
Monthly active users
12 days ago
Last modified
Categories
Share
Instagram Comments Scraper
The Instagram Comments Scraper is a Python-based Apify actor that collects structured comment data from Instagram post and reel URLs. It solves the pain of manual copy-paste by automatically extracting comment text, usernames, likes, timestamps, and nested replies for analysis. Built for marketers, developers, data analysts, and researchers, this Instagram comment scraper scales to batch jobs across multiple URLs and streams clean records to Apify storages for downstream use. Use it as an Instagram post comments scraper or IG comments scraper to power social listening, influencer research, and engagement tracking at scale.
What data / output can you get?
Below are the exact fields the actor pushes per comment record (see Output section for JSON). The default Dataset view includes id, text, timestamp, ownerUsername, commentUrl, postUrl, repliesCount, likesCount.
| Data type | Description | Example value |
|---|---|---|
| postUrl | Source Instagram post or reel URL | https://www.instagram.com/p/DN8-GjPkgjS |
| commentUrl | Direct link to the comment on the post | https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897 |
| id | Unique comment ID (string) | 17894957058162897 |
| text | Comment text content | Love this! 🎉 |
| ownerUsername | Commenter’s Instagram handle | johndoe |
| ownerProfilePicUrl | Public profile image URL of the commenter | https://…/profile_pic.jpg |
| timestamp | UTC timestamp (ISO-like string) | 2026-03-16T09:45:00.000Z |
| repliesCount | Number of direct replies to the comment | 3 |
| likesCount | Number of likes on the comment | 12 |
| replies | Array of nested reply objects (same structure: id, text, ownerUsername, ownerProfilePicUrl, timestamp, repliesCount, likesCount, owner, commentUrl) | [...] |
| owner | Object with public owner metadata (fbid_v2, id, username, is_verified, profile_pic_url, etc.) | {"username":"johndoe", …} |
Notes:
- One record is created per top-level comment. If enabled, the replies field contains nested reply objects with the same keys.
- You can download results from the Apify Dataset (per-comment stream) or from the Key-Value Store key OUTPUT (a single JSON array) and then export to your preferred format (e.g., to export Instagram comments to CSV for analysis).
Key features
-
🔁 Robust comments + replies extraction
Extracts top-level comments and, when enabled, nested replies per comment with counts, likes, and timestamps. Ideal for Instagram comments extractor workflows and sentiment analysis. -
📦 Real-time streaming to Dataset and single-file output
Pushes each comment to the Apify Dataset as it’s scraped and also writes a consolidated JSON array to Key-Value Store key OUTPUT for one-file download. Great for bulk Instagram comments scraper jobs. -
🧵 Batch scraping across multiple URLs
Accepts a list of post/reel URLs via directUrls, making it a reliable bulk Instagram comments scraper for campaigns, launches, and competitor monitoring. -
🔐 Session-based reliability
Supports a sessionId cookie for reliable extraction. Without it, Instagram often serves different content and required identifiers may be missing. This ensures stable Instagram comments scraping software behavior. -
🧭 Popular-first ordering (by design)
Keeps a compatibility flag for newest sorting, but this GraphQL endpoint uses popular sorting only. Transparent, predictable output for analysis. -
🌐 Smart connection fallback (proxy optional)
Automatically retries when blocked: direct → datacenter → residential (with capped retries). Useful when you need to scrape Instagram comments without API under varying network conditions. -
🐍 Python-powered, Apify-ready
Built with Python (aiohttp, requests, apify SDK) and optimized for production on Apify. Suitable for Instagram comments scraping Python pipelines and automation.
How to use Instagram Comments Scraper - step by step
-
Sign in to Apify
Create a free account or log in to your Apify workspace. -
Open the Instagram Comments Scraper actor
Find “instagram-comments-scraper” by scrapebase in the Apify Store and click Try for free. -
Add your input data
- Paste one or more Instagram post/reel URLs into directUrls (e.g., https://www.instagram.com/p/SHORTCODE).
- Provide your sessionId (Instagram sessionid cookie) for reliable extraction.
-
Configure limits and replies
- Set maxComments (per URL) and maxReplies (per comment).
- Toggle includeNestedComments to fetch replies or skip them.
-
(Optional) Configure proxy fallback
- Use proxyConfiguration if your environment blocks direct requests. The actor will fallback to datacenter and then residential with limited retries.
-
Start the run
Click Start. The actor will load each URL, extract required identifiers, and begin comment pagination with popular sorting. -
Monitor progress and logs
Real-time logs will show saved comments and basic stats per post. -
Download your results
- Dataset: per-comment records, ideal for incremental processing.
- Key-Value Store: key OUTPUT contains a single JSON array of all comments for one-file download.
Use these outputs to export Instagram comments to CSV or connect to your data stack.
Pro tip: Integrate this IG comments scraper in automated pipelines by triggering runs via the Apify API and consuming the Dataset or OUTPUT JSON for dashboards or NLP workflows.
Use cases
| Use case | Description |
|---|---|
| Social media monitoring & sentiment | Analyze audience reactions and trends from Instagram post comments to inform content strategy and community management. |
| Influencer research & campaign tracking | Compare engagement quality across creators, track comment activity, and identify high-signal replies. |
| Competitor analysis | Benchmark comment volume, likes, and reply dynamics on competitor posts to learn what resonates. |
| Product feedback mining | Extract direct user feedback from comments to inform roadmap and messaging. |
| Academic & NLP research | Build labeled corpora from structured comments/replies for sentiment, topic modeling, or moderation studies using an Instagram comments downloader approach. |
| Analytics pipelines (API) | Feed per-comment JSON into BI dashboards or warehouses as part of an Instagram comment data extractor workflow. |
Why choose Instagram Comments Scraper?
Built for precision and reliability, this Instagram comments crawler focuses on structured, comment-level data with transparent limits and resilient networking.
- ✅ Accurate, structured output per comment (and nested replies when enabled)
- 🧱 Session-aware design for consistent extraction on real posts and reels
- 🧵 Scales across multiple URLs with per-post and per-comment limits
- 🧰 Developer-friendly JSON and predictable field names for analytics/ETL
- 🔄 Connection fallback logic to handle blocks gracefully
- 🔒 Designed to collect publicly available comment data from provided URLs
- 🐍 Python + Apify infrastructure for dependable, production runs
In short, it’s a production-focused Instagram comments scraper — not a fragile browser extension — delivering consistent datasets for real workflows.
Is it legal / ethical to use Instagram Comments Scraper?
Yes — when used responsibly. This tool is designed to collect publicly available comments from Instagram post and reel URLs you provide. To use it ethically:
- Only target publicly available content and respect platform terms.
- Avoid collecting private or sensitive data.
- Ensure your use complies with applicable laws and regulations (e.g., GDPR/CCPA).
- Consult your legal team for edge cases and jurisdiction-specific requirements.
The actor does not access private profiles or bypass authentication; providing a sessionId enables reliable extraction of public comments when Instagram serves different content to unauthenticated users.
Input parameters & output format
Example input
{"directUrls": ["https://www.instagram.com/p/DN8-GjPkgjS"],"maxComments": 10,"maxReplies": 5,"includeNestedComments": true,"isNewestComments": false,"sessionId": "YOUR_INSTAGRAM_SESSIONID_COOKIE","proxyConfiguration": {"useApifyProxy": true}}
Parameters
- directUrls (array, optional): Instagram post or reel URLs (e.g. https://www.instagram.com/p/SHORTCODE/). Default: none.
- maxComments (integer, optional): Maximum comments to scrape per URL (1–500). Default: 10.
- maxReplies (integer, optional): Maximum replies per comment (0–50). Default: 5.
- sessionId (string, optional): Instagram sessionid cookie. Required for reliable extraction; without it, doc_id and media_id often cannot be found. Default: none.
- includeNestedComments (boolean, optional): Fetch replies for each comment. Default: true.
- isNewestComments (boolean, optional): Kept for compatibility; this flow supports popular sorting only. Default: false.
- proxyConfiguration (object, optional): Used only when blocked; falls back to datacenter then residential (limited retries). Default: none.
Notes:
- While not marked as required in the schema, providing directUrls and sessionId is necessary to obtain useful results.
- The actor clamps limits internally (comments up to 500, replies up to 50).
Example output
Dataset: one record per top-level comment.
Key-Value Store: key OUTPUT contains a single JSON array with the same shape.
[{"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.example.com/profile_pic_1.jpg","timestamp": "2026-03-16T09:45:00.000Z","repliesCount": 2,"replies": [{"id": "18111111111111111","text": "Agree 💯","ownerUsername": "another_user","ownerProfilePicUrl": "https://scontent.example.com/profile_pic_2.jpg","timestamp": "2026-03-16T10:00:00.000Z","repliesCount": 0,"replies": [],"likesCount": 3,"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.example.com/profile_pic_2.jpg","username": "another_user"},"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897/r/18111111111111111"}],"likesCount": 14,"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.example.com/profile_pic_1.jpg","username": "delicious.avocados07"}},{"postUrl": "https://www.instagram.com/p/DN8-GjPkgjS","commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/18340877686201129","id": "18340877686201129","text": "Someone point me to the Instagram logo ferris wheel NEOW!! 😍🎡🎠","ownerUsername": "sokarlnerry","ownerProfilePicUrl": "https://scontent.example.com/profile_pic_3.jpg","timestamp": "2026-03-16T09:46:00.000Z","repliesCount": 0,"replies": [],"likesCount": 7,"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.example.com/profile_pic_3.jpg","username": "sokarlnerry"}}]
Fields that may be empty or default: owner fields like fbid_v2, id, profile_pic_id, and full_name may be empty strings when not available from the response.
FAQ
Do I need to log in or provide cookies?
Yes — provide your Instagram sessionId cookie in the sessionId input for reliable extraction. Without it, Instagram often serves different content and required identifiers (doc_id, media_id) may be unavailable.
Can it scrape comments from reels as well as posts?
Yes. Provide /p/ (post) or /reel/ URLs in directUrls. URLs that aren’t posts or reels are skipped.
Does it collect replies to comments?
Yes. Set includeNestedComments to true and control depth with maxReplies. If the endpoint does not provide a reply doc_id for a given post, the actor automatically disables replies for that post.
How are results stored and downloaded?
Each comment is pushed to the Apify Dataset in real time. After the run, a single JSON array of all comments is saved to the Key-Value Store under the key OUTPUT. You can download either depending on your workflow.
Can I choose newest-first sorting?
No. The isNewestComments flag is kept for compatibility, but this GraphQL flow supports popular sorting only.
What limits can I set?
Use maxComments to cap comments per post (clamped up to 500) and maxReplies to cap replies per comment (clamped up to 50). Set includeNestedComments to enable or disable reply fetching.
Does it use proxies?
Proxy is optional. When blocked, the actor will fallback from direct to datacenter and then residential connections with limited retries if proxyConfiguration is provided.
What fields are included in the output?
Each comment record includes postUrl, commentUrl, id, text, ownerUsername, ownerProfilePicUrl, timestamp, repliesCount, replies (array), likesCount, and owner (object with public profile metadata). See the Output example for details.
Final thoughts
This Instagram Comments Scraper is built to extract structured, reliable comment data from posts and reels at scale. With session-based stability, multi-URL batching, nested replies, and resilient networking, it’s a practical Instagram comments export tool for marketers, analysts, researchers, and developers. Run it on Apify, consume the Dataset or OUTPUT JSON in your pipelines, and automate your Instagram comments scraper workflows with confidence. Start scraping smarter, structured IG comment data today.