# Instagram Hashtag Scraper (`fetch_cat/instagram-hashtag-scraper`) Actor

Export visible public Instagram hashtag cards with post and reel links, caption text, author hints, hashtags, mentions and thumbnails. Anonymous coverage varies.

- **URL**: https://apify.com/fetch_cat/instagram-hashtag-scraper.md
- **Developed by:** [Fetch Cat](https://apify.com/fetch_cat) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 1,000 item processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Export visible public Instagram post and reel cards for one or more hashtags. Instagram Hashtag Scraper returns media links, visible caption text, author hints, hashtags, mentions and thumbnails for content research and campaign snapshots—not complete post details or a guaranteed recent feed.

Anonymous access varies: a hashtag can return fewer cards than requested, no cards, or an access error. No Instagram login or cookies are required or accepted.

### Quick start

1. Enter a hashtag such as `cats`, `#nature`, or an Instagram hashtag URL.
2. Start with a small per-hashtag limit:

```json
{
  "hashtags": ["cats"],
  "maxItemsPerHashtag": 10
}
```

3. Click **Start**, then open the dataset to inspect the cards and export JSON, CSV or Excel. Missing visible information may be `null`.

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

### Ready-to-run examples

Choose a public example to see its settings before starting a run:

- [Compare Instagram #cats and #nature hashtag posts](https://apify.com/fetch_cat/instagram-hashtag-scraper/examples/instagram-cats-nature-hashtag-compare)
- [Scrape Instagram #cats hashtag posts](https://apify.com/fetch_cat/instagram-hashtag-scraper/examples/instagram-cats-hashtag-posts)

### What you get

Visible public post and Reel cards with media links, shortcodes and available caption text, author hints, tags and thumbnails. Each row keeps the requested hashtag, source page, position and collection time. This is a card snapshot rather than a full post, exact engagement report or guaranteed recent feed.

### Who is it for?

- **Social-listening researchers** reviewing public card samples for selected hashtags.
- **Content agencies** assembling source-linked visual and caption references.
- **Campaign analysts** comparing their own hashtag exports with explicit coverage limits.
- **Creator-research teams** reviewing best-effort author hints at the linked posts before using them.

### How you can use the data

- **Review a small cats hashtag sample.** Use the existing cats input with ten cards. Keep `requestedHashtag`, `postUrl`, `shortCode` and available caption text together, then open the source post before relying on the text as complete.
- **Compare cats and nature snapshots yourself.** Use the existing two-hashtag example with a small cap per hashtag. A post can appear under both, so preserve its hashtag provenance rather than assuming global post deduplication.
- **Inspect visible text when context matters.** Enable rawText for a bounded card sample and compare it with cleaned caption, tags and mentions. Author hints and visible numeric text are best effort rather than verified creator records or exact engagement metrics.
- **Retain evidence for later review.** Keep source URLs and collection times when saving your own exports. Position reflects returned card order rather than publication time or a recent/top ranking. Thumbnails may expire, and routeStatus only compares returned count with the requested cap.

### Input settings

| Setting | API key | Meaning |
| --- | --- | --- |
| Instagram hashtags | `hashtags` | Required non-empty list of hashtag names or hashtag URLs. |
| Maximum posts per hashtag | `maxItemsPerHashtag` | 1–100 cards per hashtag. The form starts at 10 and the schema default is 20. |
| Include raw visible text | `includeRawText` | Optional card text in `rawText`. Default `false`. |
| Proxy configuration | `proxyConfiguration` | Optional connection settings. See field help. |

Hashtags are normalized to lowercase letters, numbers and underscores. Repeated normalized hashtags are processed once. Supply `maxItemsPerHashtag` explicitly for a predictable limit: the runtime's fallback is 24 if no schema default has been applied.

#### Example inputs

Use the Quick start input as a small first run. Adjust the fields described above for your own data.

### Output data

- **Content discovery:** Public post and reel links, shortcodes and card thumbnails.
- **Campaign research:** Visible caption text, hashtags and mentions from hashtag cards.
- **Creator leads:** Best-effort author usernames and profile URLs when recognizable in the card text. Check the linked post before using them.
- **Snapshot comparison:** Requested hashtag, source URL, result position and scrape time.

This is useful for social listening teams, agencies and researchers collecting a bounded snapshot. It does not provide private content, comments, exact post timestamps, full captions, like counts or complete profile details. Instagram determines the displayed order. There is no Top/Recent selector or custom sorting.

#### More output

Each dataset item represents a visible card, not a full post. The following abbreviated example shows the **output shape only**, not an observed Instagram record:

```json
{
  "requestedHashtag": "cats",
  "postUrl": "https://www.instagram.com/p/EXAMPLE/",
  "mediaType": "post",
  "authorUsername": null,
  "caption": null,
  "hashtags": [],
  "mentions": [],
  "visibleViewCount": null,
  "routeStatus": "partial",
  "position": 1
}
```

| Fields | Meaning |
| --- | --- |
| `requestedHashtag`, `sourceUrl` | Normalized hashtag and page used for this snapshot. |
| `postUrl`, `shortCode`, `mediaType` | Media link, shortcode and `post` or `reel` classification. |
| `authorUsername`, `authorProfileUrl` | Best-effort author inferred from visible text. Nullable. |
| `isVerified` | Whether the visible card text contains a verification label. Absence is not proof of account status. |
| `caption`, `hashtags`, `mentions` | Cleaned card text and tags/mentions found in that text. Not necessarily the full caption. |
| `visibleViewCount`, `visibleViewCountText` | Best-effort numeric/text hints from the card. A number may be inferred from other visible text. Do not treat it as an exact engagement metric. |
| `thumbnailUrl` | Card image URL when present. May expire. |
| `scrapedAt`, `position` | Collection time, not publication time. One-based position within the hashtag's returned cards. |
| `routeStatus` | `ok` when the requested limit was reached.  `partial` when fewer cards were found. Not an independent completeness or access diagnosis. |
| `rawText` | Included only when `includeRawText` is enabled. |

The same post may appear under multiple requested hashtags. Export tools can flatten array fields differently.  JSON preserves their structure.

#### Download your results

Open your run's dataset, choose **Export** and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See [Apify's download and export guide](https://docs.apify.com/storage/dataset#apify-console) for the available formats and field options.

### Pricing

The `item` event charges for each public hashtag card saved. There is no separate start event in the current pricing configuration and no synthetic error or status rows billed as content.

Use a small explicit per-hashtag cap. The possible card maximum is the number of unique normalized hashtags multiplied by that cap, though Instagram can expose fewer. See [current rates on the Pricing tab](https://apify.com/fetch_cat/instagram-hashtag-scraper/pricing).

### Tips for best results

- **Set the per-hashtag cap explicitly.** Form, schema and runtime fallback values differ when a value is not applied.
- **Keep the requested hashtag with each card.** The same post can occur in more than one hashtag sample.
- **Open source posts before relying on author or caption hints.** Card text need not expose full content or accurate profile detail.
- **Keep numeric hints labeled as uncertain.** Visible view-count numbers can be inferred from unrelated card text.
- **Check run outcome as well as routeStatus.** Reaching a requested count is not independent proof of completeness or unrestricted access.

### Limits and caveats

Only anonymously visible public hashtag cards are supported. No Instagram login, cookies, private content or login-restriction bypass is provided. Public availability changes by time and location. Empty accessible pages can finish with no rows, while navigation, execution or storage failures can fail the run. Saved rows can remain if a later hashtag fails.

No exhaustive coverage, recent-first ordering or stable cross-run result set is guaranteed. Instagram determines displayed order, with no Top/Recent selector or custom sorting. Collection times are not post timestamps. Fewer cards, empty results or a partial route label do not establish privacy or deletion.

Cards do not supply full post details, comments, exact post dates, full captions, like counts or complete profiles. Author hints and verification text are not authoritative profile records. View-count hints are not exact engagement metrics, and thumbnails can expire. Missing fields stay null or empty rather than being invented.

Hashtags are normalized and repeated normalized inputs run once, while one post can appear under several hashtags. JSON preserves tag and mention arrays most directly. Any comparison, campaign report or creator qualification is a separate downstream review.

### Automation and integrations

#### Save your settings for next time

Once you have an input that works for you, [save it as an Apify task](https://docs.apify.com/actors/running/tasks). This keeps your settings together so you can use them again without filling in the form from scratch.

#### Run on a schedule

Need fresh results regularly? You can [schedule the Actor or a saved task](https://docs.apify.com/actors/running/schedules) to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

#### Send results to your other tools

Use **n8n, Make or Zapier** to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the [Apify integration guides](https://docs.apify.com/integrations) for your chosen tool.

For a custom connection, an [Apify webhook](https://docs.apify.com/integrations/webhooks) can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

### API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its `defaultDatasetId` to fetch the results.

For setup instructions, see Apify's [JavaScript client guide](https://docs.apify.com/api/client/js), [Python client guide](https://docs.apify.com/api/client/python) and [Actor runs API reference](https://docs.apify.com/api/v2/acts-runs-post).

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~instagram-hashtag-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "hashtags": [
    "cats"
  ],
  "maxItemsPerHashtag": 10
}
JSON
```

#### Node.js

```javascript
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": [
    "cats"
  ],
  "maxItemsPerHashtag": 10
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

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

#### API usage notes

The cURL request starts an asynchronous run. Wait for completion, then read its `defaultDatasetId` using the [Apify API](https://docs.apify.com/api/v2). The dataset can also feed existing Make, Zapier or n8n integrations. This Actor does not contain a built-in monitoring or alerting service.

### MCP and AI agents

You can ask your AI assistant to collect data with **Instagram Hashtag Scraper** and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the [Apify MCP server](https://mcp.apify.com/). MCP gives your assistant a way to find this scraper, run it and read the results. Follow the [official setup and sign-in guide](https://docs.apify.com/mcp) for your app.

#### Easier setup with an Apify plugin

If you use a supported coding assistant, the [official Apify plugin](https://docs.apify.com/agents/plugins) can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

#### Use Apify AI in Console

Prefer to keep everything in Apify? Open [Apify AI in Console](https://docs.apify.com/account/apify-ai) and ask it to find Fetch Cat's **Instagram Hashtag Scraper**. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

#### Choose your assistant

- **Claude and Claude Code (Anthropic):** [Apify setup guide](https://docs.apify.com/integrations/claude).
- **ChatGPT and Codex (OpenAI):** [Apify setup guides](https://docs.apify.com/integrations/openai).
- **Grok Bot (xAI):** [Apify plugin guide](https://docs.apify.com/integrations/grok-bot).
- **Gemini CLI (Google):** [MCP server setup guide](https://geminicli.com/docs/tools/mcp-server/). Use the server URL below with the HTTP configuration supported by Gemini CLI.

#### Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/instagram-hashtag-scraper"
    }
  }
}
```

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

#### Use Apify's general server

Already connected to the general Apify MCP server at `https://mcp.apify.com`? You can use it to find this scraper without adding another server. Ask your assistant to use **Instagram Hashtag Scraper** by Fetch Cat, or give it the identifier `fetch_cat/instagram-hashtag-scraper`.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

#### Example requests

- “Use Fetch Cat’s Instagram Hashtag Scraper to collect up to 5 visible cards for cats. Keep post links, requested hashtag and available caption text without claiming full captions or newest-first order.”
- “Collect up to 3 visible cards each for cats and nature. Keep hashtag provenance and post shortcodes for my own comparison, noting when the same post appears under both.”
- “Retrieve up to 5 cats hashtag cards with raw visible text enabled. Show source links and any author hints, flagging uncertain text or numeric hints without treating them as complete profile or engagement data.”

Normal Apify charges apply. Check the [live Pricing tab](https://apify.com/fetch_cat/instagram-hashtag-scraper/pricing) before asking your assistant to run a larger batch.

### Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through [x402](https://docs.apify.com/integrations/x402). This experimental option lets an agent use Apify without a conventional account.

[Apify AGI](https://agi.apify.com/) provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

#### Other ways for agents to pay

Apify also supports **MPP** for prepaid access through AGI and **Skyfire** for eligible Actors. If your agent already uses one of these, see the [agentic payment guide](https://docs.apify.com/agents/payments) to choose the right setup.

### FAQ

#### Is this an Instagram hashtag API?

It provides an Apify API for visible public hashtag cards, not an official Instagram API or a complete hashtag analytics feed. Use the returned post links to verify important findings.

#### Can I export Instagram hashtag data to CSV?

Yes. Open the dataset after a run and choose CSV, Excel or JSON. Only fields visible or inferred from the public cards are available.  JSON retains arrays such as `hashtags` and `mentions`.

#### Why are fields missing or results fewer than requested?

Instagram may show limited anonymous content, omit author/caption information or block access. Check the dataset and run outcome. `routeStatus` only compares the returned count with the requested limit. Try one known public hashtag with a small limit when reporting an unexpected result.

#### Does it require Instagram login or return private content?

No Instagram account, token or cookies are used. It does not access private or login-only content. Apify authentication is separate and is required for API calls.

### Related Actors

- [Instagram Comments Scraper](https://apify.com/fetch_cat/instagram-comments-scraper) — Collect visible public comments and available author or engagement fields from known post or Reel URLs.
- [Instagram Stories & Highlights Scraper](https://apify.com/fetch_cat/instagram-stories-highlights-scraper) — Collect accessible story and highlight records using your own authorized Instagram session. This does not bypass private-profile permissions.
- [Instagram Profile & Posts Scraper](https://apify.com/fetch_cat/instagram-profile-posts-scraper) — Collect public profile details and available post or Reel metadata from known accounts or media URLs.
- [Instagram AI Transcript Extractor](https://apify.com/fetch_cat/instagram-ai-transcript-extractor) — Retrieve available transcript text from known public Instagram Reel or video URLs.
- [Instagram Search Scraper](https://apify.com/fetch_cat/instagram-search-scraper) — Collect visible topic-linked records from public popular-topic pages, rather than comprehensive Instagram search.

### Support and feedback

For custom additions or integrations, email <hello@fetchcat.dev>.

Found an error or have a feature request? [Open an issue](https://apify.com/fetch_cat/instagram-hashtag-scraper/issues) with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See [Apify’s guide to sharing a run when reporting an issue](https://docs.apify.com/account/collaboration/general-resource-access#automatically-sharing-runs-via-actor-issues). Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. [Leave a review](https://apify.com/fetch_cat/instagram-hashtag-scraper/reviews) to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

# Changelog

This Actor's version history is a separate document: https://apify.com/fetch_cat/instagram-hashtag-scraper/changelog.md

# Actor input Schema

## `hashtags` (type: `array`):

Enter at least one public hashtag name or hashtag URL, for example cats, #nature, or https://www.instagram.com/explore/tags/dogs/. Names are lowercased and stripped to letters, numbers and underscores; repeated normalized hashtags are processed once. This is not a keyword or profile search.

## `maxItemsPerHashtag` (type: `integer`):

Maximum visible post or reel cards to save per unique hashtag, from 1 to 100. The form prefill is 10 and the schema default is 20. If no schema default is applied and the value is omitted, the runtime fallback is 24. Supply an explicit value for predictable API limits. Fewer or no cards may be available; this limit does not select a feed or sort order.

## `includeRawText` (type: `boolean`):

Adds rawText containing the visible card text to each saved row. Default false; enable for inspecting ambiguous caption, author or numeric hints. This does not fetch full post details or additional private data.

## `proxyConfiguration` (type: `object`):

Optional proxy settings used from the start of the browser session when supplied. Omit this field for a direct connection; there is no automatic proxy fallback. Existing managed Apify Proxy settings and customer proxy URLs are passed to the Apify proxy configuration unchanged, including explicit useApifyProxy: false. Paid managed proxy use may incur charges under your account settings. Invalid settings are not a request for automatic fallback. Never post proxy URLs or credentials in public issues.

## Actor input object example

```json
{
  "hashtags": [
    "cats"
  ],
  "maxItemsPerHashtag": 10,
  "includeRawText": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "hashtags": [
        "cats"
    ],
    "maxItemsPerHashtag": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/instagram-hashtag-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "hashtags": ["cats"],
    "maxItemsPerHashtag": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/instagram-hashtag-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "hashtags": [
    "cats"
  ],
  "maxItemsPerHashtag": 10
}' |
apify call fetch_cat/instagram-hashtag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fetch_cat/instagram-hashtag-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0hNMJrC7yThjM8ODB/builds/E7VJcbXcEKjqxilUD/openapi.json
