# Instagram Hashtag Stats (`maximedupre/instagram-hashtag-stats-scraper`) Actor

For each hashtag with a readable public count, get its current approximate post count. Add up to 10 top posts shown on the public hashtag page, with available creator and post details. Each run reports current data and keeps no history.

- **URL**: https://apify.com/maximedupre/instagram-hashtag-stats-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Marketing, For creators
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 hashtag counts

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

### 🏷️ Check Instagram hashtag stats

Creators, social media marketers, and researchers can use this Actor to check the current approximate public post count for Instagram hashtags. A hashtag with a readable count gets a result row. Turn on **Include top posts** to add up to 10 posts currently shown on that hashtag page, with public details when available. Review the counts and post examples as you plan content.

- Review available public creator details from a hashtag’s top posts with [**Instagram Hashtag Creator Search**](https://apify.com/maximedupre/instagram-hashtag-stats-scraper/examples/instagram-hashtag-creator-search).
- Review available likes, comments, and Reel views from hashtag posts with [**Instagram Hashtag Engagement**](https://apify.com/maximedupre/instagram-hashtag-stats-scraper/examples/instagram-hashtag-engagement).
- See up to 10 posts currently shown on a hashtag page with [**Instagram Hashtag Top Posts**](https://apify.com/maximedupre/instagram-hashtag-stats-scraper/examples/instagram-hashtag-top-posts).
- Compare current approximate post counts across several hashtags with [**Instagram Hashtag Comparison**](https://apify.com/maximedupre/instagram-hashtag-stats-scraper/examples/instagram-hashtag-comparison).
- Check a hashtag’s current approximate public post count with [**Instagram Hashtag Stats**](https://apify.com/maximedupre/instagram-hashtag-stats-scraper/examples/instagram-hashtag-stats).

#### 📊 What each hashtag row contains

Each successful row shows the hashtag name and its current approximate public post count. Instagram’s public numeric hashtag ID is included when available. When **Include top posts** is on, a row can also include up to 10 posts currently shown on that hashtag page. Post creator details, captions, dates, thumbnails, likes, comments, and Reel views appear only when the public page provides them. A hashtag with no readable public count does not produce a successful row.

#### ▶️ Run the Instagram hashtag stats scraper

1. Enter 1 to 50 public Instagram hashtag names in **Input**.
2. Turn on **Include top posts** if you want the posts shown on each hashtag page.
3. Start the Actor and open the default dataset from **Output**.

#### ⚙️ Input

**Input fields**

| Field | Type | What it does |
| --- | --- | --- |
| `hashtags` | array of strings | Required. Enter 1 to 50 public Instagram hashtag names. |
| `includeTopPosts` | boolean | When on, add up to 10 current top posts shown on each hashtag’s public page, with available public details. |

**Example input**

This successful current-beta input uses the prefilled hashtag values and default top-post setting.

```json
{
  "hashtags": [
    "travel",
    "food"
  ],
  "includeTopPosts": false
}
```

#### 🧾 Output

**Output link**

| Field | Type | What it does |
| --- | --- | --- |
| `hashtagResults` | string | Opens the default dataset overview with the current hashtag rows. |

**Count-only rows**

With **Include top posts** off, the row has the hashtag name and post count. The hashtag ID appears when Instagram exposes it.

| Field | Type | What it does |
| --- | --- | --- |
| `hashtag` | string | Required public hashtag name shown on Instagram. |
| `postCount` | integer | Required current approximate number of public posts shown for the hashtag. |
| `hashtagId` | string | Optional Instagram public numeric hashtag ID, when available. |

**Example row**

This is one complete row from a successful current-beta run.

```json
{
  "hashtag": "travel",
  "hashtagId": "17843819167049166",
  "postCount": 798157514
}
```

**Rows with top posts**

With **Include top posts** on, a row can also contain post details. Some fields are optional and appear only when Instagram provides them.

| Field | Type | What it does |
| --- | --- | --- |
| `hashtag` | string | Required public hashtag name shown on Instagram. |
| `hashtagId` | string | Optional Instagram public numeric hashtag ID, when available. |
| `postCount` | integer | Required current approximate number of public posts shown for the hashtag. |
| `topPosts` | array | Optional. Up to 10 posts currently shown on the hashtag page. This field may be empty or absent. |
| `topPosts[].id` | string | Required public identifier for the post. |
| `topPosts[].mediaType` | string | Required media type reported for the post. |
| `topPosts[].creator` | object | Public creator details, when available. |
| `topPosts[].creator.username` | string | Public Instagram username of the creator, when available. |
| `topPosts[].creator.fullName` | string | Public display name of the creator, when available. |
| `topPosts[].caption` | string | Public caption text, when available. |
| `topPosts[].postedAt` | string (date-time) | Date and time the post was published, when available. |
| `topPosts[].thumbnailUrl` | string (URL) | Public thumbnail URL, when available. |
| `topPosts[].likesCount` | integer | Public like count, when available. |
| `topPosts[].commentsCount` | integer | Public comment count, when available. |
| `topPosts[].viewsCount` | integer | Public Reel view count, when available. |

**Shortened example row**

This row is shortened. It keeps one real top post and uses the JSON string `"..."` for the other posts in the row.

```json
{
  "hashtag": "travel",
  "hashtagId": "17843819167049166",
  "postCount": 798157416,
  "topPosts": [
    {
      "id": "POLARIS_3809847048594935553",
      "mediaType": "Reel",
      "creator": {
        "username": "life_samour_style",
        "fullName": "Mour & Sami"
      },
      "caption": "Switzerland all the year 🇨🇭🥹\n\nWhich one is your preferred month?\n\n@life_samour_style \n\n#switzerland #life_samour_style #season #swiss #travel",
      "postedAt": "2026-01-14T11:15:50.000Z",
      "thumbnailUrl": "https://scontent-fra5-1.cdninstagram.com/v/t51.71878-15/615887274_3237902143054688_1140202660103312350_n.jpg?stp=dst-jpegr_e15_tt6&_nc_cat=102&ig_cache_key=MzgwOTg0NzA0ODU5NDkzNTU1Mw%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNMSVBTLnhwaWRzLjY0MC5oZHIudmlkZW9fZGVmYXVsdF9jb3Zlcl9mcmFtZS5DMyJ9&_nc_ohc=JOXjfAD-cg8Q7kNvwGm0gH9&_nc_oc=Ado73sk5_Nh3dLVGDZih49zYPMIE3TMea-66N4uYa1oTXLevLTCLZAhApyaEBL6zUv8&_nc_zt=23&se=-1&_nc_ht=scontent-fra5-1.cdninstagram.com&_nc_gid=VLfa-hoKvN12GbeUwHkdHQ&_nc_ss=70689&oh=00_AQPEMh653WqfoRC3tRvw0W3iAGKmV0-sNZ53MBrxEzFaxA&oe=6ACDC2F9",
      "likesCount": 3292489,
      "commentsCount": 6246,
      "viewsCount": 30206691
    },
    "..."
  ]
}
```

#### 💳 Pricing

Pricing uses pay-per-event charging. One event covers each saved current approximate post count. The rate depends on your Apify plan and tier.

#### 🔌 Integrations

The default dataset holds the output rows. Open it in Apify or request its items through the Apify API.

For an Apify walkthrough:

https://www.youtube.com/watch?v=bNACk1_S_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### What happens if Instagram does not show a public post count?

That hashtag does not produce a successful row because a readable count is required.

##### Does the Actor return only a count?

By default, it returns the count and the hashtag ID when Instagram exposes it. Turn on **Include top posts** to add up to 10 posts shown on the hashtag page, with public details when available.

##### Can I submit more than one hashtag?

Yes. Enter 1 to 50 public Instagram hashtag names in the `hashtags` field.

##### Is the post count exact?

No. It is the current approximate public post count shown by Instagram, and it can change over time.

##### Does the Actor track changes between runs?

No. Each run reports current source data. The Actor does not track or compare hashtag counts across runs.

##### Can it read private or restricted hashtag pages?

No. The Actor covers publicly viewable hashtag pages. Private or account-restricted content is outside its scope.

### 📝 Changelog

**v0.0** (08-10-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~instagram-hashtag-stats-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Instagram Hashtag Username Scraper](https://apify.com/maximedupre/instagram-hashtag-username-scraper): Find public hashtag posts with author names, captions, and available engagement details.
- [Instagram Reels Search Scraper](https://apify.com/maximedupre/instagram-reels-search-scraper): Search the public ranked Reels surface by keyword or hashtag and review engagement details.
- [Instagram Profile Stats Scraper](https://apify.com/maximedupre/instagram-profile-stats-scraper): Check public profile and follower details for creator accounts from top posts.
- [Instagram Engagement Scraper](https://apify.com/maximedupre/instagram-engagement-scraper): Compare recent feed and Reels engagement for selected public profiles.
- [Instagram Hashtag Analytics Scraper](https://apify.com/apify/instagram-hashtag-analytics-scraper): Explore related hashtags and their use frequency alongside post samples.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

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

Enter one or more public Instagram hashtag names, up to 50.

## `includeTopPosts` (type: `boolean`):

Include up to 10 current top posts shown on each hashtag's public page, with available public details.

## Actor input object example

```json
{
  "hashtags": [
    "travel",
    "food"
  ],
  "includeTopPosts": false
}
```

# Actor output Schema

## `hashtagResults` (type: `string`):

Open the current hashtag result rows.

# 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": [
        "travel",
        "food"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/instagram-hashtag-stats-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": [
        "travel",
        "food",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/instagram-hashtag-stats-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": [
    "travel",
    "food"
  ]
}' |
apify call maximedupre/instagram-hashtag-stats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maximedupre/instagram-hashtag-stats-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/8ttjmhsLI519oCRf6/builds/iHaVDfbmx7mPzFlMe/openapi.json
