{"id":31980109,"url":"https://github.com/instagram-automations/scrape-instagram-comments","last_synced_at":"2025-10-14T23:27:16.707Z","repository":{"id":318739665,"uuid":"1075647994","full_name":"Instagram-Automations/scrape-instagram-comments","owner":"Instagram-Automations","description":"scrape instagram comments automation toolkit","archived":false,"fork":false,"pushed_at":"2025-10-13T19:50:00.000Z","size":1886,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T19:04:42.170Z","etag":null,"topics":["api","automation","cli","comments","docker","graphql","instagram","nodejs","playwright","proxy","puppeteer","python","rate-limits","scrape","scrape-instagram-comments","selenium"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Instagram-Automations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-13T19:40:38.000Z","updated_at":"2025-10-13T19:50:04.000Z","dependencies_parsed_at":"2025-10-14T19:04:51.529Z","dependency_job_id":"f9d1ebb9-2dad-4f34-9367-1bb4240b208c","html_url":"https://github.com/Instagram-Automations/scrape-instagram-comments","commit_stats":null,"previous_names":["instagram-automations/scrape-instagram-comments"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Instagram-Automations/scrape-instagram-comments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Instagram-Automations%2Fscrape-instagram-comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Instagram-Automations%2Fscrape-instagram-comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Instagram-Automations%2Fscrape-instagram-comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Instagram-Automations%2Fscrape-instagram-comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Instagram-Automations","download_url":"https://codeload.github.com/Instagram-Automations/scrape-instagram-comments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Instagram-Automations%2Fscrape-instagram-comments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279024790,"owners_count":26087834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","automation","cli","comments","docker","graphql","instagram","nodejs","playwright","proxy","puppeteer","python","rate-limits","scrape","scrape-instagram-comments","selenium"],"created_at":"2025-10-14T23:27:15.593Z","updated_at":"2025-10-14T23:27:16.702Z","avatar_url":"https://github.com/Instagram-Automations.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# scrape instagram comments\n\nA ready-to-use toolkit that fetches Instagram post comments (and threaded replies) at scale with pagination, proxy rotation, and safe automation options.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://t.me/devpilot1\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Chat%20on-Telegram-2CA5E0?style=for-the-badge\u0026logo=telegram\u0026logoColor=white\" alt=\"Telegram\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.gg/vBu9huKBvy\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Join-Discord-5865F2?style=for-the-badge\u0026logo=discord\u0026logoColor=white\" alt=\"Discord\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://wa.me/447723343390?text=Hi%20Zeeshan%2C%20I%27m%20interested%20in%20automation.\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Chat-WhatsApp-25D366?style=for-the-badge\u0026logo=whatsapp\u0026logoColor=white\" alt=\"WhatsApp\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"mailto:support@appilot.app\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Email-support@appilot.app-EA4335?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\" alt=\"Gmail\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eFor discussion, queries, and freelance work — reach out 👆\u003c/strong\u003e\n\u003c/p\u003e\n\n\n---\n\n##  Introduction\n\u003e Collect post comments and nested replies for analytics, moderation, and research. Built for makers, growth teams, and data engineers who need reliable pagination, nested-thread traversal, and resilient strategies when endpoints or GraphQL identifiers shift.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"scrape-instagram-comments.png\" alt=\"scrape-instagram-comments.png\" width=\"90%\"\u003e\n\u003c/p\u003e\n\n###  Key Benefits\n1. Saves time and automates setup.  \n2. Scalable for multiple use cases.  \n3. Safer with anti-detect and proxy logic.  \n\n---\n\n## Features must be in table \n\n| Feature | Details |\n|---|---|\n| Comment Fetching | Pull top-level comments with cursor-based pagination. |\n| Nested Replies | Recursively collect threaded replies with parent-child linkage. |\n| Proxy \u0026 Rotation | Supports proxy lists and rotation to reduce blocks. |\n| Dual Stack | Works with official API (where eligible) or headless automation fallback. |\n| Rate Control | Backoff, delays, and concurrency caps for stability. |\n\n---\n\n##  Use Cases\n- Social listening \u0026 sentiment analysis  \n- Creator/brand moderation dashboards  \n- Research datasets (public comments)  \n- Lead extraction and keyword monitoring  \n\n---\n\n##  FAQs\n\n**Q:** How many comments can I fetch?  \n**A:** Practically, you can paginate through all available comments on a public post, constrained by rate limits, session quality, and proxies. With the official API (for eligible Business/Creator accounts), you’ll page using cursors and reasonable limits per request; with headless/browser automation, use slower concurrency, randomized delays, and rotating proxies. At scale, teams commonly fetch thousands of comments across posts by batching requests and persisting cursors.\n\n**Q:** How do I get nested replies?  \n**A:** Use recursive traversal. For each top-level comment, request its replies (child thread) and attach `parent_id` references. In official endpoints, request fields that include replies/threads; in headless mode, capture the threaded structure from the post’s comment UI or GraphQL response and walk each child list until no more `next_cursor` is returned.\n\n**Q:** Do Instagram APIs / GraphQL doc_ids change?  \n**A:** Yes—internal GraphQL `doc_id`/query hashes are not stable and can change. To stay resilient: (1) prefer official APIs when eligible, (2) in scraping mode, discover query identifiers dynamically from network traffic at runtime, and (3) design a fallback that scrolls \u0026 renders comments in the UI, extracting from the DOM if a query hash breaks.\n\n---\n\n## Results\n----------------------------------- \n\u003e 10x faster posting schedules  \n\u003e 80% engagement increase on group campaigns  \n\u003e Fully automated lead response system  \n\n##  Performance Metrics\n-----------------------------------\nAverage Performance Benchmarks:  \n- **Speed:** 2x faster than manual posting  \n- **Stability:** 99.2% uptime  \n- **Ban Rate:** \u003c0.5% with safe automation mode  \n- **Throughput:** 100+ posts/hour per session\n\n---\n\n##Do you have a customize project for us ?\nContact Us\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://mail.google.com/mail/u/?authuser=ahmadzee26@gmail.com\"\u003e\n    \u003cimg alt=\"Gmail\" width=\"30px\" src=\"https://edent.github.io/SuperTinyIcons/images/svg/gmail.svg\" /\u003e\n    \u003ccode\u003esupport@appilot.app\u003c/code\u003e\n  \u003c/a\u003e\n  \u003cspan\u003e ┃ \u003c/span\u003e\n  \u003ca href=\"https://t.me/devpilot1\"\u003e\n    \u003cimg alt=\"Telegram\" width=\"30px\" src=\"https://edent.github.io/SuperTinyIcons/images/svg/telegram.svg\" /\u003e\n    \u003ccode\u003epilot\u003c/code\u003e\n  \u003c/a\u003e\n  \u003cspan\u003e ┃ \u003c/span\u003e\n  \u003ca href=\"https://discord.com\"\u003e\n    \u003cimg alt=\"Discord\" width=\"30px\" src=\"https://github.com/Zeeshanahmad4/RealEstateMate-WhatsApp-Group-Management-Bot/blob/main/discord-icon-svgrepo-com.svg\" /\u003e\n    \u003ccode\u003ezee#2655\u003c/code\u003e\n  \u003c/a\u003e\n  \u003cspan\u003e ┃ \u003c/span\u003e\n  \u003ca href=\"https://wa.me/447723343390?text=Hi%20Zeeshan%2C%20I%27m%20interested%20in%20automation.\" target=\"_blank\"\u003e\n    \u003cimg alt=\"WhatsApp\" width=\"30px\" src=\"https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/whatsapp.svg\" /\u003e\n    \u003ccode\u003ewhatsapp\u003c/code\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n\u003c/div\u003e\n\n---\n\n##  Installation\n\n###  Pre-requisites\n- Node.js or Python  \n- Git  \n- Docker (optional)  \n\n###  Steps\n```bash\n# Clone the repo\ngit clone https://github.com/yourusername/scrape-instagram-comments.git\ncd scrape-instagram-comments\n\n# Install dependencies\nnpm install\n# or\npip install -r requirements.txt\n\n# Setup environment\ncp .env.example .env\n\n# Run\nnpm start\n# or\npython main.py\n```\n\n---\n\n##  Example Output\n\n```bash\n$ cli fetch --post https://www.instagram.com/p/POST_ID/ --limit 500 --replies\nFetched: 500 comments (including 178 nested replies)\nSaved to: outputs/POST_ID_comments.jsonl\n```\n\n---\n\n##  License\n\nMIT License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstagram-automations%2Fscrape-instagram-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstagram-automations%2Fscrape-instagram-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstagram-automations%2Fscrape-instagram-comments/lists"}