Get All Comments From an Instagram Post, Replies Included
Pull every comment and reply thread from any public post or reel - up to 1,000 top-level comments in one request - and export them to CSV for a giveaway draw, sentiment analysis or an LLM.
- /v1/post/comments
The comment section is the most honest product feedback on Instagram, but the app hands it to you a screenful at a time and most scrapers give up after the first few dozen. /v1/post/comments returns a post's comments as structured JSON - each with its text, author, timestamp, like count and full reply thread.
Try it free in your browser, no key needed →
Paste a URL, see the result as a table and export it. Come back here for the code when you want it automated.
Why you usually only get 20-50 comments
Instagram's comment pane is a virtualised scroller: it renders a window of comments, and loading more depends on scrolling that specific element - not the page. Scroll the page, or scroll anything else on it, and the pane quietly stops loading while the rest of the document keeps growing, which is exactly what makes a naive scraper think it reached the end. On a post with 528 comments that cut-off lands reliably around 20-25. This endpoint scrolls only the pane itself and reads that element's own height back, so it keeps going until the thread is genuinely exhausted or your count is met.
1. Fetch the comments and replies
Pass the post or reel URL and a count of up to 1,000 top-level comments. With include_replies=true (the default) each comment carries its replies, so you get the whole conversation.
2. Flatten to one row per comment
Replies are nested under their parent. For analysis, write one row per comment or reply with a parent_id column - threads stay reconstructable in a spreadsheet, pandas or a warehouse.
3. Analyse
Start simple: the most-liked comments are the opinions the audience agrees with, word counts reveal recurring themes, and repeat commenters are your superfans. For sentiment, feed the text column to a sentiment model or an LLM - the CSV is already in the right shape.
Tips
comment_countis Instagram's total for the post;returnedis how many top-level comments were fetched.- Timestamps (
created_at) are Unix seconds. - Export several posts to compare how each part of a campaign landed.
Full example (Python)
# Get an API key: https://rapidapi.com/goodstobkal-goodstobkal-default/api/instagram-scraper57
HOST = "YOUR-API-HOST.p.rapidapi.com"
HEADERS = {"x-rapidapi-key": "YOUR_RAPIDAPI_KEY", "x-rapidapi-host": HOST}
BASE = f"https://{HOST}"
import csv
import re
from collections import Counter
import requests
data = requests.get(
f"{BASE}/v1/post/comments",
params={"post_url": "https://www.instagram.com/reel/C2BiLKXLJdS/", "count": 500},
headers=HEADERS,
timeout=330,
).json()
def row(c, parent_id=""):
return {"id": c.get("id"), "parent_id": parent_id,
"username": (c.get("owner") or {}).get("username"),
"created_at": c.get("created_at"), "likes": c.get("like_count") or 0,
"text": c.get("text") or ""}
rows = []
for c in data["comments"]:
rows.append(row(c))
rows.extend(row(r, c.get("id")) for r in c.get("replies") or [])
with open("comments.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=["id", "parent_id", "username", "created_at", "likes", "text"])
writer.writeheader()
writer.writerows(rows)
print(f"{len(rows)} comments and replies saved (the post has {data['comment_count']} in total)")
print("most liked:", [r["text"][:60] for r in sorted(rows, key=lambda r: r["likes"], reverse=True)[:3]])
words = Counter(w for r in rows for w in re.findall(r"[a-z']{4,}", r["text"].lower()))
print("top words:", words.most_common(15))
print("top commenters:", Counter(r["username"] for r in rows).most_common(5))Replace YOUR-API-HOST and YOUR_RAPIDAPI_KEY with the values from the listing's Endpoints tab on RapidAPI.
Frequently asked questions
How do I export Instagram comments to Excel or CSV?
Fetch them with /v1/post/comments and write one row per comment - the example below uses Python's built-in csv module, and the file opens directly in Excel or Google Sheets.
Can I get the replies to comments?
Yes. Leave include_replies on (the default) and every comment includes its reply thread.
How many comments can I get from one post?
Up to 1,000 top-level comments per request, plus their replies.
Can I use it to pick an Instagram giveaway winner?
Yes - export the comments and pick a random row. Remove duplicate commenters first if your rules allow one entry per person.