# Instagram Hashtag & Keyword Search: Top Posts, No Login (`pomlabs/instagram-hashtag-search`) Actor

Top public Instagram posts for any hashtag or keyword, no login and no cookies: post link, type, caption, hashtags, mentions, date, video views, likes, comments, owner, image and video links, plus related keywords and a short description of the term.

- **URL**: https://apify.com/pomlabs/instagram-hashtag-search.md
- **Developed by:** [Pom Labs](https://apify.com/pomlabs) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 posts delivered

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

Learn more: https://docs.apify.com/actors/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 & Keyword Search: Top Posts, No Login

Get the **top public Instagram posts for any hashtag or keyword**, with no login, no cookies and no Instagram account. Type `coffee`, `#latteart` or `iced coffee` and get the posts Instagram shows for that term, each with its link, type, caption, hashtags, mentions, date, video views, likes, comments, duration, music, tagged users, coauthors, location, owner and media links. Each term also comes with its **related keywords** and a short **description of the term** written by Instagram.

### What you get

For each post (one dataset item, one `post` event):

| Field | What it is |
|---|---|
| `keyword`, `rank` | The term and the position of the post on its page |
| `url`, `shortCode`, `id` | Post link, short code and numeric id |
| `type` | `Video` (Reel), `Image` or `Sidecar` (carousel) |
| `caption`, `hashtags`, `mentions` | Full caption and the hashtags and @mentions in it |
| `timestamp` | When the post was published (UTC) |
| `videoPlayCount` | Reel views |
| `likesCount`, `commentsCount` | Likes and comments (`null` when the owner hides them) |
| `productType` | `clips` (Reel), `feed` or `carousel_container` |
| `videoDuration` | Reel length in seconds |
| `musicInfo` | Song or original audio of the Reel: `title`, `artist`, `audioId`, `original` |
| `taggedUsers`, `coauthorProducers` | Accounts tagged in the post and collab coauthors |
| `locationName`, `locationId` | Place tagged in the post |
| `relatedTopics` | Topics Instagram links to the post |
| `dimensionsWidth`, `dimensionsHeight`, `carouselCount`, `captionIsEdited`, `accessibilityCaption` | Media size, number of carousel items, edited caption flag and Instagram's alt text |
| `ownerUsername`, `ownerFullName`, `ownerId`, `ownerVerified`, `ownerProfilePicUrl` | Who posted it |
| `displayUrl`, `videoUrl` | Cover image and video file links |
| `sectionKeyword` | On broad category pages, the sub-topic the post came from |

For each hashtag or keyword (one free item, `type: "keyword"`):

| Field | What it is |
|---|---|
| `status` | `ok`, `no_public_results` (Instagram has no public page for this term) or `invalid_keyword` |
| `pageType` | `keyword` (a term page, up to 12 posts) or `category` (a broad topic such as `football`, up to 60 posts from its sub-topics) |
| `relatedKeywords` | Terms Instagram links to this one: ideas for more searches |
| `description` | Instagram's short description of the term |
| `hasMore` | Whether Instagram has more posts for the term than the public page shows |

### Example output

```json
{
  "keyword": "coffee",
  "rank": 1,
  "url": "https://www.instagram.com/reel/DQr0leHAWYa/",
  "type": "Video",
  "caption": "daily affirmations 🤲 ... #icedcoffee #coffee #coffeeislife",
  "hashtags": ["icedcoffee", "coffee", "coffeeislife", "homecafé", "pecanpie", "pecan"],
  "mentions": [],
  "timestamp": "2025-11-05T18:23:51Z",
  "videoPlayCount": 1232633,
  "likesCount": 45168,
  "commentsCount": 203,
  "productType": "clips",
  "videoDuration": 9.57,
  "relatedTopics": ["iced latte"],
  "ownerUsername": "sipsbylilly",
  "ownerFullName": "lilly drucis",
  "ownerVerified": true,
  "displayUrl": "https://scontent...cdninstagram.com/...",
  "videoUrl": "https://scontent...cdninstagram.com/..."
}
```

### Input

| Field | Default | What it does |
|---|---|---|
| `hashtags` | `["coffee"]` | Hashtags (with or without `#`), keywords with spaces, or Instagram hashtag, popular or keyword search URLs. `keywords` and `search` are accepted too. |
| `resultsLimit` | `12` | Max posts per term (1 to 60). Term pages give up to 12; category pages up to 60. |
| `resultsType` | `posts` | `posts` for all top posts, `reels` for Reels only. |
| `includeCounts` | `true` | Fill likes, comments, duration, music, tagged users, coauthors and location for each post. Turn off for a faster run with views only. Same price either way. |

### Pricing

Pay per result: **$0.0012 per post**. The keyword item (related keywords and description) is free, and terms with no public page cost nothing. You can cap the cost of a run with the maximum charge setting; the Actor stops when it is reached.

### Good to know

- **No login, no cookies, no account at risk.** The Actor reads the same public pages Instagram shows to people who are not logged in.
- **Top posts, not every post.** This is the set Instagram ranks as top for the term: the posts most people see. It does not list every recent post with a hashtag.
- **Some very broad single words have no public page** (for example `fitness` or `love`). Those come back with `status: "no_public_results"` and are not charged; a more specific term (`home workout`, `fitness over 40`) usually works.
- **Dates** come from the post id and are accurate to the second.
- **Likes, comments and post details** are read from each post's public page, Reels included. If the owner hides the like count, `likesCount` is `null`.

### Use it as an API or from an AI agent

Run it from the Apify API, any of the Apify client libraries, or call it as an HTTP endpoint in Standby mode: `GET /hashtags?hashtags=coffee`. It is also an MCP server at `/mcp` with the tool `search_instagram_hashtags`, ready for Claude, Cursor and other MCP clients.

### FAQ

**Is it legal to scrape Instagram hashtags?** The Actor only reads public posts that anyone can see without logging in. If your use involves personal data, check the rules that apply to you.

**Why fewer than `resultsLimit` posts?** Term pages show up to 12 top posts. Ask for a broad topic (it may open a category page with up to 60) or add related keywords from the free keyword item.

**Can I get the newest posts for a hashtag?** Not yet: Instagram only shows the newest posts to logged-in users. Tell us if you need it.

### Support, feedback and requests

Questions, bug reports, complaints, feature requests, or an idea for a new tool? Email us at **pomexplica+support@gmail.com**, in any language. We read our inbox every day and answer every message. Suggestions and feedback of every kind are welcome: tell us what you need and we will look into it.

# Actor input Schema

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

Hashtags (with or without #), keywords with spaces ("iced coffee"), or Instagram hashtag, popular or keyword search URLs. Duplicates are removed.

## `resultsType` (type: `string`):

All top posts (photos, carousels and Reels), or Reels only.

## `resultsLimit` (type: `integer`):

Up to how many top posts to return for each hashtag or keyword (1 to 60). Keyword pages give up to 12 posts; broad category pages (such as football) give up to 60.

## `includeCounts` (type: `boolean`):

Fill likes, comments, video duration, music, tagged users, coauthors, location and owner full name for each post, from its public page. Turn off for a faster run with views only. Same price either way.

## Actor input object example

```json
{
  "hashtags": [
    "coffee",
    "football"
  ],
  "resultsType": "posts",
  "resultsLimit": 12,
  "includeCounts": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset (overview view).

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

// Run the Actor and wait for it to finish
const run = await client.actor("pomlabs/instagram-hashtag-search").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": [
        "coffee",
        "football",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pomlabs/instagram-hashtag-search").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": [
    "coffee",
    "football"
  ]
}' |
apify call pomlabs/instagram-hashtag-search --silent --output-dataset

```

## MCP server setup

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

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/gr67RVnFHehu0V6kd/builds/1RydYSUs3OdVezO4v/openapi.json
