Instagram Comment Scraper
Pricing
$25.00/month + usage
Instagram Comment Scraper
A fast and reliable Instagram comment scraper that extracts comments and replies from Instagram posts and reels. Built for speed with parallel processing and designed to handle large-scale comment extraction efficiently.
Pricing
$25.00/month + usage
Rating
0.0
(0)
Developer

Deepanshu Sharma
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Share
A fast and reliable Instagram comment scraper that extracts comments and replies from Instagram posts and reels. Built for speed with parallel processing and designed to handle large-scale comment extraction efficiently.
๐ Features
- Fast Scraping: Parallel processing with 20 concurrent workers for rapid comment extraction
- Flexible Options: Scrape parent comments only or include all replies
- Smart Limiting: Control total output with configurable comment limits
- Rich Data: Includes usernames, profile pictures, timestamps, like counts, and more
- Cookie Authentication: Simple browser cookie-based login (no password needed)
- Multiple Posts: Process multiple Instagram posts in a single run
๐ Input
Required Parameters
| Parameter | Type | Description |
|---|---|---|
cookies | array | Instagram session cookies from your browser (must include sessionid) |
post_urls | array | List of Instagram post/reel URLs to scrape |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
comment_limit | integer | 0 | Maximum comments per post (0 = unlimited). Counts total including replies. |
include_replies | boolean | true | Include comment replies or parent comments only |
Example Input
{"cookies": [{"name": "sessionid","value": "61854802805%3AWqlSMdeVKE7hbp%3A12%3AAYhi...","domain": ".instagram.com"},{"name": "csrftoken","value": "gNxSok0dLs17TXtgZc0ylsCuObChSEsv","domain": ".instagram.com"}],"post_urls": ["https://www.instagram.com/p/ABC123XYZ/","https://www.instagram.com/reels/DEF456UVW/"],"comment_limit": 100,"include_replies": true}
๐ค Output
Each comment is saved as a separate item in the dataset with the following structure:
{"comment_id": "18075851018258413","username": "john_doe","user_id": "123456789","profile_pic_url": "https://instagram.com/.../profile.jpg","text": "Amazing content! ๐ฅ","created_at": "2024-12-18 11:24:58","timestamp": 1734522298,"like_count": 15,"is_reply": false,"reply_count": 3,"media_id": "3788472140946025433"}
Reply Comments
Replies include an additional field:
parent_comment_id: ID of the parent comment this is replying to
Field Descriptions
| Field | Type | Description |
|---|---|---|
comment_id | string | Unique Instagram comment ID |
username | string | Username of the commenter |
user_id | string | Instagram user ID |
profile_pic_url | string | URL to user's profile picture |
text | string | Comment text content |
created_at | string | Human-readable timestamp (YYYY-MM-DD HH:MM:SS) |
timestamp | integer | Unix timestamp |
like_count | integer | Number of likes on the comment |
is_reply | boolean | Whether this is a reply to another comment |
reply_count | integer | Number of replies (parent comments only) |
parent_comment_id | string | Parent comment ID (replies only) |
media_id | string | Instagram post/reel ID |
๐ช How to Get Instagram Cookies
Method 1: Browser Extension (Recommended)
-
Install a cookie extension:
- Chrome/Edge: Cookie-Editor
- Firefox: Cookie-Editor
-
Export cookies:
- Log into Instagram in your browser
- Open the cookie extension
- Click "Export" and select "JSON" format
- Copy the entire JSON array
-
Paste into input:
- Paste the cookies array into the
cookiesfield in the actor input
- Paste the cookies array into the
Method 2: Manual Export
- Open Instagram and log in
- Open browser DevTools (F12)
- Go to Application/Storage โ Cookies โ https://instagram.com
- Find
sessionidcookie and copy its value - Create a minimal cookies array:
{"cookies": [{"name": "sessionid","value": "YOUR_SESSION_ID_HERE","domain": ".instagram.com"}]}
โ ๏ธ Important: The sessionid cookie is required. Without it, authentication will fail.
โ๏ธ How It Works
Comment Limit Behavior
The comment_limit parameter controls the total number of comments returned per post:
With include_replies: true
- Fetches parent comments and their replies
- Returns up to
comment_limittotal comments (parent + replies combined) - Example:
comment_limit: 50might return 35 parent comments + 15 replies = 50 total
With include_replies: false
- Fetches only parent comments
- Returns up to
comment_limitparent comments - Example:
comment_limit: 50returns exactly 50 parent comments, no replies
With comment_limit: 0
- Scrapes ALL comments (no limit)
- Fetches everything available on the post
Performance
- Parent Comments: ~15-20 comments per second
- Replies: 20 concurrent workers for parallel extraction
- Typical Performance: 1,000 comments in 1-2 minutes
๐ง Use Cases
- Social Media Analytics: Track engagement and sentiment on posts
- Competitor Research: Analyze comments on competitor content
- Influencer Marketing: Gather audience feedback data
- Customer Service: Monitor brand mentions and questions
- Research: Collect data for academic or market research
โ ๏ธ Limitations & Notes
- Cookie Expiration: Session cookies expire after some time (usually days/weeks). You'll need to refresh them periodically.
- Rate Limiting: Built-in delays to avoid Instagram's rate limits. Don't modify these.
- Private Posts: Your logged-in account must have access to private posts.
- Disabled Comments: Posts with disabled comments will return empty results.
- Large Posts: Posts with 10,000+ comments may take several minutes to complete.
๐ Troubleshooting
"sessionid not found in cookies"
- Make sure you exported cookies correctly
- Verify the
sessionidcookie is present in the array
"Login failed"
- Your cookies may have expired - export fresh cookies
- Make sure you're logged into Instagram in your browser
"Failed to extract media ID"
- Check that the URL is correct and accessible
- Ensure the post exists and hasn't been deleted
Slow Performance
- Large posts with many comments naturally take longer
- Reduce
comment_limitfor faster results - Set
include_replies: falseto skip reply fetching
๐ค Support
For bugs, feature requests, or questions:
- Open an issue on the actor's page
- Contact Apify support
- Check the Apify documentation
๐ License
This actor is provided as-is for use on the Apify platform.
โ๏ธ Legal & Ethics
- Terms of Service: Use of this actor should comply with Instagram's Terms of Service
- Rate Limiting: The actor includes built-in delays to be respectful of Instagram's servers
- Data Privacy: Be mindful of user privacy when collecting and using comment data
- Responsible Use: Use this tool ethically and legally