Instagram Hashtag Scraper avatar
Instagram Hashtag Scraper

Pricing

from $10.00 / 1,000 results

Go to Apify Store
Instagram Hashtag Scraper

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

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

4

Monthly active users

4 days ago

Last modified

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

ParameterTypeDefaultDescription
hashtagsarrayrequiredList of hashtags to scrape (with or without #)
maxPostsPerHashtaginteger50Maximum posts to extract per hashtag
scrapeModestring"recent""recent", "top", or "both"
minDelayBetweenRequestsinteger2Minimum delay in seconds
maxDelayBetweenRequestsinteger5Maximum delay in seconds
humanizeBehaviorbooleantrueEnable human-like behavior
cookiesstringnullInstagram cookies in JSON format
sessionNamestring"default_session"Session name for cookie storage
useGraphQLApibooleantrueTry GraphQL API first
proxyConfigurationobjectnullProxy 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"
}

Instagram requires authentication for hashtag scraping. You have several options:

Option 1: Provide cookies directly in input

  1. Install a browser extension like "EditThisCookie" or "Cookie-Editor"
  2. Log into Instagram in your browser
  3. Export the cookies as JSON
  4. Paste the JSON string in the cookies input field