Instagram Comment Scraper avatar

Instagram Comment Scraper

Pricing

from $1.50 / 1,000 comments

Go to Apify Store
Instagram Comment Scraper

Instagram Comment Scraper

Instagram comment dataset from post and reel URLs, including usernames, comment text, likes, timestamps, and profile links.

Pricing

from $1.50 / 1,000 comments

Rating

0.0

(0)

Developer

Farhan Ali

Farhan Ali

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Instagram Comment Scraper creates a structured dataset of comment records collected from Instagram posts and reels. Each dataset item represents one comment and can include the comment identifier, username, text, like count, timestamp, source post URL, and commenter profile fields (profile link, profile image URL, and a nested user object with username and verification status). Query the source with Instagram post or reel URLs in post_urls, control the per-post limit with max_comments, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

Dataset at a glance

PropertyValue
Sourceinstagram.com (public posts and reels)
Record unitOne comment
Input methodsInstagram post or reel URLs (post_urls)
Main identifierspk, post_url
DeliveryApify Dataset and API
Export formatsJSON, CSV, Excel, XML, HTML (Apify dataset exports)
Update modelFresh records per Actor run
Pricing$0.00005 start; $0.0015 per comment ($1.50 per 1,000 comments)

Coverage and available records

The Actor collects publicly visible comments from each Instagram post or reel URL supplied in post_urls.

Supported coverage:

  • Post URLs such as https://www.instagram.com/p/{shortcode}/.
  • Reel URLs in the same post_urls list.
  • Multiple URLs per run, processed with posts_concurrency (default 2).
  • Per-post comment cap via max_comments (default 100; 0 means unlimited). Each dataset item is one comment, not one post.

Observed field groups on each comment: comment identity (pk), comment body (text), engagement (comment_like_count), timestamp (created_at), source post (post_url), and commenter profile fields (username, profile_link, profile_pic_url, nested user).

Known exclusions: comments Instagram does not show publicly are not collected; Stories, DMs, hashtag search, and profile-level comment harvests are not supported; each run captures comments visible at run time (no historical snapshots).

Data dictionary

Field names below match dataset record JSON properties exactly. pk is the best stable field for deduplication.

Comment-level fields

FieldTypeNullableDescriptionExample
pkstringNoInstagram comment identifier; recommended deduplication key18121785391719030
usernamestringNoCommenter Instagram usernamemc_gang04
textstringNoComment body as shown on the post😍
comment_like_countintegerYesNumber of likes on the comment at collection time0
created_atstringYesComment timestamp (YYYY-MM-DDTHH:MM:SS, no timezone offset)2026-04-13T16:50:18
post_urlstringNoSource Instagram post or reel URLhttps://www.instagram.com/p/DWte0fylh5b/
profile_linkstringYesCommenter profile URLhttps://www.instagram.com/mc_gang04/
profile_pic_urlstringYesCommenter profile image URL (Instagram CDN)Instagram CDN URL
userobjectYesNested commenter object; see table belowSee example record

Nested user object

FieldTypeNullableDescriptionExample
is_verifiedbooleanYesWhether Instagram marks the commenter verifiedfalse
usernamestringYesCommenter username (same handle as the top-level username when present)mc_gang04

Values such as comment_like_count and created_at are read from Instagram at run time. post_url is the input URL that produced the comment. Profile image URLs are source CDN links and can expire after collection.

Example dataset record

Record from the schema prefill post URL with max_comments set to the schema prefill of 20. profile_pic_url is omitted below; it is an Instagram CDN URL and signed query strings expire.

{
"pk": "18121785391719030",
"username": "mc_gang04",
"text": "😍",
"comment_like_count": 0,
"created_at": "2026-04-13T16:50:18",
"post_url": "https://www.instagram.com/p/DWte0fylh5b/",
"profile_link": "https://www.instagram.com/mc_gang04/",
"user": {
"is_verified": false,
"username": "mc_gang04"
}
}

The record above was produced with this input:

{
"post_urls": [
"https://www.instagram.com/p/DWte0fylh5b/"
],
"max_comments": 20,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"],
"apifyProxyCountry": "US"
}
}

Query and input reference

InputTypeRequiredDefaultAccepted valuesDescription
post_urlsarray of stringsYesSchema prefill: https://www.instagram.com/p/DWte0fylh5b/Instagram post or reel URLsPosts and reels whose publicly visible comments are collected
posts_concurrencyintegerNo2Integer ≥ 1Number of posts processed at the same time
sleep_minnumberNo5Number ≥ 0Minimum delay between comment-page requests, in seconds
sleep_maxnumberNo12Number ≥ 0Maximum delay between comment-page requests, in seconds
request_timeoutnumberNo120Number ≥ 1Timeout per request, in seconds
request_retriesintegerNo1Integer ≥ 0Retries after transient request failures
rate_limit_cooldownnumberNo100Number ≥ 0Wait after a rate limit, in seconds
rate_limit_max_waitsintegerNo3Integer ≥ 0Maximum rate-limit waits before stopping collection for a post
max_commentsintegerNo100 (prefill 20)0 or any positive integerMaximum comments per post; 0 = unlimited
proxyConfigurationobjectNoApify proxy, RESIDENTIAL group, country USApify proxy groups or custom proxiesResidential US proxies are recommended

Minimal request:

{
"post_urls": [
"https://www.instagram.com/p/DWte0fylh5b/"
]
}

Advanced request (comment cap, concurrency, delays, and residential US proxy):

{
"post_urls": [
"https://www.instagram.com/p/DWte0fylh5b/"
],
"max_comments": 20,
"posts_concurrency": 2,
"sleep_min": 5,
"sleep_max": 12,
"request_timeout": 120,
"request_retries": 1,
"rate_limit_cooldown": 100,
"rate_limit_max_waits": 3,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"],
"apifyProxyCountry": "US"
}
}

Retrieve the data through the API

Records are retrieved through the Apify Actor and Dataset APIs (not an official Instagram API).

  1. Start the Actor with a JSON input.
  2. Wait for the run to finish, or use a synchronous endpoint if you want the response inline.
  3. Retrieve items from the run's default dataset.
  4. Paginate or export the dataset.

Python example:

from apify_client import ApifyClient
client = ApifyClient("YOUR-APIFY-TOKEN")
run_input = {
"post_urls": ["https://www.instagram.com/p/DWte0fylh5b/"],
"max_comments": 20,
}
run = client.actor("datascrapers/instagram-comment-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["pk"], item["username"], item["text"])

Apify generates ready-to-run Python, JavaScript, and cURL examples on the Actor's API tab. Do not put a real API token in shared code or URLs.

Data quality and record handling

  • Completeness: profile_link, profile_pic_url, and user can be missing when Instagram does not render them. Unreadable fields are returned as null, not fabricated.
  • Source changes: comment availability, like counts, and timestamps reflect collection time and can change between runs.
  • Deduplication: each run writes a fresh dataset. Use pk as the stable key across runs.
  • Retry behavior: transient failures use request_retries. After a rate limit, the run waits rate_limit_cooldown seconds, up to rate_limit_max_waits times per post, then stops that post.
  • Normalization: pk is a string; comment_like_count is an integer; created_at is ISO-8601 without a timezone offset; post_url is the input URL.
  • Raw versus derived: text, likes, timestamps, and profile fields are source values. post_url is attached by the Actor so comments from several posts stay joinable.

Export and pipeline examples

DestinationRecommended methodTypical use
PostgreSQL / SupabaseDataset API poll or webhook consumerStore comments for sentiment or moderation pipelines
Google SheetsApify Google Sheets integrationReview a bounded comment sample with a team
S3 / cloud storageScheduled export via Apify scheduler + integrationPeriodic snapshots of publicly visible comments
Warehouse / BI toolDataset API paginationJoin comments to post-level records on post_url

Pricing and cost examples

The Actor uses pay-per-event pricing with two chargeable events:

EventTriggerRate
Actor startEach run$0.00005
Comment (apify-default-dataset-item)Each comment record written to the default dataset$0.0015 ($1.50 per 1,000 comments)

Example costs (start fee plus comment events):

CommentsEstimated base cost
1,000$1.50
10,000$15.00

The $0.00005 start event does not change the rounded per-1,000 figures. Compute and proxy usage follow your Apify plan. Estimates depend on the verified pricing model and selected options.

Limitations and responsible data use

  • The Actor collects publicly visible comments from Instagram post and reel pages only.
  • Field availability depends on what Instagram renders at run time; some values can be null or missing, and site changes can alter fields.
  • comment_like_count and created_at are point-in-time values; they are not a live feed after the run ends.
  • The Actor does not provide historical snapshots unless you store datasets yourself.
  • Residential US proxies are recommended; coverage can degrade under rate limits if proxies are omitted or misconfigured.
  • You are responsible for compliance with Instagram's terms, applicable privacy law, and any contractual obligations before using the data.

Dataset questions

What does one dataset item represent?

One Instagram comment from a supplied post or reel URL. A post with 50 collected comments produces 50 dataset items, each with the same post_url.

Which field should I use as a unique identifier?

pk is the Instagram comment identifier and the recommended deduplication key. post_url identifies the source post but is not unique per comment.

Are fields nullable or conditional?

Yes. comment_like_count, created_at, profile_link, profile_pic_url, and nested user fields can be null when Instagram does not render them. pk, username, text, and post_url are present on collected records.

Can I retrieve the records as CSV or JSON?

Yes. The dataset can be exported as JSON, CSV, Excel, XML, or HTML from the Apify Console, and queried through the Dataset API.

How do I limit or paginate large comment datasets?

Set max_comments per post (20 is the schema prefill; 0 collects without a cap). For datasets already written, use Dataset API pagination. Delay and rate-limit inputs (sleep_min, sleep_max, rate_limit_cooldown, rate_limit_max_waits) control request pacing, not the export page size.

Does the Actor return historical data?

No. Each run captures comments visible at run time. To track changes, schedule repeated runs and store outputs yourself, deduplicating on pk.

What counts as a billable result?

Each run incurs a $0.00005 start event. Each comment record written to the default dataset is one billable comment event at $0.0015 ($1.50 per 1,000 comments).

Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.