A ready-to-use toolkit to extract post-level interactions (comments, likes, captions, media, and metadata) from Instagram at scale, with safe automation patterns and storage-ready outputs.
For discussion, queries, and freelance work — reach out 👆
Extract comments, likes, captions, media links, hashtags, mentions, and engagement metadata from Instagram posts with safe automation patterns. Built for analysts, growth teams, and data engineers who need clean, structured outputs.
- Saves time and automates setup.
- Scalable for multiple use cases.
- Safer with anti-detect and proxy logic.
| Feature | Details |
|---|---|
| Post Parser | Extracts caption, media URLs, hashtags, mentions, timestamp, and owner metadata |
| Comments Harvester | Paginates through comments/nested replies with user IDs and like counts |
| Likes & Interactions | Collects liker profiles (where available), counts, and engagement ratios |
| Smart Rotation | Proxy pool, randomized delays, headless + real-device toggles |
| Storage Ready | Output to CSV, JSONL, SQLite, or PostgreSQL with schema provided |
| Retry & Throttle | Exponential backoff, cooldowns, and error classification |
| CLI & API | One-line CLI or local REST microservice for batch jobs |
| Dockerized | Reproducible container build for team environments |
- Social listening & brand monitoring
- Competitor analysis & content research
- UGC mining for e-commerce & ads
- Academic/market research datasets
Q: How to scrape comments, likes, or other interactions?
A: Use the provided CLI or API with a post URL or shortcode. The scraper paginates comments and (where accessible) liker lists, capturing user handles, IDs, text, timestamps, and like counts. You can set --max-comments, --since, and --until filters, and enable --deep mode to include nested replies. Outputs are normalized into CSV/JSONL or saved into SQLite/PostgreSQL using the included schema.
Q: How to store scraped data?
A: Choose an output target via flags: --out csv|jsonl|sqlite|postgres. For databases, provide DSN in .env (SQLITE_PATH or POSTGRES_URL). The repo ships with ready SQL schemas and an example ETL to deduplicate by post_id, comment_id, and user_id. Use --append or --upsert for incremental runs.
Q: Is it legal to scrape Instagram data?
A: Laws and platform terms vary by region. Public data may be accessible, but automated access can be restricted by Instagram’s Terms of Use, and local laws (e.g., computer misuse, anti-circumvention, privacy) may apply. Always review Instagram’s terms and consult legal counsel before scraping. Use this tool responsibly, respect robots/usage limits, and obtain permission where required.
10x faster posting schedules
80% engagement increase on group campaigns
Fully automated lead response system
Average Performance Benchmarks:
- Speed: 2x faster than manual posting
- Stability: 99.2% uptime
- Ban Rate: <0.5% with safe automation mode
- Throughput: 100+ posts/hour per session
##Do you have a customize project for us ? Contact Us
- Node.js or Python
- Git
- Docker (optional)
# Clone the repo
git clone https://github.com/yourusername/instagram-post-scraper.git
cd instagram-post-scraper
# Install dependencies
npm install
# or
pip install -r requirements.txt
# Setup environment
cp .env.example .env
# Run
npm start
# or
python main.py# CLI
instagram-post-scraper scrape --url https://www.instagram.com/p/SHORTCODE/ \
--max-comments 500 --out jsonl --path data/post_SHORTCODE.jsonl --deep
# API (local)
curl -X POST http://localhost:8080/scrape \
-H "Content-Type: application/json" \
-d '{"url":"https://www.instagram.com/p/SHORTCODE/","max_comments":500,"deep":true}'MIT License
