Instagram Comments Scraper (Spam & Toxic Comment Detection) avatar

Instagram Comments Scraper (Spam & Toxic Comment Detection)

Pricing

$19.99/month + usage

Go to Apify Store
Instagram Comments Scraper (Spam & Toxic Comment Detection)

Instagram Comments Scraper (Spam & Toxic Comment Detection)

Instagram Comments Scraper extracts comments from any public Instagram post, including usernames, comment text, timestamps, likes, replies, and comment IDs. Perfect for sentiment analysis, audience research, trend monitoring, and automating large-scale Instagram comment data collection.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

SimpleAPI

SimpleAPI

Maintained by Community

Actor stats

1

Bookmarked

82

Total users

4

Monthly active users

10 hours ago

Last modified

Share

Instagram Comments Scraper — Toxic, Spam and Scam Comment Flags

Instagram Comments Scraper (Spam & Toxic Comment Detection) pulls comments and replies from any public Instagram post or reel and tags each one with moderation flags — toxic, profane, spam-like, scam-like, duplicate, or bot-like — so you get a ready-to-action moderation queue instead of a raw comment dump. Every flag is computed by deterministic, rule-based checks against the comment text itself: no AI model, no external API key, and no per-comment cost beyond the run. It's built for community managers, brand-safety teams, and social listening agencies who need to triage comment sections at scale.

What is Instagram Comments Scraper (Spam & Toxic Comment Detection)?

Instagram Comments Scraper (Spam & Toxic Comment Detection) is an Apify Actor that fetches a post or reel's comments and replies via Instagram's own comments API, then runs every comment through a deterministic moderation pipeline before it reaches the output. Instagram now requires a logged-in session to read comments, so an Instagram sessionId cookie is needed for reliable access. Key capabilities:

  • Moderate one or many post/reel URLs (or bare shortcodes) in a single run
  • Restrict output to a single moderation queue — toxic, profanity, spam, scam, duplicate, or bot-like — or keep everything with flags attached
  • Add your own custom blocklist terms on top of the built-in lexicons
  • Surface heated threads by filtering for comments with a minimum reply count
  • Optionally scan reply threads too, with each reply mirrored to a per-run child dataset
  • Every flag is deterministic and rule-based — no AI model, no external API key required

What data can I extract with Instagram Comments Scraper (Spam & Toxic Comment Detection)?

FieldExample ValueUse Case
id"17912345678901234"Uniquely identify the comment or reply
type / isReply"comment" / falseDistinguish top-level comments from replies
parentIdnullLink a reply back to its parent comment
moderationCategory"scam"See the single highest-severity category this comment triggered
flaggedtrueQuickly filter to anything that needs review
matchedTerms["dm for", "guaranteed profit"]See exactly which lexicon terms or blocklist words matched
isToxic / isProfane / isSpamLike / isScamLikefalse / false / false / trueFilter by a specific risk type independently of the primary category
isDuplicate / duplicateCounttrue / 4Spot copy-pasted comment spam repeated across the thread
isBotLiketrueFlag comments matching bot-like patterns (duplicate text + repeat author, or link-spam clustering)
authorCommentCount3See how many times this commenter appears in the same run
linkCount1Count URLs in the comment text
text"DM for guaranteed profit 💰"The comment's raw text
ownerUsername"crypto_deals_2026"Identify the commenter
likesCount / repliesCount2 / 5Gauge engagement on the comment itself
timestamp / scrapedAt"2026-07-20T09:14:02.000Z" / "2026-07-26T14:02:11.000Z"Confirm when the comment was posted vs. when it was scraped
commentUrl / postUrldeep link / post linkJump directly to the comment or its parent post

Moderation flags and detection signals

Every flag comes from a written-in-source, deterministic pipeline — pattern-matched lexicons for profanity, toxicity/harassment, scam language (e.g. "guaranteed profit", "dm for", "cash app"), and spam self-promotion phrases, plus signal-based spam detection (link presence, mention/hashtag flooding, repeated characters). A second pass across the whole run adds duplicate-text detection, repeat-author counting, and a bot-like flag when duplicate text, repeat authorship, and link-spam clustering line up together. This is explicitly not AI or machine-learning classification — the Actor's own description states "deterministic rule-based flags (no AI, no API key)." That means it is fast, free of per-comment API cost, and fully auditable (matchedTerms shows exactly what triggered a flag), but it will miss context-dependent toxicity that doesn't match a known term or pattern, and can occasionally flag benign text that happens to contain a matched phrase.

Thread scope and volume controls

maxComments caps top-level comments scanned per post (replies are additional, not counted against this cap). scanReplies and repliesPerComment control how deep into reply threads the moderation goes. minReplyCount filters to only comments with at least that many replies — useful for surfacing pile-ons or heated threads rather than scanning every comment equally.

Why not build this yourself?

Instagram's Graph API only exposes comment moderation tools to the authenticated owner of the specific Page/post being moderated — it has no endpoint for a third party to pull and moderate comments on arbitrary public posts. Building an equivalent tool yourself means reverse-engineering Instagram's mobile-web comments API (including its child-comments pagination for replies), maintaining a session-cookie-based authentication flow now that Instagram requires a logged-in session to read comments at all, and writing and tuning the moderation lexicons and duplicate/bot-detection heuristics from scratch. All of that is already implemented and testable in this Actor's source.

How to use data extracted from Instagram?

Community managers and brand-safety teams

Run moderatePostUrls against your brand's own posts or reels with flaggedOnly enabled to get a clean, ready-to-review moderation queue — scam and toxic comments surfaced first via moderationCategory, with matchedTerms showing exactly why each comment was flagged, so a moderator doesn't have to re-read the raw text to decide.

Social listening and reputation agencies

Agencies monitoring comment sentiment across multiple client accounts can run reviewMode scoped to "scam" or "toxic" per client to get a lightweight recurring alert feed of the highest-risk comments only, rather than a full export that needs manual filtering every time.

Market and sentiment research

Compare moderationCategory distributions across posts or campaigns to see whether a launch or hashtag attracted disproportionate spam/scam activity versus genuine engagement, using isDuplicate/duplicateCount to separate organic comment volume from coordinated copy-paste activity.

AI agents and automated pipelines

An agent can call this Actor to pre-filter a comment section before running its own downstream analysis — using flaggedOnly and moderationCategory to strip out spam/scam noise so a summarization or sentiment model only processes genuine audience comments.

🔼 Input sample

ParameterRequiredTypeDescriptionExample Value
moderatePostUrlsNoarrayInstagram post/reel URLs to moderate. Accepts /p/, /reel/, /tv/ URLs and bare shortcodes["https://www.instagram.com/p/DN8-GjPkgjS"]
maxCommentsNointeger (1-1,000)Top-level comments to scan per post; replies are additional20 (default)
reviewModeNostring (enum)Restrict output to one queue: all (default), toxic, profanity, spam, scam, duplicate, bot"scam"
flaggedOnlyNobooleanOutput only comments/replies that tripped at least one flagfalse (default)
customBlocklistNoarrayYour own banned words/phrases, case-insensitive["my brand", "competitor"]
minReplyCountNointeger (0-1,000)Only include top-level comments with at least this many replies0 (default)
scanRepliesNobooleanFetch and moderate replies tootrue (default)
repliesPerCommentNointeger (0-50)Cap replies scanned per comment5 (default)
sessionIdNostring (secret)Your Instagram sessionid cookie; required for reliable comment access"(your session cookie)"
proxyConfigurationNoobjectOptional proxy; auto-escalates none → datacenter → residential when blocked{"useApifyProxy": true}
{
"moderatePostUrls": ["https://www.instagram.com/p/DN8-GjPkgjS"],
"maxComments": 50,
"reviewMode": "all",
"flaggedOnly": true,
"scanReplies": true
}

Common pitfall: without a valid sessionId, Instagram's comments API frequently returns a login wall and the run produces zero comments — this is the single most common reason for an empty result, not a bug in the Actor.

🔽 Output sample

Output is typed, normalized JSON — one row per comment and per reply, delivered to the Actor's dataset (exportable as JSON, CSV, or Excel), with replies additionally mirrored to a per-run child dataset.

{
"postUrl": "https://www.instagram.com/p/DN8-GjPkgjS/",
"commentUrl": "https://www.instagram.com/p/DN8-GjPkgjS/c/17912345678901234",
"id": "17912345678901234",
"type": "comment",
"isReply": false,
"parentId": null,
"text": "DM for guaranteed profit 💰",
"ownerUsername": "crypto_deals_2026",
"ownerProfilePicUrl": "https://scontent.cdninstagram.com/...",
"timestamp": "2026-07-20T09:14:02.000Z",
"repliesCount": 2,
"replies": [],
"likesCount": 1,
"owner": {
"is_verified": false,
"profile_pic_id": null,
"profile_pic_url": "https://scontent.cdninstagram.com/...",
"username": "crypto_deals_2026"
},
"scrapedAt": "2026-07-26T14:02:11.000Z",
"moderationCategory": "scam",
"matchedTerms": ["dm for", "guaranteed profit"],
"isToxic": false,
"isProfane": false,
"isSpamLike": true,
"isScamLike": true,
"isEmojiOnly": false,
"linkCount": 0,
"spamSignals": ["self-promo-phrase"],
"blocklistHits": [],
"flagged": true,
"isDuplicate": false,
"duplicateCount": 1,
"isRepeatAuthor": false,
"authorCommentCount": 1,
"isBotLike": false,
"botReasons": []
}

The dataset's default table view surfaces 24 of these fields; the remaining fields shown above (ownerProfilePicUrl, replies on comment rows, owner, isEmojiOnly, spamSignals, blocklistHits, isRepeatAuthor, botReasons) are still written to every row and available via the API or a custom dataset view.

How do you filter and target specific comments?

reviewMode is the category-vs-everything switch: set it to a single queue (toxic, profanity, spam, scam, duplicate, or bot) to get only that risk type, or leave it at all to see every comment with its flags attached. flaggedOnly is the volume control on top of that — turned on, clean comments are dropped entirely so a large thread returns only what actually needs review. customBlocklist lets you add your own banned terms (brand names, competitor mentions, campaign-specific spam phrases) on top of the built-in lexicons, each match appearing in matchedTerms so you can see exactly why a comment was caught. minReplyCount is a scope filter for finding heated threads — set it above 0 to skip quiet, low-engagement comments entirely. Combine scanReplies and repliesPerComment to control how deep into a thread the moderation runs, since a heavily brigaded post can have far more reply volume than top-level comments.

{ "moderatePostUrls": ["https://www.instagram.com/p/DN8-GjPkgjS"], "reviewMode": "scam", "flaggedOnly": true }
{ "moderatePostUrls": ["https://www.instagram.com/reel/C1a2B3c4D5e"], "customBlocklist": ["my brand", "rival co"], "flaggedOnly": true }
{ "moderatePostUrls": ["https://www.instagram.com/p/DN8-GjPkgjS"], "minReplyCount": 5, "scanReplies": true, "repliesPerComment": 20 }

▶️ Want to try other Instagram scrapers?

Scraper NameWhat it extracts
Instagram Comments ScraperFull comment threads without moderation flags
Instagram Single Reels ScraperReel media, captions, and engagement counts
Instagram Hashtag ScraperPosts and profiles discovered by hashtag
Instagram Related Person ScraperRelated/lookalike profile networks
Facebook Comments Scraper: Sentiment & Toxicity AnalysisComparable comment-moderation flags for Facebook posts
Facebook Groups Scraper: Sentiment & Lead AnalysisAI-based sentiment/lead scoring for Facebook group posts

How to extract Instagram data programmatically

Every run is a standard Apify Actor call — one API request with your token, JSON input, JSON moderation results back.

Python example

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_API_TOKEN>")
run_input = {
"moderatePostUrls": ["https://www.instagram.com/p/DN8-GjPkgjS"],
"reviewMode": "all",
"flaggedOnly": True,
}
run = client.actor("<YOUR_USERNAME>/instagram-comments-scraper-spam-toxic-comment-detection").call(run_input=run_input)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["ownerUsername"], row["moderationCategory"], row["matchedTerms"])

Export to spreadsheets or CRM

Export the dataset directly as CSV or Excel, then map ownerUsername and text to your moderation-queue columns, moderationCategory/flagged to a status column, and matchedTerms to an evidence column for review sign-off.

Commenter usernames, profile pictures, and comment text are personal data, so GDPR and CCPA obligations apply to how this data is stored and used — the same as any comment-moderation or social-listening dataset. Public Instagram comments are visible to any logged-out visitor on the post itself, but downstream storage of commenter identities for moderation or research purposes should follow applicable data-protection rules. Consult legal counsel for commercial applications involving bulk storage of personal comment data.

❓ FAQ

How accurate is the spam/toxicity detection?

It's a transparent, deterministic system, not a black box or an AI model — every flag comes from written-in-source keyword lexicons and pattern rules (link counts, mention/hashtag flooding, repeated characters, duplicate-text and repeat-author detection), and matchedTerms always shows exactly what triggered a flag. Because it's rule-based rather than machine-learning-based, it will miss context-dependent toxicity that doesn't match a known term and can occasionally flag benign text containing a matched phrase.

Can I get replies along with the top-level comments?

Yes — scanReplies (on by default) fetches replies too, each becoming its own row with type: "reply", isReply: true, and parentId linking back to its comment. Replies are also mirrored to a separate per-run child dataset (replies-<runId>) as an uncharged audit trail.

How many comments can I get per run?

maxComments (1-1,000, default 20) caps top-level comments scanned per post; repliesPerComment (0-50, default 5) caps replies scanned per comment. Both are hard caps enforced in the Actor's code, matching the input schema's own limits.

Do I need to be logged into Instagram to use this?

Yes, effectively — Instagram now requires a logged-in session to read comments, so provide your Instagram sessionId cookie in the input. Without it, the run will most likely return a login wall and zero comments rather than a partial result.

What counts as "bot-like"?

A comment is flagged bot-like when duplicate text, a repeat author posting multiple times in the same run, or link-spam clustering combine — it is a pattern-based heuristic on data already in the run, not a connection to any external bot-detection service.

Are flagged rows charged differently from clean rows?

No — every row pushed to the main dataset (comments and replies alike) is charged under the same row_result event, whether it's flagged or clean. flaggedOnly controls which rows are pushed at all, not how they're charged once pushed.

Does Instagram Comments Scraper (Spam & Toxic Comment Detection) work with Claude, ChatGPT, and AI agent frameworks?

It has no dedicated MCP server registration in this Actor's current setup, but it is callable as a standard Apify API endpoint by any agent framework that can make an authenticated HTTP request and parse JSON.

How does this compare to other Instagram comment-moderation scrapers?

No independently verifiable competitor listing could be confirmed at the time of writing, so no specific comparison is made here. This Actor's distinguishing feature is transparent, deterministic moderation flags with no AI model and no per-comment API cost.

Can I add my own custom terms to flag?

Yes — customBlocklist accepts any list of words or phrases; any comment containing one is flagged (as category blocklist if nothing more severe matched) and the matched term appears in matchedTerms.

Conclusion

Instagram Comments Scraper (Spam & Toxic Comment Detection) turns a raw comment section into a structured, ready-to-action moderation queue — toxic, profane, spam, scam, duplicate, and bot-like flags computed deterministically, with full transparency into exactly what triggered each one. It's built for community managers, brand-safety teams, and social listening agencies who need to triage comments at scale without an AI bill. Start a run with your post URLs and flaggedOnly on to see only what actually needs review.