Export Instagram Post Commenters to a Spreadsheet
Extract all commenters from any Instagram post or reel. Paste a fetch() from DevTools to scrape usernames, comment text, and profile info with automatic pagination.
Tags
Key Takeaways
- Works with any post or reel - Scrape commenters from any Instagram post you can view
- Automatic pagination - Loops through all comment pages using cursor-based GraphQL pagination
- Rich commenter data - Username, full name, comment text, likes, timestamp, and verification status
- Exports to Google Sheets - Saves each batch of commenters to your spreadsheet as it scrapes
- Requires a browser session - You copy a fetch() request from DevTools to authenticate
What This Workflow Does
This workflow extracts all commenters from an Instagram post or reel and exports them to Google Sheets. You copy a GraphQL fetch() request from your browser's DevTools, paste it into the manual trigger, and the workflow pages through all comments, extracts user and comment data, and saves each batch to your spreadsheet.
Use cases:
- Identify engaged users who commented on a competitor's viral post
- Build a list of potential leads from commenters on niche content
- Analyze comment sentiment and engagement patterns on your own posts
How It Works
| Step | What Happens |
|---|---|
| 1. Manual trigger | You paste a fetch() request copied from Instagram's GraphQL comments API |
| 2. Parse fetch | Code node extracts the URL, headers, media ID, and doc ID from the request body |
| 3. Loop through pages | Fetches comment pages using cursor-based pagination with a 5-second delay per request |
| 4. Extract commenter data | Pulls username, full name, comment text, likes, timestamp, and verification status |
| 5. Save to Google Sheets | AI node writes each batch of commenters to your spreadsheet |
Setup Instructions
- Click "Use template" on this page
- Go to instagram.com and log into your account
- Open any post or reel and click to view comments
- Open DevTools (F12), go to the Network tab
- Scroll down in the comments section to trigger pagination
- Filter by
graphqlin the Network tab - Find the request named
PolarisPostCommentsPaginationQuery - Right-click the request, select Copy > Copy as fetch
- Paste the fetch() into the Manual Trigger node
- Connect your Google Sheets connector and update the sheet URL in the AI node
- Run the workflow
Customization
| What You Can Change | How |
|---|---|
| Target post | Paste a different fetch() request from another post's comments |
| Google Sheet | Update the spreadsheet URL in the AI node prompt |
| Page limit | Change the max page count in the loop node condition (default: 100) |
| Delay between pages | Adjust the wait node duration to avoid rate limits |
FAQ
Q: Does this work with Reels too? A: Yes. Reels use the same comment API as regular posts.
Q: How many comments can I scrape? A: The workflow fetches ~20 comments per page with a max of 100 pages (up to ~2,000 comments). You can increase the loop limit if needed.
Q: Why do I need to scroll in the comments first?
A: The initial comment load uses a different API call. You need to trigger the pagination request by scrolling, then copy that specific PolarisPostCommentsPaginationQuery request.
Q: What if I get errors partway through? A: Your Instagram session may have expired. Re-copy the fetch() request from DevTools and try again.
Q: Can I scrape comments from private accounts? A: Only if you follow the account and can see the post in your browser.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
