Instagram Hashtag Scraper
Pricing
from $10.00 / 1,000 results
Go to Apify Store
Instagram Hashtag Scraper
Extract posts from Instagram hashtags with complete metadata including engagement metrics, captions, media info, and author details. Features smart pagination, anti-block strategies, and multiple scraping approaches.
Pricing
from $10.00 / 1,000 results
Rating
5.0
(2)
Developer

Crawler Bros
Maintained by Community
Actor stats
0
Bookmarked
5
Total users
4
Monthly active users
4 days ago
Last modified
Categories
Share
A robust Instagram hashtag scraper built for Apify that extracts posts from Instagram hashtags with complete metadata including engagement metrics, captions, media info, and author details.
Features
- Multiple Hashtag Support: Scrape posts from one or multiple hashtags in a single run
- Smart Pagination: Automatically scrolls and loads more content
- Anti-Block Strategies:
- Cookie rotation via MongoDB
- Smart delays with jitter
- Human-like behavior simulation
- Stealth browser configuration
- Automatic retry with exponential backoff
- Multiple Data Extraction Methods:
- GraphQL API interception
- Direct API calls
- HTML parsing with embedded JSON
- DOM-based fallback extraction
- Comprehensive Data Output: Extracts all available post metadata
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
hashtags | array | required | List of hashtags to scrape (with or without #) |
maxPostsPerHashtag | integer | 50 | Maximum posts to extract per hashtag |
scrapeMode | string | "recent" | "recent", "top", or "both" |
minDelayBetweenRequests | integer | 2 | Minimum delay in seconds |
maxDelayBetweenRequests | integer | 5 | Maximum delay in seconds |
humanizeBehavior | boolean | true | Enable human-like behavior |
cookies | string | null | Instagram cookies in JSON format |
sessionName | string | "default_session" | Session name for cookie storage |
useGraphQLApi | boolean | true | Try GraphQL API first |
proxyConfiguration | object | null | Proxy settings |
Output Data Structure
Each post in the output dataset contains:
{"post_id": "1234567890","shortcode": "ABC123xyz","post_url": "https://www.instagram.com/p/ABC123xyz/","username": "example_user","user_id": "987654321","user_url": "https://www.instagram.com/example_user/","full_name": "Example User","is_verified": false,"profile_pic_url": "https://...","caption": "Amazing sunset! #travel #photography","posted_date": "2024-01-15T18:30:00","timestamp": 1705340400,"location": "Bali, Indonesia","location_id": "123456","media_type": "image","media_count": 1,"thumbnail_url": "https://...","display_url": "https://...","media_urls": ["https://..."],"video_url": null,"is_video": false,"video_view_count": 0,"hashtags": ["travel", "photography"],"mentions": ["friend_account"],"likes_count": 1234,"comments_count": 56,"is_ad": false,"is_carousel": false,"search_hashtag": "travel","scraped_at": "2024-01-20T10:00:00","source": "instagram_hashtag_scraper"}
Cookie Setup
Instagram requires authentication for hashtag scraping. You have several options:
Option 1: Provide cookies directly in input
- Install a browser extension like "EditThisCookie" or "Cookie-Editor"
- Log into Instagram in your browser
- Export the cookies as JSON
- Paste the JSON string in the
cookiesinput field