Instagram comments API: pull and analyze comments on any post
Comments are where an audience says what it thinks in its own words. They answer questions a like count cannot: what people ask, what they object to, and which product they tag their friends under. This guide covers how to collect them and what to do with them.
Your options
- Graph API: built for comments on media your professional account owns. For other professional accounts, Business Discovery gives a comment count, and requesting their media objects directly fails for lack of permission source.
- instaloader: the free Python tool can save comments with each post using
--commentssource. Fine for a few posts from your own machine. - A hosted API: one HTTP call per page of comments on any public post or reel, with replies as a separate call.
Pulling comments with ScrapeIO
The instagram comments API takes a post or reel URL. It returns comments in pages, with a cursor for the next page.
curl "https://scrapeio.com/v2/instagram/post/comments?url=https://www.instagram.com/reel/SHORTCODE/" \
-H "x-api-key: YOUR_KEY"
Each comment has id, text, created_at, likes, replies and author. Add sort=popular to get the top 15 comments instead of the newest. For threads, pass the comment id to the instagram comment replies API.
Paging through every comment
import os, requests
API = "https://scrapeio.com"
H = {"x-api-key": os.environ["SCRAPEIO_API_KEY"]}
def all_comments(url, max_pages=20):
out, cursor = [], None
for _ in range(max_pages):
params = {"url": url}
if cursor:
params["cursor"] = cursor
r = requests.get(f"{API}/v2/instagram/post/comments", params=params, headers=H).json()
if not r.get("success"):
break
data = r["data"]
out += data["items"]
if not data["has_more"]:
break
cursor = data["cursor"]
return out
Set max_pages so a viral post cannot run away with your budget. For most questions, the first few hundred comments carry the signal.
Turning comments into findings
Raw comments are noisy. A simple pass in this order works well:
- Drop the noise. Remove comments that are only emoji, only tags of other users, or shorter than three words. Keep a count of them; tag rate is itself a signal of shareability.
- Find the questions. Comments containing a question mark, or starting with how, where, what, does, can or is. These are your FAQ and your next content.
- Find objections. Look for price, too expensive, scam, fake, doesn't work, broke, refund. These tell you what blocks a purchase.
- Weight by likes. A comment with 400 likes speaks for many people. Sort by
likesbefore you read. - Group by theme. Paste the cleaned list into a language model and ask for the top 5 themes with a count and two quotes each.
A quick formula for comparing posts is comment rate: comments / plays for reels, or comments / followers for photos. Compare it within one account over time, not across very different accounts.
Things to watch
- Owners can turn comments off or limit them. Then a post returns no comments, and the call is not charged.
- The comment count on a post and the number of comments you can page through often differ, for example because of replies and removed comments. Do not expect them to match.
- Comment text is personal data. Analyze themes, and do not build files on individual commenters.
- Counts move fast on new posts. Pull again after 48 hours if you are studying a launch.
A good sample size for theme analysis is 200 to 500 comments across several posts. One post's comments mostly reflect that post's topic; ten posts show what the audience cares about in general.
Doing it with ScrapeIO
Combine the instagram user reels API with the instagram comments API to pull comments on a creator's last ten reels for about 20 credits. With an AI agent, the comment-insights skill does the grouping for you: install it with npx skills add xhoantran/scrapeio-agent, or connect the MCP server.
Sources
Checked on 8 November 2026 from each vendor's own pages. Prices and limits change; follow the links before you decide.
- https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/business-discovery
- https://instaloader.github.io/basic-usage.html
100 free credits, no card. Credits never expire.
Get API key