Instagram Tagged Posts Scraper
Pricing
from $5.00 / 1,000 results
Instagram Tagged Posts Scraper
Extracts posts where a specific Instagram user is tagged by others. Returns complete post data including likes, comments, captions, media URLs, and author details with profile pictures and verification status.
Pricing
from $5.00 / 1,000 results
Rating
5.0
(2)
Developer
Crawler Bros
Maintained by CommunityActor stats
0
Bookmarked
32
Total users
3
Monthly active users
3 days ago
Last modified
Categories
Share
Extract posts where a user is tagged on Instagram. This scraper navigates to the "Tagged" tab of any Instagram profile and extracts all posts where the target user has been tagged by others. Accepts one or more usernames per run - each username's post URLs are found by the browser, then handed off to run in the background while the browser moves on to the next username.
Features
- 🏷️ Tagged Posts Extraction: Scrapes posts from the
/tagged/tab of any Instagram profile - 👥 Multiple Usernames: Process several usernames in a single run, pipelined so scraping overlaps with crawling
- 📊 Engagement Metrics: Extracts likes, comments, and views for each post
- 📸 Media URLs: Collects image and video URLs from posts
- 👤 Author Information: Gets details about who posted/tagged the user
- 🔐 Cookie Authentication: Supports MongoDB cookie rotation and file-based cookies
- 🛡️ Anti-Detection: Human behavior simulation, stealth scripts, and random delays
- 📧 Email Alerts: Automatic notifications when cookies fail or are exhausted
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
usernames | Array[String] | Yes | - | One or more Instagram usernames whose tagged posts to scrape |
maxPosts | Integer | No | 100 | Maximum number of tagged posts to extract per username |
cookies | String | No | - | Instagram cookies in JSON format |
sessionName | String | No | "default_session" | Session name for cookie persistence |
Example Input
{"usernames": ["instagram", "natgeo"],"maxPosts": 20}
Output Format
Each tagged post is returned with the following structure:
{"tagged_username": "instagram","post_url": "https://www.instagram.com/p/ABC123/","description": "Post caption here...","post_type": "image","like_count": 12345,"comment_count": 234,"view_count": 0,"pub_date": "2024-01-15T10:30:00","media_urls": ["https://instagram.com/..."],"scraped_at": "2024-01-20T15:30:00.000Z","authorMeta": {"username": "photographer","full_name": "John Photographer","profile_url": "https://www.instagram.com/photographer/","is_verified": false}}
Cookie Authentication
Option 1: MongoDB Cookie Rotation (Automatic)
The scraper automatically connects to MongoDB for cookie rotation. This provides:
- Round-robin cookie selection
- Automatic failover when cookies fail
- Usage tracking and failure detection
- Email alerts for cookie failures
Option 2: Manual Cookie Input
Export cookies from your browser and provide them in the cookies parameter:
- Install a browser extension like "Cookie-Editor" or "EditThisCookie"
- Log into Instagram in your browser
- Export cookies as JSON
- Paste the JSON into the
cookiesinput parameter
Option 3: File-Based Cookies
Place a cookies file in the scraper directory:
www.instagram.com.cookies (1).jsonwww.instagram.com.cookies.jsoncookies.jsonIG_Cookies.json
Anti-Blocking Measures
This scraper includes multiple anti-detection features:
- Stealth Scripts: Override navigator properties to avoid bot detection
- Human Behavior Simulation: Random mouse movements, scrolling, and delays
- Cookie Rotation: Automatic rotation through multiple accounts
- Random Delays: Variable delays between requests
- Firefox Browser: Uses Firefox which has better anti-detection properties
Error Handling
The scraper handles various error scenarios:
- Profile Not Found: Returns error message if profile doesn't exist
- Private Account: Tagged posts are not accessible for private accounts
- No Tagged Posts: Returns message if user has no tagged posts
- Rate Limiting: Automatically stops if Instagram blocks access
- Cookie Failure: Rotates to next cookie and sends email alert
Limitations
- Tagged posts are only visible if the target profile is public
- Instagram may limit access without authentication
- Rate limits apply - avoid scraping too many posts too quickly
- Some posts may be restricted based on account settings
Local Development
# Install dependenciespip install -r requirements.txt# Install Playwright browsersplaywright install firefox# Run locallyapify run
Deployment to Apify
# Login to Apifyapify login# Push to Apifyapify push
Support
If you encounter issues:
- Ensure cookies are valid and not expired
- Check if the target profile is public
- Reduce
maxPoststo avoid rate limiting