Instagram Hashtag Scraper

Export public Instagram hashtag posts and reels with captions, URLs, authors, hashtags, and visible engagement signals.

Data fields

FieldTypeDescription
requestedHashtagstringValue exported as requestedHashtag.
sourceUrlstringValue exported as sourceUrl.
postUrlstringValue exported as postUrl.
shortCodestringValue exported as shortCode.
mediaTypestringValue exported as mediaType.
authorUsernamestring | nullValue exported as authorUsername.
authorProfileUrlstring | nullValue exported as authorProfileUrl.
isVerifiedboolean | nullValue exported as isVerified.

Input preview

hashtagsInstagram hashtags *
maxItemsPerHashtagMaximum posts per hashtag
includeRawTextInclude raw visible text
proxyConfigurationProxy configuration

API and agents

This actor can be run through Apify API, datasets, webhooks, schedules, and the official Apify MCP server.

Ready-to-run examples

Open a saved Apify example, adjust the input, and run the actor in your own Apify account.

View all examples

How this actor works

See example inputs, outputs, API usage, and practical limits before running this actor on Apify.

Open Apify page

Export public Instagram hashtag posts and reels for social listening, creator intelligence, and brand monitoring workflows. The actor opens public hashtag pages anonymously and saves visible post/reel cards with captions, URLs, authors, hashtags, mentions, thumbnails, view text, and route diagnostics.

What you can extract

  • Public post and reel URLs from Instagram hashtag pages
  • Shortcodes and media type (post or reel)
  • Visible author usernames and profile URLs when shown in the card
  • Captions / visible card text, hashtags, and mentions
  • Visible view counts and thumbnail URLs when exposed by Instagram
  • Provenance fields: requested hashtag, source URL, position, scrape time, and route status

Instagram limits what anonymous visitors can see. Fields that require login-only post detail pages, such as exact timestamps, full comments, private accounts, and non-visible like/comment totals, are intentionally not included.

Input fields

  • hashtags — Hashtag names or Instagram hashtag URLs. Examples: cats, #nature, https://www.instagram.com/explore/tags/dogs/.
  • maxItemsPerHashtag — Maximum records to save for each hashtag, from 1 to 100.
  • includeRawText — Adds the raw visible card text for diagnostics and parser review.
  • proxyConfiguration — Optional Apify Proxy settings. Leave empty unless your run is blocked.

API and integrations

Use this Instagram hashtag scraper as an Instagram hashtag API from the Apify Console, API, scheduler, webhooks, or integrations such as Make, Zapier, and n8n. The default dataset can be exported as JSON, CSV, Excel, XML, or RSS and used in social listening dashboards, enrichment pipelines, and alerts.

Who is it for?

This actor is built for teams that need repeatable hashtag monitoring without manually opening Instagram search pages.

  • Social listening teams tracking campaign hashtags and emerging conversations
  • Creator intelligence teams finding public reels and posts around a niche
  • Brand monitoring teams exporting public hashtag evidence for dashboards
  • Agencies preparing recurring reports for clients or competitors
  • Data teams enriching alerts, spreadsheets, BI tools, or internal review queues

How to get best results

Start with one or two hashtags and a low maxItemsPerHashtag value. Once the route returns stable results, schedule the same input or expand the hashtag list. Instagram can vary anonymous public results by time and region, so treat the dataset as a snapshot of visible public cards at run time.

For larger monitoring jobs, split unrelated hashtag groups into separate runs. This makes partial results easier to diagnose and keeps each dataset focused on one campaign, brand, or content category.

API usage

Node.js

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/instagram-hashtag-scraper').call({
  hashtags: ['dogs'],
  maxItemsPerHashtag: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
import os

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/instagram-hashtag-scraper').call(run_input={
    'hashtags': ['dogs'],
    'maxItemsPerHashtag': 10,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

cURL

curl -X POST "https://api.apify.com/v2/acts/fetch_cat~instagram-hashtag-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"hashtags":["dogs"],"maxItemsPerHashtag":10}'

MCP integration

Use this actor from Apify MCP-compatible workflows when you want an assistant or automation tool to collect public hashtag cards on demand. Provide the same JSON input you would use in Console, then read the default dataset for URLs, captions, authors, and visible engagement signals.

Install the Apify MCP server in Claude Desktop or a compatible client:

claude mcp add apify -- npx -y @apify/actors-mcp-server --actors fetch_cat/instagram-hashtag-scraper

Example MCP server configuration:

{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--actors", "fetch_cat/instagram-hashtag-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}

Example prompts:

  • "Run the Instagram Hashtag Scraper for dogs and summarize the top captions."
  • "Export 10 public cards for nature and list authors with visible view counts."
  • "Compare hashtags cats and dogs using the dataset returned by the Apify actor."

A typical MCP workflow is: choose hashtags, run the actor, fetch the dataset, summarize posts by author or caption keywords, and hand the resulting URLs to a human reviewer or downstream enrichment step.

Support

If a run returns unexpected results, open an issue from the Actor page and include the run ID, complete input, expected result, actual result, and the shortest public hashtag URL that reproduces the problem. For diagnostics, rerun a small sample with includeRawText enabled.

Notes and limitations

  • Results are limited to public anonymous Instagram surfaces available at run time.
  • routeStatus is ok when the requested limit was reached and partial when Instagram exposed fewer cards than requested.
  • The actor deduplicates media URLs per hashtag and preserves partial output across multi-hashtag runs.
  • Login-only or private data is not scraped.

Common questions

Questions and answers reused from the canonical actor README.

Does this scrape private Instagram content?

No. It only uses public anonymous Instagram hashtag pages available at run time.

Why did I receive fewer rows than requested?

Instagram can cap anonymous public hashtag pages or vary what it renders. Check routeStatus, position, and the run logs to distinguish a normal partial result from a blocked or empty route.

Can I scrape exact likes, comments, timestamps, or full post details?

Not in this v1 hashtag-card route. Those fields usually require login-only detail pages or a separate post-detail route, so they are not emitted as empty compatibility columns.