Instagram Profile & Posts Scraper avatar

Instagram Profile & Posts Scraper

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Instagram Profile & Posts Scraper

Instagram Profile & Posts Scraper

Scrape Instagram profiles and their recent posts. Get follower counts, engagement metrics, and detailed post data. Profile scraping (followers, following, bio, etc.). Recent posts with engagement metrics. Supports reels and regular posts. No login required (public profiles only).

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

48

Total users

17

Monthly active users

14 days ago

Last modified

Share

Instagram Profile & Posts Scraper - Followers, Engagement, Reels & AI Sentiment Analysis

Scrape Instagram profiles and posts with full engagement metrics. Extract follower counts, bio data, recent posts, reels, likes, comments, hashtags, and posting patterns. Includes Camoufox anti-detection, optional Firecrawl API fallback, and AI sentiment analysis with 5 provider options (BYOK). Supports authenticated scraping via session cookies to bypass Instagram login walls. Essential for influencer research, competitive analysis, and brand monitoring.

Table of Contents

  1. Features
  2. Authentication (Session Cookies)
  3. Who Should Use This Actor
  4. How It Works
  5. Quick Start
  6. Input Parameters
  7. Output Format
  8. AI Sentiment Analysis
  9. Pricing
  10. Real-World Use Cases
  11. Advanced Configurations
  12. Webhook & Automation Integration
  13. API Examples
  14. Anti-Detection Technology
  15. Comparison to Official APIs
  16. FAQ
  17. Troubleshooting
  18. Data Export Options
  19. Rate Limits & Best Practices
  20. Legal & Compliance

Features

Core Scraping Capabilities

  • Profile Metrics - Followers, following, posts count, verification status
  • Bio & Links - Biography, external URL, business category
  • Recent Posts - Up to 50 posts per profile with engagement data
  • Reels Support - Scrape both regular posts and reels
  • Stories Highlights - Profile highlights count and metadata
  • Hashtag Extraction - Hashtags from captions for trend analysis
  • Business Account Detection - Category and contact info for business profiles

Authentication & Login Wall Detection

  • Session Cookie Support - Provide your Instagram session cookies to bypass login walls
  • Login Wall Detection - Automatically detects when Instagram requires login and reports it clearly instead of silently returning 0 results
  • Cookie-Editor Integration - Simple setup with the free Cookie-Editor browser extension
  • Graceful Degradation - Works without cookies on some profiles, clearly reports when cookies are needed

Anti-Detection Suite

  • Camoufox Stealth Browser - C++ level browser fingerprint evasion
  • Human-like Behavior - Natural scrolling, random delays, mouse movements
  • Residential Proxies - Apify residential proxy rotation (default)
  • Firecrawl Fallback - API-based scraping when browser methods fail (BYOK)

AI Intelligence (BYOK)

  • Sentiment Analysis - 5 AI providers for caption tone analysis
  • Content Classification - Automatic categorization of post types
  • Trend Detection - Identify viral patterns and engagement anomalies

Foreplay-Inspired Hook Analysis

  • Hook Extraction - Automatically extracts the first 1-2 attention-grabbing sentences from each caption
  • Hook Word Count - Tracks hook length for optimal engagement patterns
  • Question Detection - Identifies posts with hooks that contain questions (proven to boost engagement)
  • CTA Detection - Flags posts with calls-to-action (follow, like, share, link in bio, swipe, etc.)

Integration Ready

  • Webhook Delivery - Real-time results to your endpoint
  • Scheduled Runs - Automated daily/weekly monitoring
  • Export Formats - JSON, CSV, Excel, XML

Authentication (Session Cookies)

Instagram increasingly gates profile content behind login walls. Without authentication, you may get partial data on some profiles and hit login walls on others. Session cookies are strongly recommended for reliable results.

Why You Need Cookies

ScenarioWithout CookiesWith Cookies
Public profile dataMay work on some profilesFull profile data every time
Recent postsOften blocked by login wallAll posts up to your maxPosts limit
CommentsFrequently unavailableFull comment extraction
Engagement metricsPartial or zero resultsComplete likes, comments, shares
ReelsOften login-gatedFull reel data and metrics

Login Wall Detection

This actor now detects Instagram login walls instead of silently returning 0 results. When a login wall is encountered, you will see a clear message in the run log explaining that Instagram requires authentication for that profile. This helps you understand exactly why data was not returned and take action (provide cookies or try again later).

How to Get Your Session Cookies

Step 1: Install Cookie-Editor

Cookie-Editor is a free browser extension that exports cookies in JSON format.

Step 2: Log Into Instagram

  1. Open your browser and go to instagram.com
  2. Log in with your Instagram account
  3. Make sure you can browse profiles normally

Step 3: Export Cookies

  1. While on instagram.com, click the Cookie-Editor extension icon in your browser toolbar
  2. Click the Export button (the download/arrow icon)
  3. Select Export as JSON (this copies the cookies to your clipboard)

Step 4: Paste Into Actor Input

Paste the exported JSON array into the sessionCookies input field:

{
"usernames": ["nike", "adidas"],
"maxPosts": 20,
"sessionCookies": [
{
"name": "sessionid",
"value": "your-session-id-here",
"domain": ".instagram.com",
"path": "/"
},
{
"name": "csrftoken",
"value": "your-csrf-token-here",
"domain": ".instagram.com",
"path": "/"
}
]
}

You do not need to manually pick individual cookies. Paste the entire JSON array exported by Cookie-Editor -- the actor will use the relevant cookies automatically.

  • Instagram session cookies typically last 1-2 weeks before expiring
  • If you start getting login wall errors after cookies were previously working, export fresh cookies
  • Avoid changing your Instagram password while using cookies (this invalidates all sessions)
  • Using a dedicated Instagram account for scraping is recommended to avoid disrupting your personal browsing
  • Your cookies are passed as an input parameter and are not stored beyond the actor run
  • Cookies are used only to authenticate requests to Instagram during the scraping session
  • Never share your cookies publicly or commit them to version control
  • Use Apify's encrypted input fields when available

Who Should Use This Actor?

Influencer Marketing Teams

Evaluate potential influencer partners before signing contracts. Analyze follower counts, engagement rates, content quality, and posting consistency. Compare multiple creators side-by-side.

Example workflow:

  1. Input 10 potential influencer usernames
  2. Scrape 20 posts each with sentiment analysis
  3. Export to Google Sheets for team review
  4. Calculate engagement rates: (likes + comments) / followers x 100

Social Media Managers

Track competitor Instagram strategies. Monitor posting frequency, content types, and engagement patterns to inform your own social strategy.

Example workflow:

  1. Schedule weekly scrapes of 5 competitors
  2. Track posting frequency and best posting times
  3. Identify high-performing content themes
  4. Adapt strategy based on competitor insights

Marketing Agencies

Build comprehensive Instagram analytics reports for clients. Compare client performance against competitors with real engagement data.

Example workflow:

  1. Monthly scrape: client + 3 competitors
  2. Auto-generate comparison reports
  3. Identify content gaps and opportunities
  4. Present data-driven recommendations

Brand Managers

Monitor competitor product launches, campaign creatives, and audience reactions on Instagram.

Example workflow:

  1. Alert on competitor new post activity
  2. Track campaign hashtag performance
  3. Monitor audience sentiment around launches
  4. Benchmark against industry standards

E-Commerce Companies

Research competitor product photography, promotional strategies, and user engagement with product posts.

Example workflow:

  1. Scrape competitor product posts
  2. Analyze best-performing product shots
  3. Track promotional content frequency
  4. Identify seasonal posting patterns

Talent Agencies & Creator Managers

Discover and evaluate Instagram creators for partnerships, sponsorships, and talent representation.

Example workflow:

  1. Build creator database with metrics
  2. Track growth trends over time
  3. Verify engagement authenticity
  4. Match creators to brand opportunities

Academic Researchers

Study social media behavior, content trends, and engagement patterns for academic research.

Example workflow:

  1. Collect posts on specific topics/hashtags
  2. Analyze posting patterns and engagement
  3. Study sentiment and content evolution
  4. Export for statistical analysis tools

How It Works

Architecture Overview

+------------------------------------------------------------------+
| Instagram Scraper v2.1 |
+------------------------------------------------------------------+
| |
| +--------------+ +--------------+ +--------------+ |
| | Input |--->| Scraper |--->| Output | |
| | Usernames | | Engine | | Dataset | |
| +--------------+ +--------------+ +--------------+ |
| | | |
| v | |
| +--------------+ | |
| | Camoufox | | |
| | + Cookies | | |
| +--------------+ | |
| | | |
| +-------+-------+ | |
| v v | |
| +----------+ +----------+ | |
| | Browser | |Firecrawl | | |
| | Mode | | Fallback | | |
| +----------+ +----------+ | |
| | | | |
| +-------+-------+ | |
| v v |
| +--------------+ +--------------+ |
| | AI |--->| Webhook | |
| | Sentiment | | Delivery | |
| | (Optional) | | (Optional) | |
| +--------------+ +--------------+ |
| |
+------------------------------------------------------------------+

Scraping Process

  1. Input Validation - Validates usernames and configuration
  2. Cookie Injection - If sessionCookies provided, injects them into the browser session
  3. Browser Launch - Spins up Camoufox stealth browser with residential proxy
  4. Profile Navigation - Navigates to each Instagram profile
  5. Login Wall Check - Detects if Instagram is requiring login; reports clearly if cookies are needed
  6. Data Extraction - Extracts profile info and scrolls to load posts
  7. Post Processing - Gathers engagement metrics for each post
  8. AI Analysis - Optional sentiment analysis on captions (BYOK)
  9. Data Output - Saves to Apify dataset and optional webhook delivery

Quick Start

Demo Mode (Free Test)

{
"demoMode": true
}

Returns realistic sample data so you can test your integrations without any charges.

{
"usernames": ["nike", "adidas"],
"maxPosts": 12,
"includeReels": true,
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": false
}

Scrape Public Profiles (No Cookies)

{
"usernames": ["nike", "adidas"],
"maxPosts": 12,
"includeReels": true,
"demoMode": false
}

Note: Without cookies, you may hit Instagram login walls on some or all profiles.

{
"usernames": ["cocacola", "pepsi", "redbull"],
"maxPosts": 20,
"includeReels": true,
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"proxy": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
},
"demoMode": false
}

With Firecrawl API Fallback

{
"usernames": ["targetbrand"],
"maxPosts": 12,
"useFirecrawl": true,
"firecrawlApiKey": "fc-your-api-key",
"demoMode": false
}

With AI Sentiment Analysis

{
"usernames": ["nike"],
"maxPosts": 20,
"enableSentimentAnalysis": true,
"aiProvider": "anthropic",
"aiApiKey": "sk-ant-your-api-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": false
}

Full Configuration Example

{
"usernames": ["nike", "adidas", "puma", "newbalance", "asics"],
"maxPosts": 30,
"includeReels": true,
"enableSentimentAnalysis": true,
"aiProvider": "openai",
"aiApiKey": "sk-your-openai-key",
"aiModel": "gpt-4o-mini",
"useFirecrawl": true,
"firecrawlApiKey": "fc-your-firecrawl-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"proxy": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
},
"webhookUrl": "https://your-webhook.com/instagram-results",
"demoMode": false
}

Input Parameters

Required Parameters

ParameterTypeDefaultDescription
usernamesarray-Instagram usernames to scrape (without @ symbol). Max 100 per run.

Authentication

ParameterTypeDefaultDescription
sessionCookiesarray-JSON array of cookies from Cookie-Editor browser extension. Strongly recommended -- Instagram gates most content behind login walls.

Scraping Options

ParameterTypeDefaultDescription
maxPostsnumber12Maximum posts per profile (1-50)
includeReelsbooleantrueInclude reels in scraped posts
includeCommentsbooleanfalseInclude top comments on each post
maxCommentsnumber10Maximum comments per post (if enabled)
demoModebooleantrueReturn sample data for testing (no charges)

Firecrawl Configuration (BYOK)

ParameterTypeDefaultDescription
useFirecrawlbooleanfalseUse Firecrawl API as scraping fallback
firecrawlApiKeystring-Your Firecrawl API key

AI Sentiment Analysis (BYOK)

ParameterTypeDefaultDescription
enableSentimentAnalysisbooleanfalseEnable AI caption analysis
aiProviderstring-AI provider: openai, anthropic, google, mistral, cohere
aiApiKeystring-Your AI provider API key
aiModelstring-Custom model override (optional)

Proxy Configuration

ParameterTypeDefaultDescription
proxyobjectResidentialProxy configuration object
proxy.useApifyProxybooleantrueUse Apify proxy service
proxy.apifyProxyGroupsarray["RESIDENTIAL"]Proxy groups to use

Integration Options

ParameterTypeDefaultDescription
webhookUrlstring-Webhook URL for results delivery

Output Format

Profile Data Structure

{
"username": "nike",
"fullName": "Nike",
"biography": "Just Do It. #Nike",
"profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/...",
"followersCount": 305000000,
"followingCount": 150,
"postsCount": 1234,
"isVerified": true,
"isBusinessAccount": true,
"businessCategory": "Product/Service",
"externalUrl": "https://nike.com",
"highlightsCount": 15,
"overallSentiment": {
"score": 0.72,
"label": "positive",
"summary": "Predominantly upbeat, inspirational content"
},
"latestPosts": [
{
"id": "ABC123XYZ",
"shortcode": "ABC123XYZ",
"url": "https://instagram.com/p/ABC123XYZ",
"type": "image",
"caption": "Just Do It. The new Air Max 2026 is here. #AirMax #Nike #Innovation",
"displayUrl": "https://scontent.cdninstagram.com/v/t51.2885-15/...",
"videoUrl": null,
"likesCount": 500000,
"commentsCount": 5000,
"timestamp": "2026-01-20T15:30:00.000Z",
"isVideo": false,
"isReel": false,
"hashtags": ["AirMax", "Nike", "Innovation"],
"mentions": ["@athletes"],
"hook": "Just Do It. The new Air Max 2026 is here.",
"hookWordCount": 9,
"hasQuestion": false,
"hasCTA": true,
"reactions": {
"likes": 500000,
"comments": 5000,
"shares": 12000,
"saves": 45000
},
"sentiment": {
"score": 0.85,
"label": "positive",
"confidence": 0.92,
"summary": "Upbeat promotional content with inspirational tone",
"tone": "inspiring"
},
"comments": [
{
"author": "fan_account",
"content": "Love the new design!",
"timestamp": "2026-01-20T16:00:00.000Z",
"likes": 150,
"replies": 3,
"sentiment": {
"score": 0.9,
"label": "positive"
}
}
]
}
],
"engagementRate": 1.64,
"averageLikes": 485000,
"averageComments": 4200,
"postingFrequency": "2.3 posts/day",
"scrapedAt": "2026-01-28T10:30:00.000Z"
}

Post Types Detected

TypeDescription
imageSingle image post
videoVideo post (non-reel)
carouselMulti-image/video post
reelInstagram Reel

Sentiment Analysis Output

When AI sentiment analysis is enabled, each post includes:

{
"sentiment": {
"score": 0.85,
"label": "positive",
"confidence": 0.92,
"summary": "Upbeat promotional content with inspirational messaging",
"tone": "inspiring",
"emotions": ["excitement", "motivation", "pride"],
"topics": ["product launch", "athletic performance", "innovation"]
}
}
FieldTypeRangeDescription
scorenumber-1 to 1Sentiment score (negative to positive)
labelstring-Classification: negative, neutral, positive
confidencenumber0 to 1AI confidence in prediction
summarystring-Brief description of content tone
tonestring-Emotional tone (inspiring, humorous, informative, etc.)
emotionsarray-Detected emotions in content
topicsarray-Key topics identified

Hook Analysis Output (Foreplay-Inspired)

Each post includes automatic hook analysis to help you understand what makes content stop the scroll:

FieldTypeDescription
hookstringFirst 1-2 sentences that grab attention
hookWordCountnumberWord count of the extracted hook
hasQuestionbooleanWhether the hook contains a question (boosts engagement)
hasCTAbooleanWhether caption has a call-to-action

Why hooks matter: The first line of an Instagram caption is the "hook" - it determines whether users tap "more" to read the rest. Studying top-performing hooks helps you understand what patterns drive engagement in your niche.

CTA detection looks for: follow, like, share, comment, link in bio, swipe, tap, click, DM, save, turn on notifications, subscribe


AI Sentiment Analysis (BYOK)

Enable AI-powered sentiment analysis to understand the tone of Instagram captions. Bring Your Own Key (BYOK) - costs are billed directly to your AI provider account.

Supported Providers

ProviderDefault ModelBest ForCost Estimate
OpenAIgpt-4o-miniFast, affordable analysis~$0.001/post
Anthropicclaude-haiku-4.5Nuanced understanding~$0.002/post
Googlegemini-3-flashCost-effective at scale~$0.0005/post
Mistralmistral-smallEuropean data residency~$0.001/post
Coherecommand-rEnterprise deployments~$0.001/post

Custom Model Override

Override the default model for any provider:

{
"enableSentimentAnalysis": true,
"aiProvider": "openai",
"aiApiKey": "sk-your-key",
"aiModel": "gpt-4o"
}

Sentiment Output Interpretation

Score RangeLabelMeaning
-1.0 to -0.3NegativeCritical, complaints, disappointment
-0.3 to 0.3NeutralInformational, factual, balanced
0.3 to 1.0PositiveEnthusiastic, happy, promotional

Pricing (Pay-Per-Event)

Event-Based Pricing

EventDescriptionPrice
profile_scrapedPer Instagram profile scraped$0.08

Cost Examples

ScenarioProfilesPosts/ProfileTotal Cost
Quick test112$0.08
Influencer review520$0.40
Competitor audit1030$0.80
Weekly monitoring2012$1.60
Large research10050$8.00
Demo modeAnyAny$0.00

Additional Costs (BYOK)

  • Firecrawl API: Charged by Firecrawl (your account)
  • AI Sentiment: Charged by AI provider (your account)
  • Apify Proxy: Included in platform usage

Real-World Use Cases

Use Case 1: Influencer Vetting Pipeline

Goal: Evaluate 20 potential micro-influencers for a fitness brand campaign.

{
"usernames": [
"fitness_creator_1", "wellness_coach_2", "gym_life_3",
"healthy_living_4", "workout_queen_5", "muscle_builder_6",
"yoga_master_7", "nutrition_pro_8", "cardio_king_9",
"strength_training_10", "fitness_journey_11", "gym_motivation_12",
"health_tips_13", "workout_daily_14", "fit_lifestyle_15",
"gym_addict_16", "fitness_goals_17", "workout_routine_18",
"healthy_habits_19", "exercise_everyday_20"
],
"maxPosts": 30,
"includeReels": true,
"enableSentimentAnalysis": true,
"aiProvider": "anthropic",
"aiApiKey": "sk-ant-your-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": false
}

Expected output: 20 profiles with 600 posts, engagement metrics, and sentiment analysis.

Cost: $1.60 + AI costs ($1.20) = $2.80 total


Use Case 2: Weekly Competitor Monitoring

Goal: Track 5 competitors' Instagram activity every week.

{
"usernames": ["competitor_1", "competitor_2", "competitor_3", "competitor_4", "competitor_5"],
"maxPosts": 20,
"includeReels": true,
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"proxy": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
},
"webhookUrl": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
"demoMode": false
}

Zapier workflow:

  1. Instagram Scraper sends results to Zapier
  2. Zapier routes data to Google Sheets
  3. Weekly Slack notification with summary
  4. Trend charts auto-update in Data Studio

Monthly cost: 4 runs x $0.40 = $1.60/month


Use Case 3: Brand Sentiment Dashboard

Goal: Monitor your brand's Instagram sentiment in real-time.

{
"usernames": ["your_brand"],
"maxPosts": 50,
"includeComments": true,
"maxComments": 20,
"enableSentimentAnalysis": true,
"aiProvider": "openai",
"aiApiKey": "sk-your-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"webhookUrl": "https://your-dashboard.com/api/sentiment",
"demoMode": false
}

Dashboard integration:

  • Real-time sentiment score display
  • Trend graphs over time
  • Alert on negative sentiment spikes
  • Comment sentiment breakdown

Use Case 4: Content Research & Ideation

Goal: Analyze top-performing content in your niche for inspiration.

{
"usernames": [
"niche_leader_1", "niche_leader_2", "niche_leader_3",
"niche_leader_4", "niche_leader_5"
],
"maxPosts": 50,
"includeReels": true,
"enableSentimentAnalysis": true,
"aiProvider": "google",
"aiApiKey": "your-google-ai-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": false
}

Analysis workflow:

  1. Export to CSV
  2. Sort by engagement rate
  3. Identify common themes in top posts
  4. Note posting times of high performers
  5. Catalog content formats (carousel vs. reel vs. image)

Use Case 5: Product Launch Tracking

Goal: Monitor competitor product launch and audience reaction.

{
"usernames": ["competitor_brand"],
"maxPosts": 30,
"includeComments": true,
"maxComments": 50,
"enableSentimentAnalysis": true,
"aiProvider": "anthropic",
"aiApiKey": "sk-ant-your-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": false
}

Intelligence gathered:

  • Launch announcement post engagement
  • Audience sentiment in comments
  • Comparison to their typical engagement
  • Key feedback themes from comments

Advanced Configurations

High-Volume Scraping (100+ Profiles)

For large-scale scraping, split into batches:

{
"usernames": ["batch_1_usernames..."],
"maxPosts": 12,
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"proxy": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
},
"demoMode": false
}

Best practices:

  • Split into batches of 20-30 profiles
  • Wait 15-30 minutes between batches
  • Use residential proxies (default)
  • Schedule overnight for large jobs
  • Always provide session cookies for consistent results

Firecrawl + Browser Hybrid

Use Firecrawl as automatic fallback when browser scraping fails:

{
"usernames": ["hard_to_scrape_profile"],
"maxPosts": 20,
"useFirecrawl": true,
"firecrawlApiKey": "fc-your-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"proxy": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
},
"demoMode": false
}

Multi-Provider AI Analysis

Run sentiment analysis with different providers for comparison:

Run 1 (OpenAI):

{
"usernames": ["test_profile"],
"enableSentimentAnalysis": true,
"aiProvider": "openai",
"aiApiKey": "sk-openai-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}]
}

Run 2 (Anthropic):

{
"usernames": ["test_profile"],
"enableSentimentAnalysis": true,
"aiProvider": "anthropic",
"aiApiKey": "sk-anthropic-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}]
}

Webhook & Automation Integration

Webhook Configuration

{
"usernames": ["competitor"],
"maxPosts": 12,
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"webhookUrl": "https://your-endpoint.com/webhook"
}

Webhook Payload Format

{
"event": "ACTOR_RUN_SUCCEEDED",
"actorId": "instagram-scraper",
"runId": "abc123xyz",
"datasetId": "def456uvw",
"itemCount": 5,
"results": [
{
"username": "nike",
"followersCount": 305000000,
"latestPosts": [...]
}
]
}

Platform Integrations

Zapier

  1. Create a Zapier webhook trigger
  2. Copy webhook URL to webhookUrl parameter
  3. Route data to Google Sheets, Slack, Airtable, etc.

Make.com (Integromat)

  1. Create a webhook module in Make
  2. Use the webhook URL in your Instagram Scraper input
  3. Process and route data to 1000+ apps

n8n (Self-hosted)

  1. Add a Webhook node in n8n
  2. Configure Instagram Scraper with your n8n webhook URL
  3. Build custom workflows with full control
TriggerActionUse Case
Competitor postsSlack notificationReal-time competitive awareness
Weekly scrapeGoogle Sheets appendInfluencer database building
Sentiment changeEmail alertBrand monitoring
New posts detectedAirtable recordContent calendar tracking
High engagement postTeam notificationTrend identification

Apify Scheduled Runs

Schedule automated runs directly in Apify:

  1. Go to Actor page -> Schedules tab
  2. Create new schedule
  3. Set frequency (daily, weekly, monthly)
  4. Configure input JSON
  5. Enable notifications

API Examples

Start a Run via API

curl -X POST "https://api.apify.com/v2/acts/jrippy~instagram-scraper/runs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-d '{
"usernames": ["nike", "adidas"],
"maxPosts": 20,
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": false
}'

Get Run Results

curl "https://api.apify.com/v2/actor-runs/RUN_ID/dataset/items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN"

Python Integration

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"usernames": ["nike", "adidas", "puma"],
"maxPosts": 20,
"includeReels": True,
"enableSentimentAnalysis": True,
"aiProvider": "openai",
"aiApiKey": "sk-your-openai-key",
"sessionCookies": [{"name": "sessionid", "value": "...", "domain": ".instagram.com", "path": "/"}],
"demoMode": False
}
run = client.actor("jrippy/instagram-scraper").call(run_input=run_input)
# Get results
dataset_items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
for profile in dataset_items:
print(f"{profile['username']}: {profile['followersCount']:,} followers")
print(f" Engagement rate: {profile.get('engagementRate', 'N/A')}%")
print(f" Sentiment: {profile.get('overallSentiment', {}).get('label', 'N/A')}")

Node.js Integration

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
usernames: ['nike', 'adidas', 'puma'],
maxPosts: 20,
includeReels: true,
enableSentimentAnalysis: true,
aiProvider: 'openai',
aiApiKey: 'sk-your-openai-key',
sessionCookies: [{ name: 'sessionid', value: '...', domain: '.instagram.com', path: '/' }],
demoMode: false
};
const run = await client.actor('jrippy/instagram-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(profile => {
console.log(`${profile.username}: ${profile.followersCount.toLocaleString()} followers`);
console.log(` Engagement: ${profile.engagementRate}%`);
});

Anti-Detection Technology

Camoufox Stealth Browser

This scraper uses Camoufox, a C++ level browser fingerprint evasion tool that makes automated browsing appear as genuine human activity.

How it works:

  • Randomizes browser fingerprints (canvas, WebGL, audio)
  • Mimics real human behavior patterns
  • Evades JavaScript-based bot detection
  • Rotates user agents and screen resolutions

Human-like Behavior Patterns

The scraper implements realistic browsing:

  • Natural scroll speeds with random pauses
  • Random delays between actions (1-5 seconds)
  • Mouse movement simulation
  • Click patterns that mimic human interaction

Residential Proxy Rotation

Default configuration uses Apify's residential proxy pool:

  • Real IP addresses from residential ISPs
  • Automatic rotation between requests
  • Geographic targeting available
  • No datacenter IP fingerprinting

Firecrawl API Fallback

When browser-based scraping encounters blocks:

  1. Automatically switches to Firecrawl API
  2. Uses Firecrawl's infrastructure for extraction
  3. Seamlessly merges results with browser data

Comparison to Official APIs

Instagram Graph API (Official)

FeatureGraph APIThis Scraper
AccessOnly accounts you manageAny public profile
SetupFacebook developer app requiredNone
AuthenticationOAuth 2.0Optional session cookies
Real-timeYesScheduled
Comment managementYesRead-only
Insights/AnalyticsYesEngagement metrics
CostFree (rate limited)Pay-per-profile

Best for Graph API: Managing your own Instagram account, posting, responding to comments.

Best for this Scraper: Competitor analysis, influencer research, market research, any public profile.

Instagram Basic Display API

  • Status: Being deprecated by Meta
  • Access: Only your own account
  • Use case: Personal media access

Alternative Tools Comparison

ToolMonthly CostPublic ProfilesAI SentimentAPI Access
Later$25+LimitedNoLimited
Iconosquare$49+LimitedNoYes
HypeAuditor$299+YesLimitedYes
Sprout Social$249+YesYesYes
This ScraperPay-per-useYesYes (BYOK)Yes

This Scraper's Advantages

  1. Any public profile - Not limited to accounts you manage
  2. Session cookie auth - Bypass login walls for reliable data
  3. Login wall detection - Clear reporting when auth is needed
  4. Camoufox anti-detection - C++ level fingerprint evasion
  5. Firecrawl fallback - API alternative when browser fails
  6. AI sentiment analysis - 5 provider options (BYOK)
  7. Business account detection - Category and contact data
  8. Pay-per-result pricing - No monthly subscription
  9. Full API access - Integrate with any system
  10. Export flexibility - JSON, CSV, Excel, XML

FAQ

General Questions

Q: Do I need an Instagram account? A: No, but it is strongly recommended. Instagram increasingly gates content behind login walls. Providing session cookies from a logged-in account ensures reliable, complete data extraction. Without cookies, you may get partial results or hit login walls.

Q: Can I scrape private profiles? A: No. Only public profiles can be scraped. Private profiles are protected by Instagram's privacy settings, even with session cookies.

Q: What about Instagram's terms of service? A: This scraper accesses publicly available data only. See Legal & Compliance section for details.

Q: How often can I run the scraper? A: There's no hard limit, but we recommend starting with small batches (1-3 profiles) and waiting 15-30 minutes between larger runs to avoid detection.

Q: How long do session cookies last? A: Instagram session cookies typically last 1-2 weeks. When they expire, you will start seeing login wall detections. Simply export fresh cookies from Cookie-Editor and update your input.

Technical Questions

Q: What is Camoufox? A: Camoufox is a C++ level browser fingerprint evasion tool. It makes automated browsing appear as genuine human activity to Instagram's detection systems.

Q: Should I use Firecrawl? A: Firecrawl is an optional API-based scraping fallback. Enable it if browser-based scraping gets blocked. Requires your own Firecrawl API key (BYOK).

Q: What AI providers are supported for sentiment analysis? A: OpenAI, Anthropic (Claude), Google (Gemini), Mistral, and Cohere. Each requires your own API key (BYOK).

Q: How many profiles can I scrape per run? A: Start with 1-3 profiles and increase gradually. For large jobs (100+ profiles), split into batches of 20-30 with 15-30 minute gaps.

Q: Why use residential proxies? A: Residential proxies use real IP addresses from home internet connections, making requests appear more legitimate than datacenter IPs.

Q: What happens when a login wall is detected? A: The actor logs a clear message identifying the login wall and which profile was affected. It does not silently return 0 results. If you see login wall messages, provide session cookies to resolve the issue.

Pricing Questions

Q: What does BYOK mean? A: Bring Your Own Key. You provide API keys for Firecrawl and AI providers. Those services charge your account directly.

Q: Is demo mode really free? A: Yes. Demo mode returns sample data with zero charges. Use it to test your integrations.

Q: How is pricing calculated? A: $0.08 per profile scraped. Posts are included in the profile charge.


Troubleshooting

Common Issues

"Login wall detected"

Possible causes:

  • Instagram requires authentication to view this profile's content
  • No session cookies provided, or cookies have expired

Solutions:

  1. Provide session cookies via the sessionCookies input (see Authentication)
  2. If cookies were previously working, export fresh cookies from Cookie-Editor
  3. Make sure you are logged into Instagram in your browser before exporting cookies
  4. Check that your Instagram account is not temporarily restricted

"Profile not found"

Possible causes:

  • Username is misspelled (remember: no @ symbol)
  • Profile has been deactivated or renamed
  • Profile is set to private

Solutions:

  1. Verify username by visiting instagram.com/username in a browser
  2. Check for recent username changes
  3. Confirm profile is public

"Getting blocked by Instagram"

Possible causes:

  • Too many profiles in one run
  • Running too frequently
  • Datacenter proxies being used
  • Session cookies expired or invalid

Solutions:

  1. Provide fresh session cookies
  2. Enable Apify residential proxy (default)
  3. Reduce profiles to 3-5 per run
  4. Wait 15-30 minutes between runs
  5. Enable Firecrawl fallback
  6. Try at different times of day

"No posts returned"

Possible causes:

  • Profile has no public posts
  • Login wall encountered (check logs for login wall detection message)
  • maxPosts set too low
  • Profile only has Stories (not supported)

Solutions:

  1. Check run logs for login wall messages
  2. Provide session cookies if not already
  3. Increase maxPosts value
  4. Set includeReels: true
  5. Verify profile has visible posts

"Demo data showing unexpectedly"

Cause: demoMode is set to true (default)

Solution: Set demoMode: false in your input

"AI sentiment analysis not working"

Possible causes:

  • Invalid API key
  • Wrong provider name
  • AI provider rate limits

Solutions:

  1. Verify API key is valid and has credits
  2. Check provider spelling: openai, anthropic, google, mistral, cohere
  3. Try a different AI provider

"Firecrawl not activating"

Possible causes:

  • Firecrawl not enabled
  • Invalid Firecrawl API key

Solutions:

  1. Set useFirecrawl: true
  2. Verify firecrawlApiKey is correct
  3. Check Firecrawl account has credits

"Webhook not receiving data"

Possible causes:

  • Invalid webhook URL
  • Webhook endpoint not responding
  • Firewall blocking Apify IPs

Solutions:

  1. Test webhook URL with a simple curl request
  2. Check endpoint returns 200 status
  3. Whitelist Apify IP ranges if needed
  4. Check webhook service logs for errors

Error Codes

ErrorMeaningSolution
LOGIN_WALL_DETECTEDInstagram requires authenticationProvide session cookies
COOKIES_EXPIREDSession cookies are no longer validExport fresh cookies from Cookie-Editor
PROFILE_NOT_FOUNDUsername doesn't existVerify username
PROFILE_PRIVATEProfile is privateCannot scrape private profiles
RATE_LIMITEDInstagram blocked requestWait and retry with fewer profiles
PROXY_ERRORProxy connection failedTry different proxy group
AI_API_ERRORAI provider errorCheck API key and credits
FIRECRAWL_ERRORFirecrawl API failedVerify Firecrawl key

Data Export Options

Available Formats

FormatUse CaseHow to Access
JSONAPI integrationsDefault dataset format
CSVExcel, Google SheetsDataset export option
ExcelBusiness reportsDataset export option
XMLLegacy systemsDataset export option

Export via Apify Console

  1. Go to run results
  2. Click "Export" button
  3. Select format (JSON, CSV, Excel, XML)
  4. Download file

Export via API

# JSON
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=json"
# CSV
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv"
# Excel
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=xlsx"

Rate Limits & Best Practices

ScenarioProfiles/RunWait Between Runs
Testing1-35 minutes
Normal usage5-1015 minutes
Batch jobs20-3030 minutes
Large research50+Split into batches

Best Practices

  1. Provide session cookies - Strongly recommended for reliable results
  2. Refresh cookies regularly - Export new cookies every 1-2 weeks
  3. Start small - Begin with 1-3 profiles, scale gradually
  4. Use residential proxies - Default setting, highly recommended
  5. Enable Firecrawl - Automatic fallback when blocked
  6. Schedule off-peak - Run during low-traffic hours
  7. Batch large jobs - Split 100+ profiles into smaller runs
  8. Monitor success rate - Track which profiles succeed/fail
  9. Rotate timing - Don't run at exactly the same time daily

Data Usage

This scraper collects publicly available Instagram data only:

  • Public profile information
  • Public post content and engagement metrics
  • Public comments (if enabled)

What This Scraper Does NOT Do

  • Does not access private profiles
  • Does not bypass privacy settings
  • Does not store Instagram credentials (session cookies are used only during the run)
  • Does not access Instagram's internal APIs

Compliance Considerations

  • GDPR: Collected data may contain personal information. Users are responsible for GDPR compliance when processing EU resident data.
  • CCPA: Similar considerations for California residents.
  • Terms of Service: Users should review Instagram's ToS for their specific use case.
  • Market research and competitive analysis
  • Influencer discovery and vetting
  • Academic research (with appropriate ethics approval)
  • Brand monitoring of public mentions
  • Content strategy research
  • Scraping for spam or harassment
  • Building unauthorized follower databases
  • Circumventing privacy settings
  • Commercial resale of scraped data

Live View API

Monitor scraping progress in real-time during execution.

Endpoints

EndpointDescription
GET /statusCurrent scraping phase and progress
GET /profilesProfiles scraped so far
GET /postsAggregated posts from all profiles
GET /sentimentSentiment analysis summary
GET /engagementAggregate engagement statistics

Example: Check Progress

$curl "https://api.apify.com/v2/actor-runs/RUN_ID/web-server/status"

Response:

{
"phase": "scraping-posts",
"profilesQueued": 5,
"profilesCompleted": 3,
"profilesFailed": 0,
"postsScraped": 45,
"elapsedSeconds": 120,
"mode": "browser",
"aiProvider": "openai",
"cookiesProvided": true
}

Support & Resources

Documentation

Get Help


Instagram is a trademark of Meta Platforms, Inc. This scraper is not affiliated with, endorsed by, or sponsored by Meta.


Built by John Rippy | Actor Arsenal