Instagram Scraper
Pricing
Pay per event
Instagram Scraper
Scrape public Instagram profiles, posts, comments, reels, and hashtags. Public routes are tried first; supply an Instagram session cookie for login-gated workflows. Export as JSON, CSV, or Excel.
Pricing
Pay per event
Rating
4.8
(3)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
4
Bookmarked
842
Total users
93
Monthly active users
0.14 hours
Issues response
9 days ago
Last modified
Categories
Share
Scrape Instagram profiles, posts, comments, hashtags, and mentions. Public routes are tried first; an optional session cookie unlocks hashtag and tagged-post modes and recovers requests Instagram requires login for. Extract photos, videos, reels, captions, likes, comments, music info, and user metadata.
What does Instagram Scraper do?
This actor scrapes public Instagram data using Instagram's private API — no browser automation required. It supports 7 scraping modes:
Public routes (login-free when Instagram permits):
- 📋 Profiles — username, full name, bio, follower/following counts, verified badge, business category, profile pictures, highlight reel count
- 📸 Posts from profiles — photos, videos, reels, carousels with captions, like counts, comment counts, video views/plays, tagged users, locations, music info, timestamps
- 🔗 Posts from URLs — scrape individual posts or reels by URL with full detail including all carousel images
- 💬 Comments — extract comments from any post with usernames, timestamps, and like counts
- #️⃣ Search hashtags — find hashtags by keyword with post counts (e.g., search "nature" to find #nature_lovers, #nature_photo, etc.)
With session cookie:
- #️⃣🔑 Hashtag posts — scrape posts from any hashtag with pagination (e.g., all recent #nature posts)
- 📌🔑 Mentions — scrape posts where a user is tagged or mentioned
- 🔄 Recovery route — retry profile, post URL, and comments requests through Instagram's authenticated media APIs when public routes are rejected
Why use this scraper?
- Public-first — tries login-free routes for public data and uses a supplied session cookie only when authentication is required
- No browser — pure HTTP requests, fast and cheap. 512 MB memory is enough
- 7 scraping modes — profiles, posts, post URLs, comments, hashtag search, hashtag posts, and mentions
- Date filtering — only scrape posts newer than a specific date or relative duration
- Full post data — likes, comments, video views/plays, tagged users, locations, carousel images, music info, pinned status
- Pagination support — get up to 200 posts per profile, not just the first 12
- Resilient — automatic retries with random delays, proxy rotation, graceful error handling
- Pay per result — transparent per-item pricing. No subscription
- Fast — profiles in 2-3 seconds, 20 posts in under 10 seconds
Who is it for?
Instagram Scraper is built for teams that need structured public Instagram data without maintaining browser automation or Meta API integrations.
Use cases
Marketing and brand teams
- Competitor analysis — track competitor posting frequency, engagement rates, and content strategy
- Brand monitoring — monitor brand mentions via tagged users and hashtag tracking
- Hashtag discovery — find trending and niche hashtags for content strategy
- E-commerce intelligence — track product posts, pricing, and promotional content from brands
Agencies and influencer platforms
- Influencer research — analyze follower counts, engagement metrics, and content themes before partnerships
- Campaign tracking — monitor influencer posts and engagement during sponsored campaigns
- Audience insights — understand follower demographics through profile analysis and comment data
Research and journalism
- Sentiment analysis — extract comments from posts to analyze audience sentiment and feedback
- Academic research — collect public social media data for NLP, sentiment analysis, and trend studies
- Journalism — gather public statements and visual evidence from newsworthy accounts
Developers and data teams
- Dataset building — create structured datasets from Instagram for ML training or analytics dashboards
- Social listening pipelines — feed Instagram data into automated monitoring workflows
What data can I extract from Instagram?
Profile data
| Field | Example |
|---|---|
| Username | zuck |
| Full name | Mark Zuckerberg |
| Biography | I build stuff |
| Followers count | 17,005,978 |
| Following count | 623 |
| Posts count | 426 |
| Verified | true |
| Business account | false |
| Business category | None |
| Private | false |
| Highlight reel count | 12 |
| Profile pic URL | https://... |
| Profile pic URL HD | https://... |
| External URLs | [https://...] |
Post data (25+ fields)
| Field | Example |
|---|---|
| Short code | DVOyCluEVBg |
| Media type | Image / Video / Carousel |
| Product type | feed / clips / carousel_container |
| Caption | Thanks to Prada for having us in Milan! |
| Likes count | 337,894 |
| Comments count | 8,632 |
| Video view count | 4,277,234 |
| Video play count | 5,102,000 |
| Display URL | https://scontent... |
| Images | [https://scontent..., ...] |
| Video URL | https://scontent... |
| Hashtags | [fashion, milan] |
| Mentions | [priscillachan] |
| Tagged users | [priscillachan] |
| Location | Milan, Italy |
| Timestamp | 2026-02-26T18:20:36.000Z |
| Is pinned | false |
| Is paid partnership | false |
| Music info | { artistName, songName, audioId } |
| Alt text | Photo shared by Mark Zuckerberg... |
| Coauthor producers | [collab_account] |
Comment data (10 fields)
| Field | Example |
|---|---|
| Comment text | Wow beautiful! |
| Username | user123 |
| Likes count | 42 |
| Timestamp | 2026-02-28T00:38:04.000Z |
| Child comment count | 3 |
| Post short code | DVOyCluEVBg |
| Post URL | https://www.instagram.com/p/DVOyCluEVBg/ |
Hashtag search data
| Field | Example |
|---|---|
| Name | nature_lovers |
| Media count | 5,921,359 |
| URL | https://www.instagram.com/explore/tags/nature_lovers/ |
| Search term | nature |
How much does it cost to scrape Instagram?
This actor uses pay-per-event pricing — you pay only for what you scrape. No monthly subscription.
| Event | Cost | Description |
|---|---|---|
| Start | $0.01 | One-time charge per run |
| Profile | $0.005 | Per profile scraped |
| Post | $0.002 | Per post extracted |
| Comment | $0.001 | Per comment extracted |
| Hashtag result | $0.001 | Per hashtag search result |
Real-world cost examples:
| Query | Results | Cost |
|---|---|---|
| 1 profile only | 1 profile | ~$0.015 |
| 1 profile + 12 posts | 13 items | ~$0.039 |
| 1 profile + 50 posts | 51 items | ~$0.115 |
| 5 profiles + 20 posts each | 105 items | ~$0.235 |
| 1 post + comments | ~18 items | ~$0.029 |
| Hashtag search (2 terms) | ~110 results | ~$0.120 |
With the Apify free plan ($5/month credits), you can scrape approximately 2,400 posts or 900 profiles per month.
How to scrape Instagram posts and profiles?
- Go to the Instagram Scraper page on Apify Store.
- Click Try for free.
- Choose a scraping mode: Profiles, Posts, Posts from URLs, Comments, or Search hashtags.
- Enter Instagram usernames (e.g.,
zuck,natgeo), post URLs, or search terms. - Optionally set a date filter or result limit. For post URL and comments workflows, add a fresh
sessionCookiefrom a logged-in Instagram session because Instagram currently rejects many public post-page requests. - Click Start and wait for results.
- Download data as JSON, CSV, or Excel, or connect via API.
Input parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
mode | string | profile, posts, postUrls, comments, searchHashtags, hashtagPosts, or mentions | posts |
usernames | string[] | Instagram usernames (without @). For profile, posts, and mentions modes | ["zuck"] |
directUrls | string[] | Full Instagram profile URLs. For profile/posts modes | [] |
postUrls | string[] | Instagram post or reel URLs. For postUrls/comments modes; currently use with sessionCookie for reliable extraction | [] |
searchTerms | string[] | Keywords to search hashtags. For searchHashtags mode | [] |
hashtags | string[] | Hashtags to scrape posts from (without #). For hashtagPosts mode. Requires sessionCookie | [] |
maxPosts | integer | Max posts per profile or hashtag (1-200) | 12 |
maxComments | integer | Max comments per post (1-100) | 20 |
onlyPostsNewerThan | string | Date filter: ISO date (2026-01-01) or relative (7 days, 2 weeks) | none |
includeProfile | boolean | Include profile data in posts mode | true |
sessionCookie | string | Instagram sessionid cookie. Required for hashtagPosts/mentions and currently required when Instagram rejects post URL/comments requests; store it in the secret input field | none |
Input examples
Scrape posts from profiles:
{"mode": "posts","usernames": ["zuck", "natgeo"],"maxPosts": 20,"includeProfile": true}
Only posts from last 7 days:
{"mode": "posts","usernames": ["natgeo"],"maxPosts": 50,"onlyPostsNewerThan": "7 days"}
Scrape a specific post by URL:
{"mode": "postUrls","postUrls": ["https://www.instagram.com/p/DVOyCluEVBg/"],"sessionCookie": "YOUR_SESSION_ID"}
Scrape comments from a post:
{"mode": "comments","postUrls": ["https://www.instagram.com/p/DVOyCluEVBg/"],"sessionCookie": "YOUR_SESSION_ID"}
Search for hashtags:
{"mode": "searchHashtags","searchTerms": ["nature", "fitness"]}
Scrape posts from a hashtag (requires session cookie):
{"mode": "hashtagPosts","hashtags": ["nature"],"maxPosts": 50,"sessionCookie": "YOUR_SESSION_ID"}
Scrape posts where a user is tagged (requires session cookie):
{"mode": "mentions","usernames": ["zuck"],"maxPosts": 20,"sessionCookie": "YOUR_SESSION_ID"}
Output examples
Profile output
{"type": "profile","id": "314216","username": "zuck","url": "https://www.instagram.com/zuck/","fullName": "Mark Zuckerberg","biography": "I build stuff","followersCount": 17005978,"followsCount": 623,"postsCount": 426,"verified": true,"isBusinessAccount": false,"highlightReelCount": 12,"profilePicUrl": "https://scontent.cdninstagram.com/..."}
Post output
{"type": "post","id": "3841227612459454560","shortCode": "DVOyCluEVBg","mediaType": "Carousel","productType": "carousel_container","url": "https://www.instagram.com/p/DVOyCluEVBg/","caption": "Thanks to Prada for having us in Milan!","likesCount": 337894,"commentsCount": 8632,"timestamp": "2026-02-26T18:20:36.000Z","ownerUsername": "zuck","taggedUsers": ["priscillachan"],"isPinned": false,"isPaidPartnership": false,"musicInfo": null,"images": ["https://scontent...", "https://scontent..."]}
Comment output
{"type": "comment","id": "17884016388460082","text": "Wow beautiful!","username": "user123","postShortCode": "DVOyCluEVBg","postUrl": "https://www.instagram.com/p/DVOyCluEVBg/","likesCount": 0,"timestamp": "2026-02-28T00:38:04.000Z","childCommentCount": 3}
Hashtag output
{"type": "hashtag","name": "nature_lovers","url": "https://www.instagram.com/explore/tags/nature_lovers/","mediaCount": 5921359,"searchTerm": "nature"}
How do I get the best results from Instagram Scraper?
- Start small — test with 1 username and 12 posts before running large scrapes
- Use date filtering — set
onlyPostsNewerThanto avoid scraping old posts and save costs - Profile mode is fastest — if you only need follower counts and bios, use profile mode
- Private accounts won't return data — the scraper only works on public profiles
- Rate limits — the scraper uses direct requests where stable and residential fallback with random delays when needed; very large runs (100+ profiles) may take longer
- First page is fast — the first 12 posts come from the profile endpoint without extra pagination requests
- Post URL and comments authentication — Instagram currently rejects many logged-out post pages. Supply a fresh
sessionCookie; comments output contains the preview comments Instagram returns to that session - Music info — available for posts that have music tracks attached (reels, videos). Shows artist name, song title, and audio ID
How to scrape Instagram without getting blocked
Instagram uses rate limiting, IP detection, and session validation to restrict automated access. This scraper is built to handle all of that transparently:
- Cost-aware request routing — stable public discovery requests are tried directly, with residential proxy fallback for routes that need it.
- Random delays between requests — the scraper inserts human-like pauses between API calls to avoid triggering rate-limit thresholds.
- Automatic retries — if a request fails or returns a rate-limit error, the scraper retries with a different proxy automatically. You don't need to restart manually.
- No browser fingerprinting needed — because the scraper targets Instagram's private mobile API (not the HTML website), it avoids browser-based bot detection entirely.
- Conservative pagination — the scraper does not hammer paginated endpoints. It fetches pages at a natural cadence and stops as soon as your
maxPostslimit is hit. - Session requirements are explicit — hashtag posts and mentions require a
sessionidcookie. Post URL and comments modes also need one whenever Instagram rejects the public post page. Use a secondary account and refresh expired sessions.
For best results on very large scrapes (500+ profiles), break the work into multiple runs of 50-100 profiles each, or set onlyPostsNewerThan to limit the depth of each run.
How to download Instagram photos and reels without API
The official Instagram app lets you save posts, but it does not let you download photos or reels in bulk, export them to your computer, or save them as files for archiving or analysis.
Instagram Scraper solves this without requiring any API access from Meta:
- Run the scraper in Posts mode with the usernames or post URLs you want to download from.
- Each post result includes a
displayUrlfield with the direct CDN URL to the full-resolution image, and avideoUrlfield for videos and reels. - Export the dataset as JSON or CSV, then use any download tool (e.g.,
wget,curl, a Python script, or a browser extension) to batch-download the files from those URLs. - For carousels, the
imagesarray contains the direct URL for every image in the post.
The URLs returned are public CDN links (hosted on scontent.cdninstagram.com) that do not require authentication. They are valid for several hours to days after scraping. For archiving purposes, download them shortly after the scrape completes.
Reels appear as Video posts (productType: "clips") and include a videoUrl field pointing to the MP4 file. No special mode is needed — use posts or postUrls mode.
Instagram data export: how to download your data
Instagram provides a built-in "Download Your Data" feature in account settings, but it only exports your own account's data — not data from other accounts. It also takes 24–48 hours to prepare and delivers a ZIP archive with limited fields.
Instagram Scraper covers use cases the native export cannot:
- Scrape any public account, not just your own
- Export in structured formats (JSON, CSV, Excel, JSONL) ready for analysis
- Real-time data — results are available in seconds, not days
- Selective export — choose specific posts by date range, post count, or URL
- Bulk export — scrape dozens of accounts in a single run and combine results in one dataset
- Programmatic access — integrate via API or Zapier to automate recurring exports
To export your own account's Instagram data via this scraper, simply enter your own username in Posts or Profile mode. You get the same publicly visible data any visitor would see, structured and ready to download.
Integrations
Connect Instagram Scraper with your tools using Apify integrations:
- Google Sheets — export profiles and posts to a spreadsheet automatically after each run. Great for tracking follower growth or engagement over time
- Slack / Discord — get alerts when a scrape finishes or when new posts match your criteria
- Zapier / Make — trigger workflows based on scraped data, e.g., save new competitor posts to Notion or send weekly engagement reports
- Webhooks — send results to your own API endpoint for custom processing
- Data warehouses — pipe to BigQuery, Snowflake, or PostgreSQL for large-scale analytics
- AI/LLM pipelines — feed posts and comments into sentiment analysis, content generation, or trend detection models
- Scheduled runs — set up daily or weekly scrapes to monitor accounts over time
API usage
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('automation-lab/instagram-scraper').call({mode: 'posts',usernames: ['zuck'],maxPosts: 20,includeProfile: true,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("automation-lab/instagram-scraper").call(run_input={"mode": "posts","usernames": ["zuck"],"maxPosts": 20,"includeProfile": True,})items = client.dataset(run["defaultDatasetId"]).list_items().itemsprint(items)
cURL
curl "https://api.apify.com/v2/acts/automation-lab~instagram-scraper/runs" \-X POST \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_API_TOKEN" \-d '{"mode":"posts","usernames":["zuck"],"maxPosts":20}'
Use with AI agents via MCP
Instagram Scraper is available as a tool for AI assistants that support the Model Context Protocol (MCP). This lets you use natural language to scrape data — just ask your AI assistant and it will configure and run the scraper for you.
Setup for Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/instagram-scraper"
Setup for Claude Desktop, Cursor, or VS Code
Add this to your MCP config file:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=automation-lab/instagram-scraper"}}}
Your AI assistant will use OAuth to authenticate with your Apify account on first use.
Example prompts
Once connected, try asking your AI assistant:
- "Scrape the latest 50 posts from @natgeo"
- "Get all comments from this Instagram post"
- "Find top Instagram posts with #travel hashtag"
Learn more in the Apify MCP documentation.
Legality and compliance
This scraper is intended for public profiles, posts, and comments. Instagram may still require a logged-in session to return that public content; when supplied, the Actor sends the user's sessionid cookie to Instagram only for the requested extraction. It does not support private accounts or bypass account permissions.
Key points:
- Only public profiles, posts, and comments are scraped
- Some workflows require a user-supplied Instagram session cookie because Instagram blocks the equivalent logged-out request
- Rate limiting and polite delays are built in
- Compliant with GDPR when used for legitimate purposes (research, journalism, competitive analysis)
- Users are responsible for how they use the extracted data
FAQ
Does this scraper require an Instagram login? Profile, profile-post, and hashtag-search routes are tried without login first. Hashtag posts and mentions require a session cookie, and post URL/comments extraction currently requires one whenever Instagram rejects the public page.
How many posts can I scrape? Up to 200 posts per profile per run. For more, run the scraper multiple times.
Does it work for private accounts? No. Only public Instagram profiles can be scraped.
How fast is it? Profiles: 2-3 seconds each. Posts: 12 posts per second (first page), 3-5 seconds per additional page.
Can I scrape Instagram Stories or Reels? Reels appear as regular Video posts and are included. Stories require authentication and are not supported.
Can I scrape comments?
Yes. Use comments with post URLs and a fresh sessionCookie. The Actor returns the preview comments Instagram exposes to that session and fails clearly instead of claiming success when the post cannot be resolved.
Can I scrape a specific post by URL?
Yes. Use postUrls, paste one or more Instagram post or reel URLs, and provide sessionCookie when Instagram rejects logged-out post pages.
Can I filter posts by date?
Yes! Use onlyPostsNewerThan with an ISO date (2026-01-01) or relative duration (7 days, 2 weeks, 1 month). The scraper stops pagination early when it reaches posts older than the cutoff.
Can I search for hashtags?
Yes! Use the searchHashtags mode with keywords. It returns matching hashtags with their post counts.
Why do some posts show 0 video views? Video view counts are only available for video posts. Image and carousel posts will show null.
Can I scrape posts from a hashtag?
Yes! Use the hashtagPosts mode with a session cookie. You can scrape recent posts from any hashtag with full pagination.
Can I see posts where a user is tagged/mentioned?
Yes! Use the mentions mode with a session cookie and a username. Returns posts where that user is tagged in photos.
How do I get my session cookie?
Open Instagram.com in Chrome → DevTools (Cmd+Shift+I) → Application tab → Cookies → instagram.com → copy the sessionid value.
Is it safe to use my session cookie? Using your account for scraping carries some risk of temporary restrictions from Meta. The scraper uses conservative rate limits and random delays to minimize this risk. Consider using a secondary account.
The scraper returns fewer posts than expected — what's wrong?
Instagram's API only returns up to ~200 posts per profile via pagination. If a profile has fewer posts than your maxPosts setting, you'll get all available posts. Also check if onlyPostsNewerThan is filtering out older posts. Private accounts return no data at all.
I'm getting errors or empty results for a profile that exists — how do I fix it? Instagram occasionally rate-limits or blocks requests from certain IPs. The scraper automatically retries with proxy rotation, but if it persists, try running again after a few minutes. Also verify the username is correct (without the @ symbol) and that the profile is public.
What is productType?
It indicates the Instagram content format: feed (regular posts), clips (reels), or carousel_container (multi-image posts). Only available for paginated posts.
Related scrapers
- Threads Scraper — Extract posts and profiles from Meta's Threads
- TikTok Scraper — Scrape TikTok videos, profiles, and trending hashtag feeds
- Pinterest Scraper — Scrape Pinterest pins, boards, and profile data
- Twitter/X Scraper — Extract tweets, user profiles, and search results from X
- Bluesky Scraper — Scrape Bluesky posts, profiles, and search results
- Social Media Profile Finder — Find social media profiles across platforms from a list of websites