Instagram Comment Scraper
1 day trial then $19.99/month - No credit card required now
Instagram Comment Scraper
1 day trial then $19.99/month - No credit card required now
Scrape comments from Instagram posts effortlessly. This actor collects usernames, comment content, timestamps, user IDs, profile pictures, like counts, and more. Ideal for social media analysis, sentiment tracking, and engagement monitoring. Easy to use with customizable depth and sort settings.
Instagram Comment Scraper
This Apify actor is designed to scrape comments from a specific Instagram post.
Features
- Scrapes comments from a specific Instagram post.
- Collects information such as username, comment content, timestamp, user ID, profile picture URL, comment like count, and child comment count from the comments.
- Supports different comment sorting options (Default, Newest, Meta Verified)
Obtaining Cookie Information
You can use the Cookie Editor extension to obtain Instagram cookie information. Follow these steps:
- Add the Cookie Editor extension to your Chrome browser.
- Log in to Instagram.
- Click on the Cookie Editor icon in the top right corner of your browser.
- Click the "Export" button to export your cookie information in JSON format.
- Use this JSON string as the cookiesJson input.
Note: If you encounter errors or if 0 comments are processed, ensure that your account is functioning normally and log in again to obtain new cookies to use as input.
Usage
- Run this actor in the Apify console.
- Provide the desired inputs:
- instagramUrl: The URL of the Instagram post you want to scrape comments from.
- Post:
https://www.instagram.com/p/POST_ID/
- Reel:
https://www.instagram.com/reel/POST_ID/
- Post:
- cookiesJson: A JSON string containing your Instagram account's cookie information.
- maxDepth: Set the maximum comment depth. Each depth contains about 10-15 comments (0 = unlimited).
- sortBy: Select how comments should be sorted:
- "For You" (Default): Shows comments based on Instagram's default algorithm
- "Newest": Shows the newest comments first
- "Meta Verified": Shows comments from verified accounts first
- instagramUrl: The URL of the Instagram post you want to scrape comments from.
Output
The scraped comments are saved to the Apify dataset. The output data includes:
pk
: Comment IDuser.is_verified
: Is verified account?user.id
: User IDuser.pk
: User PKuser.is_unpublished
: Is unpublished account?user.profile_pic_url
: Profile picture URLuser.username
: Usernameuser.fbid_v2
: Facebook ID v2is_covered
: Is covered?child_comment_count
: Child comment countrestricted_status
: Restriction statushas_translation
: Has translation?has_liked_comment
: Has liked comment?text
: Comment contentgiphy_media_info
: GIF informationcreated_at
: Creation dateparent_comment_id
: Parent comment IDcomment_like_count
: Like count
Example Output
1{ 2 "pk": "18097364266419276", 3 "user": { 4 "is_verified": false, 5 "id": "51682404199", 6 "pk": "51682404199", 7 "is_unpublished": null, 8 "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/462618979_889070146499602_7587355738565539041_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-iad3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=eHQs0J2ccxUQ7kNvgFD5waQ&_nc_gid=a95c0b9f76304084a2889ab6992d7d0f&edm=AKp6CbIBAAAA&ccb=7-5&oh=00_AYBVLW924BznWb6Pb4wtPOUTde6RjwuSwuOpT1Bte7Pbkw&oe=671069C9&_nc_sid=d62176", 9 "username": "shirishaa_9999", 10 "fbid_v2": "17841451725980300" 11 }, 12 "is_covered": false, 13 "child_comment_count": 10, 14 "restricted_status": null, 15 "has_translation": null, 16 "has_liked_comment": false, 17 "text": "Accepting all cultures equally is true humanity❤️🙌", 18 "giphy_media_info": null, 19 "created_at": "2024-10-11 16:04:14 UTC", 20 "parent_comment_id": null, 21 "comment_like_count": 113 22}
This example output shows the structure of a single comment. The actual output will be a list of similar objects for all scraped comments.
Notes
- In some cases, the first 15-20 comments can exist twice in the dataset. - When using "Newest" or "Meta Verified" sorting options, the first 15-20 comments will not be duplicated.
- Nested comments or comments marked as spam may not be scraped.
- The collected data is stored in Apify's default data store.
Actor Metrics
17 monthly users
-
4 stars
83% runs succeeded
Created in Oct 2024
Modified 20 days ago