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 pulls structured comments from public posts—usernames, text, timestamps, likes & replies—fast. 📊 Export CSV/JSON for sentiment, UGC mining, social listening & influencer research. ⚡️ Perfect for marketers, analysts & researchers.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

Scraply

Scraply

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 comments from public Instagram posts and reels — including text, usernames, timestamps, likes, and nested replies — at scale. It solves the manual overhead of collecting audience feedback by automating comment retrieval with an instagram comment scraper workflow for social listening, research, and reporting. Ideal for marketers, developers, data analysts, and researchers, this instagram comments extractor enables you to scrape instagram comments in batches and turn conversations into actionable datasets.

What data / output can you get?

Below are the exact fields this instagram post comments scraper exports per comment record. Each row shows the field name, its meaning, and a concrete example.

Data typeDescriptionExample value
postUrlSource Instagram post or reel URLhttps://www.instagram.com/p/DN8-GjPkgjS/
commentUrlDirect permalink to the commenthttps://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897
idUnique comment ID (Instagram pk)17894957058162897
textComment text contentNone of them. #saynotoaiart
ownerUsernameCommenter’s Instagram handledelicious.avocados07
ownerProfilePicUrlCommenter’s profile image URLhttps://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/...jpg
timestampUTC timestamp of the comment (ISO 8601)2025-08-29T21:11:18.000Z
repliesCountNumber of direct replies to the comment2
repliesArray of reply objects (same shape as a comment, but for replies)[ { id: "17900000000000000", ... } ]
likesCountNumber of likes on the comment12
ownerStructured commenter object (public metadata){ username: "delicious.avocados07", is_verified: false, ... }

Notes:

  • Replies include fields: id, text, ownerUsername, ownerProfilePicUrl, timestamp, repliesCount, replies (array), likesCount, owner, commentUrl.
  • You can export results from the Apify Dataset (per-comment records) or download a single JSON array from the Key-Value Store at key “OUTPUT”. This instagram comments export tool supports CSV/JSON exports on Apify.

Key features

  • 🚀 Robust comment & reply extraction
    Extract top-level comments and, optionally, nested replies using GraphQL pagination. Control depth with “Include replies” and “Max replies per comment”.

  • 📦 Structured, analytics-ready schema
    Clean fields like id, text, timestamp, likesCount, ownerUsername, repliesCount, commentUrl, and full owner object — perfect for an instagram comment analysis tool.

  • 🧑‍🤝‍🧑 Batch scraping for multiple posts
    Provide multiple Instagram post or reel URLs and collect instagram comments in one run with this instagram comments scraping tool.

  • 🔁 Real-time dataset streaming + single-file output
    Records are pushed to the Dataset as they’re discovered and compiled into a single JSON array under Key-Value Store key “OUTPUT” for easy download — a practical instagram comments downloader workflow.

  • 🛡️ Smart connection fallback (proxy)
    Optional “Proxy (fallback only)” automatically escalates from direct to datacenter to residential connections when blocked (with controlled retries).

  • 🔧 Developer-friendly controls
    Fine-tune maxComments, maxReplies, includeNestedComments, and authentication via sessionId. A solid instagram comments API alternative for scripted pipelines.

  • 📚 Clear sorting behavior
    Current GraphQL endpoint supports popular sorting. “Newest first” is retained for compatibility but not applied.

  • 🧱 Production-ready on Apify
    Built with async I/O and pagination, resilient logging, and proxy fallback to keep runs stable at scale.

How to use Instagram Comments Scraper - step by step

  1. Create or log in to your Apify account.
  2. Add your target post or reel URLs under “Post URLs” (directUrls). Example: https://www.instagram.com/p/DN8-GjPkgjS/
  3. Provide Session ID (sessionId). For reliable extraction, set your instagram.com sessionid cookie from a logged-in browser session.
  4. Set limits:
    • Max comments per post (maxComments)
    • Include replies (includeNestedComments)
    • Max replies per comment (maxReplies)
  5. (Optional) Configure Proxy (proxyConfiguration) if you anticipate blocks. The scraper will only use proxies as a fallback.
  6. Start the run. The actor fetches doc_id and media_id, paginates comments, and pushes each record to the Dataset in real time.
  7. Download results:
    • Apify Dataset for per-comment records (export to CSV/JSON)
    • Key-Value Store key “OUTPUT” for a single JSON array (output.json)

Pro tip: Use this instagram comments exporter in automated workflows by calling the Apify API and pulling the Key-Value Store “OUTPUT” for downstream processing.

Use cases

Use caseDescription
Social listening & sentimentAggregate and analyze audience sentiment from comments to guide campaigns and content strategy.
UGC mining for marketingCollect instagram comments to identify authentic testimonials and user-generated content ideas.
Influencer researchEvaluate engagement quality on influencer posts by extracting repliesCount and likesCount.
Competitive benchmarkingTrack competitor post reactions over time with a repeatable instagram comments crawler workflow.
Product feedback analysisExport instagram comments to CSV/JSON and map themes for product, CX, and support teams.
Academic & NLP researchBuild corpora for comment-level studies and model training using structured timestamps and owners.
API pipeline alternativeUse as an instagram comments API alternative by pulling the single-array “OUTPUT” for ETL jobs.

Why choose Instagram Comments Scraper?

Built for precision and reliability, this instagram comments scraping tool provides clean, structured data for analytics at scale.

  • 🎯 Accurate, structured fields mapped for analysis (text, timestamps, likes, owner, replies)
  • 📈 Scales across multiple posts with safe pagination and real-time streaming
  • 🛠️ Developer controls for limits, replies, and authentication via sessionId
  • 🧩 Dual outputs (Dataset + single JSON array) streamline downloads and pipelines
  • 🛡️ Resilient connection strategy with optional proxy fallback and controlled retries
  • ✅ Public data focus and configurable settings to align with compliant usage
  • 🔄 More stable than browser-based extensions thanks to a headless, API-driven architecture

In short: a production-ready instagram comment extractor that turns raw comments into ready-to-use datasets.

Yes — when used responsibly. This actor is designed to extract publicly available comment data from Instagram posts and reels. Follow these guidelines:

  • Only collect data you’re permitted to access and use.
  • Avoid scraping private or non-public information.
  • Comply with data protection regulations (e.g., GDPR/CCPA) as applicable.
  • Review and respect Instagram’s Terms of Service before scraping.
  • Consult your legal team for edge cases and jurisdiction-specific requirements.

Input parameters & output format

Example JSON input

{
"directUrls": [
"https://www.instagram.com/p/DN8-GjPkgjS/"
],
"maxComments": 25,
"includeNestedComments": true,
"maxReplies": 5,
"sessionId": "YOUR_SESSIONID_COOKIE",
"proxyConfiguration": {
"useApifyProxy": false
},
"isNewestComments": false
}
FieldTypeDescriptionDefaultRequired
directUrlsarrayInstagram post or reel URLs (e.g. https://www.instagram.com/p/SHORTCODE/)No
maxCommentsintegerMaximum comments to scrape per URL (1–500 in practice; schema allows up to 10000)10No
maxRepliesintegerMaximum replies per comment (0–50 in practice; schema allows up to 500)5No
sessionIdstringInstagram sessionid cookie. Required for reliable extraction (unauthenticated pages may block doc_id/media_id).No
includeNestedCommentsbooleanFetch replies for each comment.trueNo
isNewestCommentsbooleanNewest first (not supported). Kept for compatibility; current GraphQL only supports popular sorting.falseNo
proxyConfigurationobjectProxy (fallback only). Optional; used if direct requests are blocked with retries (datacenter → residential).No

Notes:

  • None of the fields are strictly required by the schema, but providing sessionId is strongly recommended for reliable results.

Example JSON output (one comment with a reply)

{
"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-iad3-1.cdninstagram.com/v/t51.2885-19/573688225_17904015192272986_5048172375480541314_n.jpg",
"timestamp": "2025-08-29T21:11:18.000Z",
"repliesCount": 2,
"replies": [
{
"id": "17900000000000000",
"text": "Agreed!",
"ownerUsername": "user123",
"ownerProfilePicUrl": "https://scontent-iad3-1.cdninstagram.com/v/t51.2885-19/user123.jpg",
"timestamp": "2025-08-29T22: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-iad3-1.cdninstagram.com/v/t51.2885-19/user123.jpg",
"username": "user123"
},
"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17894957058162897/r/17900000000000000"
}
],
"likesCount": 12,
"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-1.cdninstagram.com/v/t51.2885-19/573688225_17904015192272986_5048172375480541314_n.jpg",
"username": "delicious.avocados07"
}
}

Output destinations:

  • Dataset: one record per comment, pushed in real time (fields as shown above).
  • Key-Value Store: key “OUTPUT” contains a single JSON array of all comments (same shape as the Dataset), convenient to download as a single file.

FAQ

Do I need to log in to use the scraper?

✅ For best results, yes. Provide your instagram.com sessionId cookie in the sessionId input. Without it, Instagram may hide the doc_id/media_id needed to fetch comments reliably.

Can it scrape replies to comments?

✅ Yes. Set includeNestedComments to true and control depth with maxReplies. The replies array includes the same core fields (id, text, ownerUsername, timestamp, likesCount, etc.).

Does it work with Instagram Reels?

✅ Yes. Provide reel URLs (e.g., https://www.instagram.com/reel/SHORTCODE/) in directUrls to collect instagram comments from reels.

How many comments can I download per post?

📊 Use maxComments to limit per-post volume. Internally, the run caps to 500 per post for stability even though the schema allows higher values.

Can I scrape newest comments first?

❌ Not with this endpoint. The isNewestComments flag is retained for compatibility but not applied; the current GraphQL only supports popular sorting.

What if Instagram blocks my requests?

🛡️ The actor includes a Proxy (fallback only) strategy. It escalates from direct connection to datacenter and then to residential proxies with controlled retries when blocks occur.

What formats can I export to?

💾 You can export the Dataset to CSV/JSON and also retrieve a single JSON array from the Key-Value Store under key “OUTPUT” for easy ingestion.

Is this an alternative to the Instagram API?

🧩 Yes. It functions as an instagram comments API alternative by providing structured outputs (Dataset and single-array JSON) you can pull into ETL, analytics, or automation pipelines.

Final thoughts

This Instagram Comments Scraper is built to collect instagram comments and replies from posts and reels in a clean, structured format — fast. With session-based reliability, proxy fallback, and dual outputs (Dataset + single JSON array), it’s ideal for marketers, developers, analysts, and researchers who need to export instagram comments to csv/json for social listening, UGC mining, and influencer research. Use the Apify API to automate end-to-end pipelines and start turning comment streams into insights today.