Instagram Hashtag Scraper avatar

Instagram Hashtag Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Instagram Hashtag Scraper

Instagram Hashtag Scraper

Scrape Instagram posts by hashtag quickly and at scale. Extract captions, images, reels, likes, comments, and metadata. Perfect for trend analysis, influencer research, marketing insights, and dataset creation. Fast, reliable, and ideal for automated Instagram hashtag monitoring.

Pricing

$19.99/month + usage

Rating

5.0

(10)

Developer

Scraper Engine

Scraper Engine

Maintained by Community

Actor stats

0

Bookmarked

141

Total users

4

Monthly active users

5 days ago

Last modified

Share

Instagram Hashtag Scraper — Captions, Likes and Owner Data

Instagram Hashtag Scraper extracts public Instagram posts and reels published under any hashtag and returns caption, likesCount, commentsCount, ownerUsername, and video metadata as structured JSON — no HTML parsing needed. Add one or more hashtags, hashtag URLs, or keywords, and it walks the hashtag feed section by section so results stay grouped by tag. Run it directly on Apify Console or the API and export clean rows in minutes.

What is Instagram Hashtag Scraper?

Instagram Hashtag Scraper is an Apify Actor that collects public posts and reels tagged under one or more Instagram hashtags and returns them as structured JSON, grouped section-by-section per hashtag. It requires a valid Instagram sessionid cookie — the hashtag feed endpoint it calls is login-walled, so the Actor cannot fetch any data without one. It is built for social-media marketers, hashtag researchers, and developers who need Instagram hashtag data fed into a pipeline or AI agent without maintaining their own scraping infrastructure.

What Instagram hashtag data is publicly available to scrape?

A hashtag's page and top posts are visible without logging in; the full paginated feed this Actor reads is not.

Data CategoryPublicly AvailableRestricted behind Instagram login (sessionid)
Hashtag page, top postsVisible, logged out
Full recent/reels paginationRequires a valid sessionid
Caption, hashtags, mentionsVisible
Likes, comments, play countsVisible (likes hideable)
Author username, full nameVisible if public account
Private account postsNever accessible either way

Instagram Hashtag Scraper only returns publicly visible data, but the feed endpoint requires a logged-in session cookie rather than an anonymous request.

What data can I extract with Instagram Hashtag Scraper?

Instagram Hashtag Scraper returns identity fields for every post, engagement metrics, and media/structure fields — all grouped under the hashtag section they were collected from.

Field NameDescription
sectionThe hashtag this post was collected under
inputUrlThe hashtag's explore-page URL used as the source
idInstagram's internal media ID
shortCodeThe post's short code (used in its URL)
urlDirect link to the post or reel
typeImage, Video, Sidecar (carousel), or Reel
captionFull caption text
hashtagsHashtags parsed out of the caption
mentions@-mentions parsed out of the caption
timestampPublish time, ISO-8601 UTC
ownerUsernameAuthor's username
ownerFullNameAuthor's display name
ownerIdAuthor's numeric Instagram ID
productTypeInstagram's internal product-type label (e.g. feed, clips)

Engagement & metric fields

Field NameDescription
likesCountLike count (null when the author has hidden it)
commentsCountComment count
videoPlayCountPlay count (videos/reels only, when Instagram reports it)
videoViewCountView count (videos/reels only, when Instagram reports it)

Media & structure fields

Field NameDescription
displayUrlThumbnail/display image URL
imagesArray of display image URL(s), including carousel children
dimensionsHeight / dimensionsWidthMedia dimensions in pixels
videoUrlVideo source URL (videos/reels only)
videoDurationVideo duration in seconds (videos/reels only)
musicInfoReel audio/music metadata object, or null
childPostsCarousel children, each with its own media fields

🤖 Add-on: Need additional Instagram data?

Pair this Actor with Instagram Reels Scraper if you need deeper reel-specific engagement data beyond a single hashtag, Instagram Tagged & Mentions Posts & Location Scraper to track where and by whom a brand gets tagged, or Instagram Related Person Scraper to expand from the creators you find under a hashtag into their connected accounts.

How does Instagram Hashtag Scraper differ from the official Instagram API?

Meta's Instagram Graph API can query hashtags through its Hashtag Search endpoint, but only for an Instagram Business or Creator account and within strict scope and volume limits, while Instagram Hashtag Scraper runs against any session and returns full post/reel objects immediately (Meta's Instagram Hashtag Search reference, checked 2026-07-25).

FeatureInstagram Graph API (Hashtag Search)Instagram Hashtag Scraper
Account requirementInstagram Business or Creator accountAny Instagram session (sessionid cookie)
Approval processApp Review + "Instagram Public Content Access" feature approvalNone — run immediately
Hashtag query cap30 unique hashtags per rolling 7-day periodNo app-imposed hashtag cap in the Actor's own code
Reels supportNot exposed through the hashtag search edgecontentType: reels returns reel-specific fields directly
Data returnedrecent_media edges tied to the caller's own business contextFull post/reel objects: caption, engagement, owner, media URLs, music metadata
Setup timeDeveloper app creation and review cycle before the first callPaste a sessionid and run

Use the Graph API when you already hold Business/Creator access and need a Meta-native integration you can pass App Review for. Use Instagram Hashtag Scraper when you need immediate access, reel data, or hashtags outside your own linked business account.

How to use Instagram Hashtag Scraper

Instagram Hashtag Scraper runs as an Apify Actor — no separate signup or API key beyond your Apify account and an Instagram session cookie.

  1. Open Instagram Hashtag Scraper on Apify Console.
  2. Add one or more values to startUrls — a bare hashtag word, a #hashtag, a hashtag URL, or a keyword (with Keyword Search on).
  3. Paste your Instagram sessionid cookie — this is required; the Actor cannot fetch data without it.
  4. Optionally set Content Type (posts or reels), Results Limit per Hashtag, Keyword Search, and Proxy.
  5. Start the run and export the dataset as JSON, CSV, or Excel, or read it back through the Apify API.

How to scale to bulk Instagram hashtag extraction

startUrls accepts an array, so a single run can process many hashtags at once — each one becomes its own labeled section in the output, in the order supplied. There is no separate "bulk" input beyond this array; for volumes beyond what one run should hold, split the list across multiple runs (for example, on a schedule) rather than growing one run indefinitely.

What can you do with Instagram hashtag data?

  • A social-media strategist tracking a campaign hashtag uses caption, hashtags, and timestamp to see what messaging and co-tags are trending under it this week.
  • A marketing analyst measuring hashtag performance uses likesCount, commentsCount, and videoPlayCount to rank which posts under a tag actually drove engagement.
  • An influencer-discovery researcher uses ownerUsername and ownerFullName across many posts in a hashtag section to surface which creators post there repeatedly.
  • A content strategist studying reel trends sets contentType to reels and reads musicInfo and videoDuration to spot which audio and formats recur under a topic.
  • An AI engineer builds a RAG pipeline over caption, hashtags, and ownerUsername from multiple hashtag sections to let an LLM agent answer questions about what's trending on Instagram right now.

How does Instagram Hashtag Scraper handle rate limits and blocking?

The Actor sends requests through an impit HTTP client that reproduces a real Chrome TLS/HTTP fingerprint, which Instagram's private API endpoints check before serving a response. Proxy traffic follows a ladder — your configured proxy, then Apify's RESIDENTIAL group, then a direct connection — and keeps one sticky IP per run so Instagram doesn't see a session hopping between IPs mid-scrape. Failed requests are retried up to 5 times with exponential backoff and jitter, and a 403 response drops the ladder to its next tier rather than hammering the same IP.

Genuine authentication failures (checkpoint_required, login_required, or a login redirect) are treated differently from transient errors: the Actor stops immediately with a clear "refresh your sessionid" message instead of retrying a dead session. If a run collects zero posts for any reason, it still finishes successfully and writes one free diagnostic record explaining why, rather than crashing or returning an empty dataset silently.

⬇️ Input

ParameterRequiredTypeDescriptionExample Value
startUrlsYesarrayOne or more hashtags, hashtag URLs, or keywords (with Keyword Search on). Each becomes its own section in the output.["photography", "https://www.instagram.com/explore/tags/travel/"]
sessionidYesstringYour Instagram sessionid cookie, copied from a logged-in browser session. Required — the hashtag feed is login-walled. Default: ""."71234567890%3Aa1B2c3D4E5..."
contentTypeNostringContent to collect: posts (photos/videos/carousels) or reels. Default: "posts"."posts"
keywordSearchNobooleanWhen true, resolves a plain keyword to its closest matching hashtag instead of treating input as a literal tag. Default: false.false
resultsLimitNointegerItems to collect per hashtag, 1–1000. Default: 20.50
proxyConfigurationNoobjectApify Proxy configuration; RESIDENTIAL recommended for high-volume runs. Default: {"useApifyProxy": false}.{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}

Example input

{
"startUrls": ["photography", "https://www.instagram.com/explore/tags/travel/"],
"sessionid": "71234567890%3Aa1B2c3D4E5F6g7H8i9J0k1L2m3N4o5P6%3A0%3AabCd12",
"contentType": "posts",
"keywordSearch": false,
"resultsLimit": 50,
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}

⬆️ Output

Every run produces typed JSON rows in the default dataset, exportable as JSON, CSV, or Excel. This Actor uses pay-per-event pricing: only real post/reel rows are charged as a row_result event. Section-header rows (isSection: true) and the diagnostic row (isDiagnostic: true), if any, are free metadata — filter them out of billing calculations with an expression like !item.isSection && !item.isDiagnostic.

Example output

{
"section": "photography",
"inputUrl": "https://www.instagram.com/explore/tags/photography",
"id": "3701234567890123456",
"type": "Reel",
"shortCode": "DGS3GDiTH_5",
"caption": "Golden hour on the coast 🌅 #photography #travel",
"hashtags": ["photography", "travel"],
"mentions": [],
"url": "https://www.instagram.com/reel/DGS3GDiTH_5/",
"commentsCount": 24,
"dimensionsHeight": 1920,
"dimensionsWidth": 1080,
"displayUrl": "https://instagram.fxyz1-1.fna.fbcdn.net/v/thumb.jpg",
"images": ["https://instagram.fxyz1-1.fna.fbcdn.net/v/thumb.jpg"],
"likesCount": 1830,
"videoPlayCount": 54210,
"videoViewCount": 61890,
"videoUrl": "https://instagram.fxyz1-1.fna.fbcdn.net/v/video.mp4",
"videoDuration": 14.5,
"timestamp": "2026-02-20T18:30:42.000Z",
"childPosts": [],
"ownerFullName": "Coast Frames",
"ownerUsername": "coast_frames",
"ownerId": "9123456780",
"productType": "clips",
"musicInfo": {
"song_name": "Golden Hour Vibes",
"artist_name": "Ambient Waves"
}
}

How does it work?

Instagram Hashtag Scraper sends requests through an impit client configured to present a real Chrome fingerprint, since Instagram's private API endpoints reject requests that don't look like a real browser even with a valid session cookie. Each run warms up against the Instagram homepage to pull a live CSRF token, then queries the hashtag search endpoint page by page, resolving keywords to hashtags first when Keyword Search is enabled. Traffic runs through a proxy ladder with a sticky IP per run, falling back through tiers on a block rather than failing outright. Only data visible through this authenticated-but-public feed is returned — no private accounts, no DMs. The output schema (field names and shapes) stays the same across runs regardless of changes to Instagram's own page layout, since it's built from the underlying API response, not scraped HTML.

Integrations

Instagram Hashtag Scraper runs on Apify, so it works anywhere you can call an HTTP API or an Apify client library — no proprietary SDK required.

Calling Instagram Hashtag Scraper programmatically

from apify_client import ApifyClient
client = ApifyClient("<APIFY_API_TOKEN>")
run = client.actor("scraper-engine/instagram-hashtag-scraper").call(run_input={
"startUrls": ["photography", "travel"],
"sessionid": "<YOUR_INSTAGRAM_SESSIONID>",
"contentType": "posts",
"resultsLimit": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item.get("ownerUsername"), item.get("likesCount"))

Works in Go, Ruby, Node.js, cURL — any language that can make an HTTP request.

MCP integration for AI agents

Instagram Hashtag Scraper is reachable through Apify's Actors MCP Server, which exposes Actors on Apify Store as callable tools for MCP-compatible clients such as Claude Desktop and Claude Code. Register it by connecting from this Actor's page in Apify Console, or by running npx @apify/actors-mcp-server configured with this Actor's store ID.

No-code tools (n8n, Make, LangChain)

In n8n, use the HTTP Request node (or the community Apify node) pointed at this Actor's run endpoint, with your Apify API token in the Authorization header. In Make, use the Apify app's "Run Actor and get dataset items" module and map startUrls and sessionid from earlier scenario steps. In LangChain, call the same Apify API endpoint from a custom Tool, or load results with the community Apify dataset loader, so an agent can pull fresh hashtag data mid-conversation.

Scraping publicly visible Instagram posts is generally lawful for legitimate business or research use, though Instagram's own Terms of Service restrict automated access. Instagram Hashtag Scraper only returns data visible on posts and reels under a public hashtag — it does not access private accounts, DMs, or stories. Aggregate hashtag statistics (like counts, comment counts, post volume) are business/performance data, but each returned post also carries its author's ownerUsername, ownerFullName, and ownerId — these are personal data once collected, so storage and downstream use should have a lawful basis under GDPR/CCPA if the individuals are identifiable. Consult legal counsel if your use case involves bulk storage of personal data.

Frequently asked questions

What Instagram hashtag fields does Instagram Hashtag Scraper return?

It returns caption, likesCount, commentsCount, ownerUsername, and timestamp for every post or reel under a hashtag, along with media URLs, dimensions, and (for reels) musicInfo and videoDuration. See the full data fields tables above for every key.

Does Instagram Hashtag Scraper require an Instagram account or login?

Yes. The sessionid input is required — Instagram's hashtag feed endpoint is login-walled, and the Actor writes a diagnostic record and stops if it's missing rather than guessing at unauthenticated access.

How many posts can I extract in one run?

resultsLimit (1–1000) is applied per hashtag, and startUrls can hold multiple hashtags in one run, so total output scales with however many hashtags you supply times the limit you set for each, subject to how many posts Instagram actually serves for that tag.

What happens if a hashtag returns zero results?

The run still finishes successfully and pushes a single free diagnostic record (isDiagnostic: true) explaining the likely cause — most often an expired or flagged sessionid — instead of failing or returning an empty, unexplained dataset.

Can I scrape multiple Instagram hashtags at once?

Yes. startUrls accepts an array, and every hashtag in it becomes its own labeled section in the same run's output, processed one after another.

Does Instagram Hashtag Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes. It's reachable through Apify's Actors MCP Server for MCP-compatible clients, and callable as a plain HTTP endpoint by any agent framework that can make an API call.

How does Instagram Hashtag Scraper compare to other Instagram hashtag scrapers?

Most general-purpose Instagram scrapers on Apify Store bundle hashtags in as one of several supported entity types (alongside profiles, comments, and locations) behind a shared input shape. Instagram Hashtag Scraper is built specifically around hashtags, with built-in keyword-to-hashtag resolution and section-grouped output, and prices only the real post/reel rows it returns.

Does Instagram Hashtag Scraper return data in a format LLMs can use directly?

Yes. Output is typed, normalized JSON with consistent field names across runs — no HTML parsing or CSS selectors involved. Pass it directly to an LLM, index it into a vector store, or feed it to an agent tool.

What happens when Instagram changes its layout or anti-bot system?

The Actor is maintained against Instagram's underlying API responses rather than its HTML, and the output schema stays stable across runs regardless of front-end layout changes.

Can I use Instagram Hashtag Scraper without managing proxies or browser infrastructure?

Yes. The Actor handles proxy selection (including a RESIDENTIAL fallback tier), sticky IP sessions, retries, and a Chrome-fingerprinted HTTP client internally — you only need to supply a sessionid.

Which Instagram hashtag fields work best for AI training data and RAG indexing?

For RAG, index caption, hashtags, and ownerUsername — the highest-information text fields. For training data, likesCount, commentsCount, timestamp, and type are the most consistently structured across records. All fields return as typed primitives (strings, numbers, booleans, arrays), not embedded HTML.

Scraper NameWhat it extracts
Instagram Profile ScraperBio, follower/post counts, profile metadata
Instagram Reels ScraperReel engagement and video metadata
Instagram Related Hashtag Stats Scraper Pay Per EventsRelated-hashtag stats for a seed hashtag
Instagram Tagged & Mentions Posts & Location ScraperPosts a profile is tagged/mentioned in, with location
Instagram Related Person ScraperAccounts connected to a given profile
Instagram Comments Scraper With Lead EnrichmentComment threads, enriched with lead data

Your feedback

Found a bug or missing a field in Instagram Hashtag Scraper? Let us know through the Issues tab on this Actor's Apify Store page, or message Scraper Engine support directly — reports like this are how the Actor stays maintained as Instagram's API evolves.