Instagram Scraper avatar

Instagram Scraper

Pricing

Pay per event

Go to Apify Store
Instagram Scraper

Instagram Scraper

7-mode Instagram scraper. Profiles, posts, post URLs, comments, hashtag search, hashtag posts, and mentions. Date filtering, music info, pinned posts. No login for 5 modes, optional cookie for 2 advanced modes.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

17

Total users

8

Monthly active users

4 days ago

Last modified

Categories

Share

Scrape Instagram profiles, posts, comments, hashtags, and mentions. Works without login — optional session cookie unlocks hashtag posts and tagged/mentioned posts. 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:

No login required:

  • 📋 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 (optional):

  • #️⃣🔑 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

Why use this scraper?

  • No login needed — works on any public Instagram account without credentials or cookies
  • 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

Use cases

  • 📊 Competitor analysis — track competitor posting frequency, engagement rates, and content strategy
  • 🔍 Influencer research — analyze follower counts, engagement metrics, and content themes before partnerships
  • 📈 Brand monitoring — monitor brand mentions via tagged users and hashtag tracking
  • 💬 Sentiment analysis — extract comments from posts to analyze audience sentiment and feedback
  • 🛍️ E-commerce intelligence — track product posts, pricing, and promotional content from brands
  • 🎓 Academic research — collect public social media data for NLP, sentiment analysis, and trend studies
  • 📰 Journalism — gather public statements and visual evidence from newsworthy accounts
  • #️⃣ Hashtag discovery — find trending and niche hashtags for content strategy

What data can you extract?

Profile data

FieldExample
Usernamezuck
Full nameMark Zuckerberg
BiographyI build stuff
Followers count17,005,978
Following count623
Posts count426
Verifiedtrue
Business accountfalse
Business categoryNone
Privatefalse
Highlight reel count12
Profile pic URLhttps://...
Profile pic URL HDhttps://...
External URLs[https://...]

Post data (25+ fields)

FieldExample
Short codeDVOyCluEVBg
Media typeImage / Video / Carousel
Product typefeed / clips / carousel_container
CaptionThanks to Prada for having us in Milan!
Likes count337,894
Comments count8,632
Video view count4,277,234
Video play count5,102,000
Display URLhttps://scontent...
Images[https://scontent..., ...]
Video URLhttps://scontent...
Hashtags[fashion, milan]
Mentions[priscillachan]
Tagged users[priscillachan]
LocationMilan, Italy
Timestamp2026-02-26T18:20:36.000Z
Is pinnedfalse
Is paid partnershipfalse
Music info{ artistName, songName, audioId }
Alt textPhoto shared by Mark Zuckerberg...
Coauthor producers[collab_account]

Comment data (10 fields)

FieldExample
Comment textWow beautiful!
Usernameuser123
Likes count42
Timestamp2026-02-28T00:38:04.000Z
Child comment count3
Post short codeDVOyCluEVBg
Post URLhttps://www.instagram.com/p/DVOyCluEVBg/

Hashtag search data

FieldExample
Namenature_lovers
Media count5,921,359
URLhttps://www.instagram.com/explore/tags/nature_lovers/
Search termnature

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.

EventCostDescription
Start$0.01One-time charge per run
Profile$0.005Per profile scraped
Post$0.002Per post extracted
Comment$0.001Per comment extracted
Hashtag result$0.001Per hashtag search result

Real-world cost examples:

QueryResultsCost
1 profile only1 profile~$0.015
1 profile + 12 posts13 items~$0.039
1 profile + 50 posts51 items~$0.115
5 profiles + 20 posts each105 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

  1. Go to the Instagram Scraper page on Apify Store.
  2. Click Try for free.
  3. Choose a scraping mode: Profiles, Posts, Posts from URLs, Comments, or Search hashtags.
  4. Enter Instagram usernames (e.g., zuck, natgeo), post URLs, or search terms.
  5. Optionally set date filter, max posts, or max comments.
  6. Click Start and wait for results.
  7. Download data as JSON, CSV, or Excel, or connect via API.

Input parameters

ParameterTypeDescriptionDefault
modestringprofile, posts, postUrls, comments, searchHashtags, hashtagPosts, or mentionsposts
usernamesstring[]Instagram usernames (without @). For profile, posts, and mentions modes["zuck"]
directUrlsstring[]Full Instagram profile URLs. For profile/posts modes[]
postUrlsstring[]Instagram post or reel URLs. For postUrls/comments modes[]
searchTermsstring[]Keywords to search hashtags. For searchHashtags mode[]
hashtagsstring[]Hashtags to scrape posts from (without #). For hashtagPosts mode. Requires sessionCookie[]
maxPostsintegerMax posts per profile or hashtag (1-200)12
maxCommentsintegerMax comments per post (1-100)50
onlyPostsNewerThanstringDate filter: ISO date (2026-01-01) or relative (7 days, 2 weeks)none
includeProfilebooleanInclude profile data in posts modetrue
sessionCookiestringInstagram sessionid cookie value. Required for hashtagPosts and mentions modesnone

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/"]
}

Scrape comments from a post:

{
"mode": "comments",
"postUrls": ["https://www.instagram.com/p/DVOyCluEVBg/"]
}

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"
}

Tips for best results

  • Start small — test with 1 username and 12 posts before running large scrapes
  • Use date filtering — set onlyPostsNewerThan to 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 residential proxies and random delays automatically, but 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
  • Comments are limited — without login, only preview comments are available (typically 15-20 per post). Use the comments mode to get what's available
  • Music info — available for posts that have music tracks attached (reels, videos). Shows artist name, song title, and audio ID

Integrations

Connect Instagram Scraper with your tools:

  • Google Sheets — export profiles and posts to spreadsheets
  • Slack/Discord — get alerts when new posts are published
  • Zapier/Make — trigger workflows based on scraped data
  • Data warehouses — pipe to BigQuery, Snowflake, or PostgreSQL
  • AI/LLM pipelines — feed posts into sentiment analysis or content generation

Using the Apify API

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 ApifyClient
client = 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().items
print(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}'

This scraper only accesses publicly available data — the same information any visitor can see without logging in. It does not bypass authentication, access private accounts, or violate Instagram's terms of service beyond what any web browser does when viewing public profiles.

Key points:

  • Only public profiles and posts are scraped
  • No login credentials are used or required
  • 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? No. It works entirely without authentication on public profiles.

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 the comments mode with post URLs. Without login, you get the preview comments (typically 15-20 per post) with usernames, timestamps, and like counts.

Can I scrape a specific post by URL? Yes! Use the postUrls mode and paste one or more Instagram post or reel URLs.

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.

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.