# Instagram Hashtag Search Scraper: Post Counts (`automation_craft/instagram-hashtag-search-scraper`) Actor

Instagram hashtag search by keyword or name, no login: up to 5,000 hashtags a keyword with deep search, or a real-time API. Rows carry the post count Instagram's hashtag search reports, tag id, rank, popularity and difficulty; add-ons: related hashtags, top posts. JSON, CSV or API; pay per hashtag.

- **URL**: https://apify.com/automation_craft/instagram-hashtag-search-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Social media, Marketing, SEO tools
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.95 / 1,000 hashtags

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

### Instagram Hashtag Search Scraper: Post Counts

**Instagram hashtag search** by keyword or by name, without an Instagram account, cookies or login. Give your words ("coffee
roaster", "sourdough", "nail art") and get the hashtags Instagram's own hashtag search lists for them, each with its post count,
Instagram's tag id, its rank, a popularity band and a difficulty grade. Or name the hashtags you already know and get one row
each. Start a run (the input interface) for lists of any size, or call the real-time API from your own app and get the answer
in seconds.

- **More than 55 hashtags a keyword.** Instagram's hashtag search lists at most 55 hashtags for one search, the most used first,
  and only hashtags that start with the text searched. Deep search (on by default) also searches your keyword followed by each
  letter, digit and underscore, and deeper where those answers are full too, up to the cap you set (100 a keyword by default,
  at most 5,000). In a test of 2026-11-11, "coffee" listed 1,954 distinct hashtags in 39 searches.
- **Stats of the hashtags you name.** Up to 1,000 hashtags a run, with or without the #, or as instagram.com/explore/tags/
  links: one row each. A hashtag Instagram does not list gets a free row with the names it lists for that text instead (a
  misspelling, a styled name).
- **The count, said plainly.** `postsCount` is the post count Instagram's hashtag search reports for the hashtag, as a whole
  number, next to Instagram's own rounded text ("2.1M posts"). The search reports at most 2,147,483,647: a row at that value
  says `postsCountIsFloor: true`, and the real count is at least that.
- **Filters that cost nothing.** A minimum and a maximum post count, and only hashtags whose name holds every word of your
  keyword. Hashtags a filter leaves out are never charged.
- **Two add-ons, off by default.** Related hashtags: the hashtags used most often with each one in its top public reels, each
  with its post count, grouped as frequent, average and rare. Top posts: up to 24 top public reels with plays, caption, post time
  and creator, a statistics block and the related searches Instagram shows. Each add-on is billed per row it filled. In a run
  they are read only for hashtags with at least 10,000 posts unless you change that; on the real-time API they are read for
  every hashtag you name and ask them for.
- **Fair billing.** Each hashtag is charged once per run, even when several keywords list it. Keywords that list nothing, names
  Instagram does not list, failed calls, repeats and refused entries are free rows.

### Quick start

1. Open the Actor's **Input** tab and type your **Keywords**, one per line (`coffee roaster`, `sourdough`), the hashtags
   you already know in **Hashtags to look up** (`travel`, `#veganrecipes`), or both.
2. Keep **Deep search** on to get more than 55 hashtags a keyword, and set **Max hashtags per keyword** (100 by default).
3. Optional: set the filters (**Min posts of a hashtag**, **Max posts of a hashtag**, **Only hashtags that hold every keyword
   word**) and turn on the add-ons you want.
4. Click **Start**. Named hashtags are read first, then the keywords in the order given. Each keyword ends with a free keyword
   row, and the run ends with a free summary row.
5. Download the dataset as JSON, CSV or Excel (the Output tab has four views: Hashtags, Related hashtags, Top posts, Keywords
   and lookups), or read it through the Apify API, a schedule, Make, n8n or Zapier.
6. Need one answer within seconds from your own code or an AI agent? Use the [real-time API](#real-time-api-server-interface).

### What you get

One `hashtag` row per hashtag delivered (the only charged row), plus free `keyword`, `status` and `summary` rows that say what
was searched, found and left out.

| Field | What it holds | Filled |
|---|---|---|
| `name`, `hashtag`, `id` | the hashtag as Instagram stores it (styled letters, accents and emoji kept), with its #, and Instagram's numeric tag id (17 digits, as text) | every row |
| `postsCount`, `postsCountText`, `postsCountIsFloor` | the post count Instagram's hashtag search reports, at read time; Instagram's own rounded text ("2.1M posts", "1000+ posts", "Fewer than 100 posts"); `true` when the count is 2,147,483,647, the largest the search reports (the real count is at least that) | every row |
| `popularity` | `very_high` (10 million posts or more), `high` (1 million), `medium` (100,000), `low` (10,000), `very_low`: our own bands from the count | every row |
| `difficulty` | how hard it is to be seen under the hashtag, from the same count: `hard` (1,000,000 posts or more), `medium` (10,000 to 999,999), `easy` (under 10,000): our own grade | every row |
| `url`, `popularReelsUrl` | the hashtag's Instagram page, and its public popular reels page | every row |
| `foundBy`, `searchedAs`, `rank` | `keyword` or `name`; the text sent to Instagram's hashtag search (a deep search prefix such as `coffeeroastera` for deeper rows); the hashtag's place in that answer (1 is the first) | every row |
| `keyword`, `keywordPosition`, `depth` | your keyword as given, its place in your list, and the deep search level (0 for the keyword's own search, 1 to 3 for the characters added) | rows found by a keyword |
| `keywordMatch`, `matchedTerms`, `isExactKeyword` | whether the name holds `all`, `some` or `none` of the keyword's words, which ones, and whether the hashtag IS the keyword's words run together | rows found by a keyword |
| `lookup`, `lookupPosition` | the hashtag as you named it, and its place in your list | named hashtags |
| `relatedHashtags`, `relatedFrequent`, `relatedAverage`, `relatedRare`, `relatedReelsRead`, `relatedHashtagsStatus` | Related hashtags add-on: up to 10 hashtags used most often with this one in its top public reels, each with `name`, `hashtag`, `reels` (how many of those reels use it), `postsCount` (null when it could not be read: Instagram's search does not list it, its lookup failed or was not paid by the run's add-on allowance, or the run stopped first) and `popularity`; the same list grouped as frequent (1,000,000 posts or more), average (10,000 to 999,999) and rare (under 10,000); how many reels were read (up to 24); what happened | when asked |
| `topPosts`, `topPostsStats`, `relatedSearches`, `topPostsStatus` | Top posts add-on: the top public reels (`rank`, `code`, `id`, `url`, `caption`, `hashtags`, `carriesHashtag`, `playCount`, `postedAt`, `coverUrl`, `owner` with `username`, `id`, `isVerified`, `profilePicUrl`, `url`); statistics over every reel read (`postsRead`, `withHashtag`, `shareWithHashtag`, `medianPlays`, `averagePlays`, `maxPlays`, `averageHashtagsPerCaption`, `verifiedCreators`, `distinctCreators`, `topCreators`, `newestPostAt`, `oldestPostAt`); up to 10 related searches; what happened | when asked |
| `raw` | Instagram's own search entry for the hashtag, as served (**Raw data** on, free) | when asked |
| `scrapedAt` | when the row was read (ISO 8601, UTC) | every row |

**Fill rates, as measured on 2026-11-11.** Instagram's hashtag search answer carried the name, tag id, post count and rounded
text on every entry of every answer checked. In the build's test run (121 hashtags: 120 from one keyword with deep search and
one named hashtag), 121 of 121 rows carried `name`, `id`, `postsCount`, `postsCountText`, `popularity`, both links, `rank` and
`searchedAs`, and 120 of 120 keyword rows carried `keywordMatch` and `depth`; `difficulty` is computed from the same count on
every row. Named hashtags: in the build's test of 40 names, Instagram listed the exact name for 37 (34 of them at rank 1, names
with accents, digits, underscores and non Latin scripts included); the three it did not list were two made up names and one
emoji only name, and each such name gets a free row.

**Add-ons fill mostly for larger hashtags.** Both add-ons read the hashtag's public popular reels page, which Instagram shows
mostly for larger hashtags. In the test run with the add-ons read for every hashtag, 4 of 4 hashtags with 100,000 posts or more
had top reels, and 1 of 116 under 10,000 had. That is why **Add-ons only for hashtags with at least this many posts**
(`addOnsMinPosts`) is 10,000 by default: a smaller hashtag gets the status `below_min_posts`, is not read and is not charged for
the add-on. A status of `no_reels` (no public reels) or `no_related_hashtags` is not charged either. The real-time API has no
such threshold: `related=true` or `topPosts=true` on `GET /hashtag` and `POST /hashtags` reads the add-ons for every hashtag you
name, whatever its size, and still charges only a row the add-on filled.

Example row (from a run on `coffee roaster`, both add-ons on, lists shortened):

```json
{
  "type": "hashtag",
  "name": "coffeeroaster",
  "hashtag": "#coffeeroaster",
  "id": "17842356424066679",
  "url": "https://www.instagram.com/explore/tags/coffeeroaster/",
  "popularReelsUrl": "https://www.instagram.com/popular/coffeeroaster/",
  "postsCount": 2162537,
  "postsCountText": "2.1M posts",
  "postsCountIsFloor": false,
  "popularity": "high",
  "difficulty": "hard",
  "foundBy": "keyword",
  "keyword": "coffee roaster",
  "keywordPosition": 1,
  "searchedAs": "coffee roaster",
  "depth": 0,
  "rank": 1,
  "keywordMatch": "all",
  "matchedTerms": ["coffee", "roaster"],
  "isExactKeyword": true,
  "relatedHashtags": [
    { "name": "coffeeroasting", "hashtag": "#coffeeroasting", "reels": 10, "postsCount": 617454, "popularity": "medium" },
    { "name": "specialtycoffee", "hashtag": "#specialtycoffee", "reels": 8, "postsCount": 9341697, "popularity": "high" }
  ],
  "relatedFrequent": [
    { "name": "specialtycoffee", "hashtag": "#specialtycoffee", "reels": 8, "postsCount": 9341697, "popularity": "high" }
  ],
  "relatedAverage": [
    { "name": "coffeeroasting", "hashtag": "#coffeeroasting", "reels": 10, "postsCount": 617454, "popularity": "medium" }
  ],
  "relatedRare": [],
  "relatedReelsRead": 24,
  "relatedHashtagsStatus": "read",
  "topPosts": [
    {
      "rank": 2,
      "code": "C-wZvA9PJJe",
      "id": "3436359697689252446",
      "url": "https://www.instagram.com/reel/C-wZvA9PJJe/",
      "caption": "This is how we recharge over the\nweekend. What's yours? ... #coffeeroasting #coffeelover #coffeeroaster",
      "hashtags": ["bulletr1v2", "coffeeroasting", "coffeeroastingmachine", "coffeelover", "coffeeroaster", "specialtycoffee"],
      "carriesHashtag": true,
      "playCount": 18910294,
      "postedAt": "2024-08-17T03:40:19.000Z",
      "coverUrl": "https://scontent-ord5-2.cdninstagram.com/v/t51.71878-15/504118517_..._n.jpg",
      "owner": { "username": "ailliothailand", "id": "28952941889", "isVerified": false, "profilePicUrl": "https://scontent-ord5-2.cdninstagram.com/v/t51.82787-19/580993440_..._n.jpg", "url": "https://www.instagram.com/ailliothailand/" }
    }
  ],
  "topPostsStats": {
    "postsRead": 24,
    "withHashtag": 12,
    "shareWithHashtag": 0.5,
    "medianPlays": 43874,
    "averagePlays": 1263053,
    "maxPlays": 18910294,
    "averageHashtagsPerCaption": 5.6,
    "verifiedCreators": 4,
    "distinctCreators": 23,
    "topCreators": [{ "username": "ailliothailand", "posts": 2, "url": "https://www.instagram.com/ailliothailand/" }],
    "newestPostAt": "2026-10-21T16:40:43.000Z",
    "oldestPostAt": "2023-08-16T22:17:38.000Z"
  },
  "relatedSearches": ["coffeeroasters", "coffeeroasting"],
  "topPostsStatus": "read",
  "scrapedAt": "2026-11-11T16:29:40.640Z"
}
```

#### The free rows

- **`keyword`**, one per keyword: `status` (`ok`, `no_hashtags`, `no_matching_hashtags`, `failed`, `stopped`), `finished`,
  `stopReason` (`complete`, `max_hashtags_per_keyword`, `max_hashtags` and the run's stop reasons), a `message` in words,
  `hashtagsDelivered`, `hashtagsListed` (how many distinct hashtags Instagram listed, before your filters), `hashtagsLeftOut`
  (counts by reason: already delivered, below the minimum, above the maximum, keyword match) and, with deep search,
  `deepSearch` (`searches`, `failedSearches`, `answersFull`, `prefixesLeft`, `maxDepthReached`, `distinctListed`, `complete`). A
  deep search whose searches failed is not finished (`stopReason` `deep_search_failed_branches`): run the keyword again later. A
  deep search stops listing once it has listed 20,000 distinct hashtags for a keyword before your filters (the answer that
  crosses the bound is still read, so up to 55 more); a keyword that reaches that bound before your cap is not finished either
  (`stopReason` `max_listed_per_keyword`).
- **`status`** rows: `hashtag_not_found` for a name Instagram does not list (with up to 5 names it lists for that text, without
  their counts, in `listedForThisText`), `already_delivered` for a name this run already delivered, `failed` for a name whose search failed after
  retries, `keyword_refused` and `hashtag_refused` for unusable entries (their positions and the reason, never their text),
  `invalid` for an input that cannot run, `proxy_mapped`, and `skipped` for keywords or names not reached because the run stopped.
- **`summary`**: the run's counts, charges and stop reason.

**When Apify restarts a run.** Apify can move a running run to another server (a migration); the run then goes on where it was
and delivers the rest of its hashtags free. After a migration it keeps the work allowance its charged hashtags earned and did not
spend, so it goes on searching with what is left of it (it can still stop earlier than a run that was never moved, since its
hashtags after the move are free; after a restart of any other kind it starts again from its base allowance, as before). When a
restarted run still stops before every entry was searched (the allowance, a limit, a failing source), a free `skipped` row holds
`readyInput`: this run's input with only the keywords and named hashtags that delivered nothing in the whole run (a named hashtag
this run delivered under any entry is left out; a named hashtag whose search failed is in it), ready to paste as the input of a new
run, with `maxHashtags` reduced by what the run delivered (left empty, it is the 100,000 run bound less what the run
delivered). A proxy given as your own proxy URLs is left out of it (add it back),
and a tag page link is given without its query. There is none when the run met its own `maxHashtags` or when the input would not
be accepted. A new run made from it is a run of its own and charges the hashtags it delivers. The real-time API is not affected.

### How much does it cost to scrape Instagram hashtags?

You pay per result (pay per event). Every price of this Actor is in this table:

| Event (key) | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Hashtag (`hashtag`): one hashtag delivered as a row | $1.33 / 1,000 | $1.22 / 1,000 | $1.10 / 1,000 | $0.95 / 1,000 |
| Related hashtag list (`hashtag-related`): add-on, a row where at least one related hashtag was found | $1.40 / 1,000 | $1.28 / 1,000 | $1.16 / 1,000 | $1.00 / 1,000 |
| Top post list (`hashtag-top-posts`): add-on, a row where at least one top reel was found | $0.70 / 1,000 | $0.64 / 1,000 | $0.58 / 1,000 | $0.50 / 1,000 |
| Real-time API request (`api-request`): one request to the real-time API that delivered at least one hashtag | $0.0005 | $0.0005 | $0.0005 | $0.0005 |
| Actor start (`apify-actor-start`): once per run of the input interface, no plan discount | $0.006 | $0.006 | $0.006 | $0.006 |
| Example: one keyword, 100 hashtags, one run (start included) | $0.139 | $0.128 | $0.116 | $0.101 |
| Example: 10 named hashtags with both add-ons found, one real-time API request | $0.0348 | $0.0319 | $0.0289 | $0.0250 |

Platinum and Diamond plans pay the Gold price. The Store pricing card shows the same prices per 1,000 events, so the figure on
its Hashtag row divided by 1,000 is the price of one hashtag. The real-time API charges no Actor start event; the input
interface charges no Real-time API request event.

Free: keyword, status and summary rows; hashtags already delivered in the run; hashtags a filter leaves out; keywords Instagram
lists nothing for; names Instagram does not list; failed calls; repeats and refused entries; an add-on that found nothing or
was not read (below the minimum posts, the add-on allowance spent). An invalid input charges only the run's start fee. A charge
limit you set on the run is respected: the run stops at it, and rows it cannot pay are not delivered.

### Input

| Setting | What it does | Default |
|---|---|---|
| `keywords` | words to find hashtags for, up to 500: a niche, a trade, a brand, a topic or a place; a tag page link is read as its hashtag | none |
| `hashtags` | hashtags you already know, up to 1,000, with or without the #, or as instagram.com/explore/tags/ links: one row each | none |
| `deepSearch` | past a full answer of 55, also search the keyword followed by each letter, digit and underscore (up to 3 characters deep) | on |
| `maxHashtagsPerKeyword` | hashtags delivered for one keyword at most (1 to 5,000; filtered hashtags do not count) | 100 |
| `maxHashtags` | stop the run once it delivered this many hashtags in all (1 to 100,000) | empty: the run bound, 100,000 |
| `minHashtagPosts`, `maxHashtagPosts` | keep only hashtags with at least, or at most, this many posts (keyword results only) | none |
| `requireKeywordMatch` | keep only hashtags whose name holds every word of the keyword ("vegan bakery": #veganbakerylondon yes, #veganfood no) | off |
| `includeRelatedHashtags` | the Related hashtag list add-on | off |
| `includeTopPosts`, `maxTopPosts` | the Top post list add-on, and how many top posts a row keeps (1 to 24; the statistics count every reel read) | off, 12 |
| `addOnsMinPosts` | read the add-ons only for hashtags with at least this many posts (0 reads them for every hashtag) | 10,000 |
| `includeRawData` | put Instagram's own search entry on each row (free) | off |
| `maxConcurrency` | add-on reads that run at once (1 to 8); the hashtag searches of a keyword run one at a time | 4 |
| `maxRunSeconds`, `requestTimeoutSecs`, `maxRetries` | a time limit (30 s to 24 h), the request timeout (5 to 60 s) and retries per request (0 to 5) | none, 30, 2 |
| `proxyConfiguration` | Apify Proxy setting (see below) | Apify Proxy |

**Keywords.** A word or phrase in any language. A leading # is dropped, the words are read lower cased and joined ("coffee
roaster" finds #coffeeroaster, #coffeeroasters and more), and Instagram lists the hashtags that start with them, the most used
first. Hashtags hold no spaces or punctuation (letters, marks, digits, underscores and emoji), so a word with a hyphen lists
nothing. Boolean keywords (AND, OR, NOT, quotes, parentheses, -words) are not read by the hashtag search. An entry that is not
text, holds an @, looks like a password or a token, or repeats an earlier keyword is refused with one free row per reason that
names its position; the other entries run. To keep pasted credentials out of rows and searches, an entry that holds the word
"bearer" or "authorization", the word "basic" followed by anything but a plain lower case word, an assignment such as
`password=` or `token:`, a UUID, or a token of four or more parts joined by underscores, hyphens or dots that holds both
capital and small letters (`Abcd_efgh_ijkl_mnop`) is refused too: a keyword such as "bearer bonds", "basic Skincare" or
"Mother-in-Law-Day", or a hashtag such as `I_Love_NYC_2024` written with capitals, is refused by that rule (write it in lower
case). The filters apply to keyword results: a hashtag you name is always delivered.

**Example input**, a keyword with a post count window and related hashtags:

```json
{
  "keywords": ["coffee roaster", "sourdough"],
  "maxHashtagsPerKeyword": 300,
  "minHashtagPosts": 10000,
  "maxHashtagPosts": 1000000,
  "includeRelatedHashtags": true
}
```

**Example input**, the stats and top posts of hashtags you name:

```json
{
  "hashtags": ["travel", "#veganrecipes", "https://www.instagram.com/explore/tags/nailart/"],
  "includeTopPosts": true,
  "maxTopPosts": 6
}
```

**Proxy.** By default the Actor reads from the run's own address first and moves a request type to Apify's datacenter proxy
when it is refused there. Choose a proxy group or country to read only through Apify Proxy, or give your own proxy links. A
residential group is read through the datacenter pool instead, at no extra cost, and a free `proxy_mapped` row says so.

**Work that earns nothing.** Searches that list nothing, filters nothing passes and calls that are answered badly cost time but
deliver nothing. A run spends at most a small fixed amount of such work before its first charged hashtag, and more as it
delivers; when it is spent the run stops with the stop reason `work_allowance` and a free `skipped` row names the keywords and
hashtags not reached. The add-on reads draw on an allowance of their own that grows with the add-ons delivered: when it is
spent, the next rows come without the add-on (status `allowance`) and are not charged for it. Three hashtag searches in a row
that Instagram answers badly stop the run as `source_failing`, and the run's status message says so.

### API examples

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~instagram-hashtag-search-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["nail art"], "maxHashtagsPerKeyword": 200, "maxHashtagPosts": 500000}'
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation_craft/instagram-hashtag-search-scraper').call({ hashtags: ['travel', 'sourdough'], includeRelatedHashtags: true });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((row) => row.type === 'hashtag').map((row) => [row.hashtag, row.postsCount, row.difficulty]));
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation_craft/instagram-hashtag-search-scraper").call(run_input={"keywords": ["sourdough"], "requireKeywordMatch": True})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "hashtag":
        print(row["hashtag"], row["postsCount"], row["popularity"])
```

### Real-time API (server interface)

This Actor is also a Server Actor: next to the input interface above (runs) it answers plain HTTP requests in real time, with
no run to start and no dataset to read. Send a keyword or a hashtag, get the hashtag records back in the response. Use it inside
your own app, an automation step or an AI agent that needs an answer now.

Copy the server URL from the **Server** tab of the Actor page (it looks like
`https://automation-craft--instagram-hashtag-search-scraper.apify.actor`) and authenticate with your Apify token, the same way
as for the Apify API.

| Endpoint | What it does |
|---|---|
| `GET /search?keyword=<words>&limit=&deep=&minPosts=&maxPosts=&requireKeywordMatch=&raw=` | The hashtags Instagram lists for one keyword. Returns `{"search": <the keyword record>, "hashtags": [<one record per hashtag>]}`. `limit` is 1 to 200 (default 55); `deep=true` searches past 55 the way deep search does. An empty list is a `200` and charges nothing. No add-ons on this endpoint. |
| `GET /hashtag?name=<hashtag or tag link>&related=&topPosts=&maxTopPosts=&raw=` | One named hashtag. Returns its record, the same fields as a dataset row. `related=true` adds the related hashtags, `topPosts=true` the top posts and their statistics (`maxTopPosts` 1 to 24, default 12). |
| `POST /hashtags` with `{"names": ["travel", "#sourdough"], "related": false, "topPosts": false}` | Up to 10 named hashtags in one request. Returns a JSON list with one record per name, in the order given. A name Instagram does not list, an invalid value or a repeat gets a free status record in its place. |
| `GET /` | A short JSON description of the endpoints, the limits and the charges. Free. |

```bash
curl -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
  "https://automation-craft--instagram-hashtag-search-scraper.apify.actor/search?keyword=coffee%20roaster&limit=55"
```

```bash
curl -X POST -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" -H "Content-Type: application/json" \
  -d '{"names": ["travel", "#sourdough"], "related": true}' \
  "https://automation-craft--instagram-hashtag-search-scraper.apify.actor/hashtags"
```

The response of `GET /hashtag?name=travel` is the hashtag record itself (shortened):

```json
{
  "type": "hashtag",
  "name": "travel",
  "hashtag": "#travel",
  "id": "17843819167049166",
  "postsCount": 798744616,
  "postsCountText": "798M posts",
  "postsCountIsFloor": false,
  "popularity": "very_high",
  "difficulty": "hard",
  "foundBy": "name",
  "lookup": "travel",
  "rank": 1,
  "url": "https://www.instagram.com/explore/tags/travel/",
  "relatedHashtagsStatus": "not_requested",
  "topPostsStatus": "not_requested"
}
```

Anything else is a JSON error with an HTTP status: `{"error": {"type": "...", "message": "..."}}`. `400` means a value is
missing, is not a keyword or a hashtag, a switch is not true or false, a number is out of range, the list is empty or longer
than 10, or the request carries an option the endpoint does not have (options are refused, never ignored); `402` the platform
refused the request event of your last three requests (for example because a spending limit of your account is reached), so
your requests pause for ten minutes on that server run; `403` the request did not come through the server URL; `404` Instagram's
hashtag search lists no hashtag with that name (`GET /hashtag`; the body carries the names it lists for that text) or the
endpoint does not exist; `408` the request body did not arrive in time; `413` the body is larger than 64 KB; `429` too many
reads from your account on one server run (600 a minute), wait for the seconds in `Retry-After`; `502` Instagram did not
answer the hashtag search in a usable way after retries (try again); `503` the server run is busy, shutting down or cannot
charge right now, or the charge was not accepted; `504` the request took too long. An error response charges nothing, with two
exceptions that say so themselves: `503` with the type `charge-unconfirmed` means the platform did not confirm the charge, so no
data was returned although the charge may have been recorded once, and `500` with the type `internal-error-after-charge` means
the request failed on our side after its charge. Report either through the Issues tab with the `X-Actor-Request-ID` response
header.

The `X-Charged-Events` response header says what the request charged, for example
`hashtag=1; api-request=1; hashtag-related=0; hashtag-top-posts=0`. A value of `unconfirmed` means the platform did not confirm
that charge.

A lookup of one hashtag usually answers in 1 to 4 seconds (measured: median 1.8 s on a running server; a request that starts
a new server run took 2 to 19 seconds in our tests). The add-ons read more pages: a batch of 3 hashtags with both add-ons answered in 16 to 29
seconds in our tests. A deep search takes a few seconds more per 55 hashtags. A request that has not finished reading after 45 seconds is stopped with a `504` and charges nothing. The keyword
of `GET /search` is plain words (letters, digits, underscores and spaces, a leading # allowed, at most 100 characters; look up an emoji hashtag by name).

#### How much does a real-time request cost?

You pay per request and only for what the response delivers, at the prices of the table in
[How much does it cost](#how-much-does-it-cost-to-scrape-instagram-hashtags):

| Event (key) | When a request charges it |
|---|---|
| Real-time API request (`api-request`) | once per request that delivers at least one hashtag |
| Hashtag (`hashtag`) | once per hashtag in the response |
| Related hashtag list (`hashtag-related`) | once per hashtag whose related hashtags are delivered (`related=true`, at least one found) |
| Top post list (`hashtag-top-posts`) | once per hashtag whose top posts are delivered (`topPosts=true`, at least one found) |

There is no Actor start event on the real-time API. A request that delivers nothing (not found, invalid, failed) is free.
Platinum and Diamond plans pay the Gold price.

#### When to use the input interface instead

For lists, use the input interface (start a run): it takes up to 500 keywords and 1,000 named hashtags, deep searches up to
5,000 hashtags a keyword, the add-ons on keyword results, writes a dataset you can export and schedule, and has no Real-time
API request event (it charges the Actor start event once per run). The real-time API is for one answer within seconds.

### What this Actor does NOT do

- **No latest posts of a hashtag and no posts per day.** Instagram's recent posts feed of a hashtag needs a login; logged out it
  answers "login required" or a missing page. The top public reels are read instead (Top posts add-on).
- **No tag page count.** Logged out, Instagram's tag page now opens the hashtag's popular reels page, so the count on each row is
  the one Instagram's hashtag search reports. It can differ from a figure the tag page showed when it still opened.
- **No hashtag picture, description, follower count or follow button state.** Instagram serves them only to logged in viewers;
  its hashtag search entries carry none of them.
- **No likes, comments or views of the top posts.** The popular reels page shows plays, caption, cover and creator; the post time
  is read from the reel's id.
- **No profiles, places, reels by keyword or audio in this Actor.** It is the hashtag search of our Instagram search family:
  accounts and reels by keyword are in the listings below, and Instagram's place search needs a login.
- **No hashtag ideas made up from a caption or a picture.** Every hashtag comes from Instagram's own hashtag search for your
  words or names; no outside AI service is used.
- **No more than Instagram lists.** 55 hashtags per search; deep search widens a keyword up to 3 characters past it, so a cap
  above what Instagram holds under a keyword delivers what it holds.
- **No monitoring across runs.** There is no memory of earlier runs and no "new hashtags only" mode; schedule runs as you like
  and compare the datasets.
- **No logins, cookies or accounts of yours.**

You are responsible for using the data lawfully, including personal data (the usernames of top post creators) under the GDPR
and similar laws.

### FAQ

#### How do I see how many posts a hashtag has on Instagram?

Put the hashtag in **Hashtags to look up** (or call `GET /hashtag?name=<hashtag>`): its row carries `postsCount`, the post
count Instagram's hashtag search reports, as a whole number, with Instagram's rounded text next to it. At 2,147,483,647, the
largest count the search reports, `postsCountIsFloor` is `true` and the real count is at least that.

#### How do I find related hashtags on Instagram?

Turn on **Related hashtags**: each hashtag row gets up to 10 hashtags used most often with it in its top public reels, each with
its post count, grouped as frequent (1,000,000 posts or more), average (10,000 to 999,999) and rare (under 10,000).

#### How do I find niche hashtags with fewer posts?

Give your niche as keywords, keep **Deep search** on for more than 55 hashtags a keyword, and set **Max posts of a hashtag**
(for example 100,000). Every row also carries a `difficulty` grade (`easy` under 10,000 posts) and **Only hashtags that hold
every keyword word** keeps the names that match your words.

#### Can I search Instagram hashtags without logging in?

Yes. This Actor reads Instagram's public hashtag search and popular reels pages without an account, cookies or login, so your
own Instagram account is never involved.

#### Is there an Instagram hashtag API?

Meta's official hashtag search works only for Instagram Business or Creator accounts, 30 unique hashtags in 7 days. This Actor
has a real-time API with no Instagram account: `GET /search` for the hashtags of a keyword, `GET /hashtag` and `POST /hashtags`
(up to 10) for named hashtags, each answered in seconds and charged only for what it delivers.

#### Why does this Actor run with limited permissions?

It needs no more: it reads Instagram's public pages and writes only to its own run's dataset and key-value store, so it cannot
touch anything else in your Apify account. The real-time API keeps nothing between requests.

### More data tools by Automation Craft

- [Instagram reels, users and hashtags by keyword, all in one run](https://apify.com/automation_craft/instagram-search-scraper)
- [Instagram Reels Search Scraper: Reels by Keyword](https://apify.com/automation_craft/instagram-reels-search-scraper)
- [Instagram User Search Scraper: Profiles by Keyword](https://apify.com/automation_craft/instagram-user-search-scraper)
- [Instagram Posts Scraper: Profiles, Reels, No Login](https://apify.com/automation_craft/instagram-posts-scraper)
- [Instagram Profile Scraper: Followers, Bio, Posts](https://apify.com/automation_craft/instagram-profile-scraper)
- [TikTok Hashtag Scraper: Posts, Free Date Filter](https://apify.com/automation_craft/tiktok-hashtag-scraper)
- [Facebook Hashtag Scraper: Hashtag Posts, No Login](https://apify.com/automation_craft/facebook-hashtag-scraper)
- [Google Keyword Search Volume & Seasonality](https://apify.com/automation_craft/google-keyword-search-volume)

### Changelog

See the Changelog tab: 0.1 is the first release.

# Changelog

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

# Actor input Schema

## `keywords` (type: `array`):

Words to find hashtags for, one keyword per line (up to 500): a niche, a trade, a brand, a topic or a place ("coffee roaster", "sourdough", "nail art"). Instagram lists the hashtags that start with the keyword, the most used first, each with the post count Instagram's hashtag search reports. A leading # is dropped and the words are read joined ("coffee roaster" finds #coffeeroaster, #coffeeroasters, ...). A link to an instagram.com/explore/tags/ page is read as its hashtag.

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

Hashtags you already know, one per line (up to 1,000), with or without the # ("travel", "#veganrecipes") or as an instagram.com/explore/tags/ link: each one gives ONE row with the post count Instagram's hashtag search reports, Instagram's tag id and the add-ons you turn on. A hashtag Instagram does not list gets a free row with the names it lists for that text instead.

## `deepSearch` (type: `boolean`):

On: when Instagram's answer for a keyword is full (55 hashtags), the Actor also searches the keyword followed by each letter, digit and underscore ("coffeeroastera", "coffeeroasterb", ...) and deeper where those answers are full too, so a broad keyword gives hundreds or thousands of hashtags (about 2,000 for "coffee"), up to the cap per keyword below. A deep search stops listing once it has listed 20,000 distinct hashtags for a keyword (before filters; the answer that crosses the bound is still read); a keyword that reaches that bound before your cap is reported as not finished. Off: one search a keyword, up to 55 hashtags.

## `maxHashtagsPerKeyword` (type: `integer`):

Hashtags delivered for one keyword at most (deep search walks until it reaches this). Hashtags left out by a filter do not count.

## `maxHashtags` (type: `integer`):

Stops the run once it delivered this many hashtags across all keywords and named hashtags (named hashtags first, then keywords in the order given). Empty means the run's bound: 100,000 hashtags.

## `minHashtagPosts` (type: `integer`):

Keep only hashtags used on at least this many posts (the count Instagram's hashtag search reports). Empty means no lower bound.

## `maxHashtagPosts` (type: `integer`):

Keep only hashtags used on at most this many posts (smaller, less crowded hashtags). Empty means no upper bound.

## `requireKeywordMatch` (type: `boolean`):

Keep only hashtags whose name holds every word of the keyword ("vegan bakery": #veganbakerylondon yes, #veganfood no). Every row carries keywordMatch either way.

## `includeRelatedHashtags` (type: `boolean`):

On: each hashtag row also carries the hashtags used most often with it in its top public reels (relatedHashtags: up to 10, each with how many of those reels use it, the post count Instagram's hashtag search reports and popularity band), grouped as relatedFrequent (1,000,000 posts or more), relatedAverage (10,000 to 999,999) and relatedRare (under 10,000). Billed as a Related hashtag list per hashtag where at least one related hashtag was found. The reads draw on the run's work allowance for add-ons: when it is spent, the remaining hashtags come without the list (relatedHashtagsStatus allowance, not charged).

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

On: each hashtag row also carries its top public reels as Instagram shows them to a visitor who is not logged in (topPosts: link, caption, hashtags, plays, post time, cover and the creator's username, id and verified flag), a statistics block (topPostsStats: median and average plays, the share of those reels that carry the hashtag, the top creators, hashtags per caption, newest and oldest post) and the related searches Instagram shows (relatedSearches). Billed as a Top post list per hashtag where at least one reel was found. When the run's work allowance for add-ons is spent, the remaining hashtags come without it (topPostsStatus allowance, not charged).

## `maxTopPosts` (type: `integer`):

Top posts kept on a row (the statistics always count every reel read, up to 24).

## `addOnsMinPosts` (type: `integer`):

The add-ons read the hashtag's public popular reels page, which Instagram shows mostly for larger hashtags. They are read only for hashtags with at least this many posts; smaller hashtags get the status below_min_posts (not read, not charged). 0 reads them for every hashtag.

## `includeRawData` (type: `boolean`):

On: each hashtag row also carries Instagram's own search entry for it, as served (raw). Free.

## `maxConcurrency` (type: `integer`):

How many add-on reads (popular pages, related hashtag counts) run at once. The hashtag searches themselves run one at a time per keyword.

## `maxRunSeconds` (type: `integer`):

Stops the run after this many seconds, with a row for each keyword or hashtag not finished. Empty means the platform timeout.

## `requestTimeoutSecs` (type: `integer`):

How long one request may take before it is retried.

## `maxRetries` (type: `integer`):

How often a failed request is retried on a fresh connection.

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

Default: Apify Proxy without a group or country, which reads from the run's own address first and moves a request type to Apify's datacenter proxy when it is refused there. Choose a group or a country to read only through Apify Proxy, or give your own proxy links. A residential group is read through the datacenter pool instead (no extra cost).

## Actor input object example

```json
{
  "keywords": [
    "coffee roaster"
  ],
  "deepSearch": true,
  "maxHashtagsPerKeyword": 100,
  "requireKeywordMatch": false,
  "includeRelatedHashtags": false,
  "includeTopPosts": false,
  "maxTopPosts": 12,
  "addOnsMinPosts": 10000,
  "includeRawData": false,
  "maxConcurrency": 4,
  "requestTimeoutSecs": 30,
  "maxRetries": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (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 = {
    "keywords": [
        "coffee roaster"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/instagram-hashtag-search-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 = {
    "keywords": ["coffee roaster"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/instagram-hashtag-search-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 '{
  "keywords": [
    "coffee roaster"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automation_craft/instagram-hashtag-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_craft/instagram-hashtag-search-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/OM4EvIPaG81Cdl8xV/builds/DOqL8aoVzOTQc4tED/openapi.json
