# Instagram Hashtag Scraper: $0.30 per 1,000 Posts (`rowfinch/instagram-hashtag-scraper`) Actor

Get the recent or top posts and reels of any Instagram hashtag: caption, likes, comments, views, author, music and location. Same input and output fields as Apify's Instagram Hashtag Scraper. $0.30 per 1,000 posts.

- **URL**: https://apify.com/rowfinch/instagram-hashtag-scraper.md
- **Developed by:** [Rowfinch](https://apify.com/rowfinch) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scraper

Get the posts and reels of any Instagram hashtag, the most recent or the top ones: caption, likes, comments, plays, author, hashtags, music, location and media links.

**$0.30 per 1,000 posts.**

### What it's for

- **Trend and content research**: what performs in a niche right now, with *Order* set to *Top*.
- **Brand and campaign monitoring**: every new post with your hashtag, on a schedule.
- **Creator discovery**: who posts in a niche, with engagement for each post.
- **Data for AI agents and dashboards**: clean JSON, CSV or Excel, or straight from the API.

### Input

| Field | What it does |
|---|---|
| `hashtags` | Hashtags, with or without `#`, one per line |
| `resultsType` | `posts` (posts and reels) or `reels` |
| `order` | `recent` (default) or `top`: what Instagram ranks first under the hashtag |
| `resultsLimit` | Posts per hashtag (default 20) |

Coming from Apify's Instagram Hashtag Scraper? These are its input field names, and the output keeps its fields too (`shortCode`, `likesCount`, `videoPlayCount`, `ownerUsername`…). `order` is extra: Apify's returns only recent posts.

### Output

One row per post:

```json
{
  "inputUrl": "https://www.instagram.com/explore/tags/skincare",
  "id": "4009214320268995039",
  "type": "Image",
  "shortCode": "Dejly68Cunf",
  "url": "https://www.instagram.com/p/Dejly68Cunf/",
  "caption": "✨WIN WIN WIN – IT’S GLOW TIME!✨ ... #Giveaway #GlowRoutine #Skincare #SkincareRoutine",
  "hashtags": ["baslerbeauty", "nøcosmetics", "Gewinnspiel", "Giveaway", "GlowRoutine", "Skincare", "BeautyGewinnspiel", "SkincareRoutine"],
  "mentions": ["baslerbeauty_official"],
  "timestamp": "2026-10-16T13:00:18.000Z",
  "likesCount": 1540,
  "commentsCount": 1900,
  "displayUrl": "https://scontent-yyz1-1.cdninstagram.com/v/...",
  "productType": "feed",
  "paidPartnership": false,
  "taggedUsers": [{ "id": "7190457000", "username": "nocosmetics.de", "full_name": "skincare for everyøne ✨", "is_verified": false }],
  "musicInfo": null,
  "locationName": null,
  "ownerUsername": "baslerbeauty_official",
  "ownerFullName": "baslerbeauty"
}
```

Reels add `videoPlayCount`, `videoDuration`, `videoUrl` and the audio in `musicInfo`. Carousels (`"type": "Sidecar"`) list each slide in `childPosts`. `likesCount` is `null` when the author hides likes.

Hashtags with no posts get a row with the reason, free of charge:

```json
{ "input": "#somemadeuptag", "error": "No posts with this hashtag" }
```

### Price

- **$0.30 per 1,000 posts**
- **$0.002 per hashtag** that returns posts
- Hashtags with no posts: free

| Run | Cost |
|---|---|
| 10 hashtags, 100 posts each | $0.32 |
| 1 hashtag, 5,000 posts | $1.50 |

A run stops at the maximum cost you set for it. On Apify's free plan, a run returns up to 100 posts.

### FAQ

**Does it show what's trending?**
*Top* is Instagram's own ranking of the hashtag: mostly reels from the last few days with the most traction. Sort them by plays, likes or date to see what's taking off.

**How far back do recent posts go?**
Big hashtags get new posts every few seconds, so 1,000 recent posts may cover only the last hour. Smaller ones go back weeks.

**Why are reels in the posts?**
Instagram mixes them into hashtag pages. Pick *Reels only* to get nothing else.

**Is it legal?**
It reads only public posts. Captions and usernames can be personal data under GDPR and similar laws: use them for a legitimate purpose and honor deletion requests.

# Actor input Schema

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

One per line, with or without #.

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

Reels only come in Instagram's ranking of the last few days.

## `order` (type: `string`):

Top: what Instagram ranks first under the hashtag right now.

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

In big hashtags, 1,000 recent posts may cover only the last hour.

## Actor input object example

```json
{
  "hashtags": [
    "skincare"
  ],
  "resultsType": "posts",
  "order": "recent",
  "resultsLimit": 20
}
```

# Actor output Schema

## `posts` (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": [
        "skincare"
    ],
    "resultsLimit": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("rowfinch/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": ["skincare"],
    "resultsLimit": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowfinch/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/fhizq1MYQ8JFo0aNz/builds/zfmFdlukcqWjEMSOH/openapi.json
