Instagram Post Comments for Openclaw

An automated browser-driven skill to extract comments, user handles, timestamps, and reaction metrics from any Instagram post using cursor-based pagination.

browseract-cli
v1.0.0
Jun 17, 2026
0
368
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install instagram-post-comments-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install instagram-post-comments-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Instagram Post Comments?

The Instagram Post Comments skill is a powerful automation utility designed for AI agents to gather community interaction data directly from Instagram posts. By utilizing authenticated browser sessions via the browser-act tool, this capability extracts critical information such as comment text, username, timestamp, like counts, and reply counts.

As part of the wider ecosystem of Openclaw Skills, this tool acts as a local assistant that automates manual copy-pasting. It operates safely within the user's manual boundaries, utilizing local Python scripts to interact with internal APIs and handle pagination seamlessly without triggering automated blocklists.

Instagram Post Comments Use Cases

  • Social Media Sentiment Analysis: Scrape customer discussions and feedback on specific posts for brand sentiment tracking.
  • Influencer Campaign Auditing: Pull post comments to measure real user engagement, reply rates, and comment quality.
  • Community Management: Monitor and aggregate user inquiries, support issues, or contest entries from popular Instagram posts.
  • Market Research: Extract public discussions on competitor profiles to identify emerging consumer trends and pain points.

How Instagram Post Comments Works

  1. Login & Session Verification: Checks if a browser-act session is active and verifies that the user is logged into Instagram.
  2. Resolve Shortcode: Converts a post shortcode (e.g., BwrsO1Bho2N) into a numeric media_id using a dedicated helper script.
  3. Initial Page Fetch: Issues an initial API call to gather the first batch of comments along with metadata.
  4. Cursor-Based Pagination: Employs sequential pagination using the next_min_id token while has_more_comments is true.
  5. Data Merging: Aggregates all retrieved comment payloads into a single, unified JSON structure for downstream processing.

Instagram Post Comments Setup

Prerequisites

  1. Ensure a browser session is open on https://www.instagram.com/ and logged into your account.
  2. Confirm that the browser-act tool is configured and ready in your execution environment.

Running CLI Scripts

Use the following Python commands via your terminal or agent bash environment to extract comments:

# Step 1: Resolve post shortcode to Media ID
eval \"$(python scripts/get-media-id.py 'BwrsO1Bho2N')\"

# Step 2: Fetch the first page of comments
eval \"$(python scripts/get-post-comments.py '3900557621921709539')\"

# Step 3: Fetch subsequent pages using the cursor
eval \"$(python scripts/get-post-comments.py '3900557621921709539' --min-id '17857015000000001')\"

Local Experience Notes

To optimize future executions, the skill updates an execution-memory file located at: {working-directory}/browser-act-skill-forge-memories/instagram-scraper-instagram-post-comments.memory.md

Instagram Post Comments Data Schema & Taxonomy

Resolved Media ID Response Schema

Field Type Description
media_id String Unique numeric identifier for the post
shortcode String Alphanumeric shortcode from post URL
media_type Integer Internal media type category
username String Username of the post author
taken_at Integer Epoch timestamp when the post was published

Paginated Comment Schema

Field Type Description
comments Array Array of comment objects (including text, username, user_id, created_at timestamp, like_count, and reply_count)
has_more_comments Boolean Pagination flag indicating more pages are available
next_min_id String The pagination cursor token for the next query

Instagram Post Comments Advanced Features

  • Batch Orchestration Integration: Easily integrated into custom serial bash scripts for processing multiple media IDs in a single session.
  • Self-Healing Adaptive Memory: Reads and writes to a local markdown-based memory file to bypass recurring blocklists or adjust scraping strategies over time.
  • Stealth Multi-Session Scaling: Supports scaling operations by distributing work across multiple stealth browser sessions, each with independent fingerprints to maximize throughput safely.
  • Robust Error Resumption: Facilitates progressive item-by-item data saving, enabling automated agents to resume operations from breakpoints upon network issues or rate limits.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*