# Instagram Hashtag Tracker - Posts, Likes, Comments, Analytics (`dexterous_material/opencalw-instagram-hashtag-tracker`) Actor

Extract Instagram posts by hashtag: captions, likes, comments, owner profiles, locations, video views, engagement. Hybrid Playwright+curl\_cffi engine. Perfect for influencer marketing, trend analysis, and competitor research.

- **URL**: https://apify.com/dexterous\_material/opencalw-instagram-hashtag-tracker.md
- **Developed by:** [Daniel Ramacher](https://apify.com/dexterous_material) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Instagram Hashtag Tracker — Posts, Engagement, Insights

[![Pricing: $3.00 / 1,000 posts](https://img.shields.io/badge/Pricing-%243.00%2F1k%20posts-blue)](https://apify.com/opencalw-instagram-hashtag-tracker)
[![Engine: HTTP-only](https://img.shields.io/badge/Engine-HTTP--only-success)](https://apify.com/opencalw-instagram-hashtag-tracker)
[![Python](https://img.shields.io/badge/Python-3.11%2B-blue)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Fast, lightweight Instagram hashtag tracking.** Built with an HTTP-only engine — no browser, no bloat, no overhead. Runs in seconds, not minutes.

Extract **posts by hashtag** with captions, likes, comments, owner information, location, and video detection. Perfect for social media marketing, influencer analysis, and trend research.

---

### ✨ Features

| Feature | Description |
|---------|-------------|
| **Multiple Hashtags** | Track any number of hashtags in a single run |
| **Full Captions** | Complete post descriptions (up to 2,000 chars) |
| **Engagement Data** | Likes, comments, and video view counts |
| **Owner Info** | Username of each post's creator |
| **Location Data** | Geotag information when available |
| **Video Detection** | Auto-detects videos vs. photos |
| **Auto Insights** | Automatic breakdown by hashtag, top posters |
| **HTTP-only Engine** | No browser overhead — lightweight and fast |

---

### 🚀 Quick Start

#### 1. Via Apify Console (Recommended)

1. Go to [Opencalw Instagram Hashtag Tracker](https://apify.com/opencalw-instagram-hashtag-tracker) on Apify Store
2. Click **Try for free** or **Start**
3. Enter your hashtags:

```json
{
  "hashtags": ["berlin", "foodie", "travel"],
  "maxPostsPerHashtag": 30,
  "sessionCookies": ""
}
````

4. Click **Run** and wait for results (typically 5-15 seconds)

#### 2. Via API

```bash
curl "https://api.apify.com/v2/acts/opencalw-instagram-hashtag-tracker/runs?token=YOUR_API_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "hashtags": ["berlin", "foodie"],
    "maxPostsPerHashtag": 30
  }'
```

***

### 📋 Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `hashtags` | `array[string]` | — | **Required.** List of hashtags without `#` (e.g., `["berlin", "foodie"]`) |
| `maxPostsPerHashtag` | `integer` | `30` | Max posts per hashtag (max: 100) |
| `sessionCookies` | `string` | `""` | Instagram session cookies for richer data (see FAQ) |
| `language` | `enum` | `"de"` | Interface language |

***

### 📤 Output Example

Each post returns the following fields:

```json
{
  "postUrl": "https://www.instagram.com/p/ABC123/",
  "caption": "Beautiful day in Berlin! #berlin #travel",
  "likes": 1234,
  "comments": 56,
  "owner": "travel_berlin",
  "location": "Berlin, Germany",
  "isVideo": false,
  "videoViews": null,
  "postedAt": "1701400000",
  "thumbnailUrl": "https://instagram.com/...",
  "hashtag": "#berlin",
  "searchHashtag": "berlin",
  "timestamp": 1701400000.0
}
```

#### Insights Output

The actor also generates an insights summary:

| Metric | Description |
|--------|-------------|
| `totalPosts` | Total posts collected |
| `hashtagBreakdown` | Posts, captions, videos per hashtag |
| `topOwners` | Top 10 most active posters |
| `avgEngagement` | Average likes + comments per post |

***

### 💰 Pricing

| Volume | Price | Cost per 1,000 |
|--------|-------|----------------|
| **1,000 posts** | **$3.00** | $3.00 |
| 10,000 posts | $30.00 | $3.00 |
| 100,000 posts | $300.00 | $3.00 |

**Free tier**: 10 free posts to test before you buy.

#### Why so affordable?

Our **HTTP-only engine** eliminates expensive browser overhead. No Chromium, no Playwright, no 2GB Docker images — just pure HTTP requests with Chrome TLS impersonation:

| Metric | Browser-based | Opencalw HTTP-only |
|--------|--------------|-------------------|
| Cold start | 30-60s (Chrome download) | **< 1s** |
| 30 posts | 30-90s | **3-10s** |
| RAM usage | 500MB-4GB | **~50MB** |
| Docker image | 1-2GB | **~200MB** |

***

### 🎯 Use Cases

#### 1. Social Media Marketing

Track campaign hashtags in real-time. Measure engagement, identify top creators, and analyze content performance.

#### 2. Influencer Analysis

Find top posters for any hashtag. Analyze their engagement rates, content style, and posting patterns.

#### 3. Trend Research

Monitor hashtag growth over time. Identify emerging trends before they go mainstream.

#### 4. Competitive Intelligence

Track competitor hashtags. Compare engagement rates and content strategies.

***

### ❓ FAQ

#### Is this legal?

Yes. This scraper accesses publicly available information on Instagram — the same data visible when visiting instagram.com in your browser. It does not bypass authentication or access private data. Always respect Instagram's [Terms of Service](https://help.instagram.com/581066165581870) and applicable data protection regulations.

#### Do I need Instagram cookies?

**No, you can start without cookies.** Without cookies, the actor extracts basic public data (post URLs, thumbnails, some captions). For richer data (likes, comments, owner names), provide Instagram session cookies. See [how to get cookies](https://www.google.com/search?q=how+to+export+instagram+cookies+from+browser).

#### How do I get Instagram cookies?

1. Log into instagram.com in your browser
2. Open Developer Tools (F12) → Application/Storage → Cookies
3. Copy the `sessionid` and `csrftoken` values
4. Paste them in the format: `sessionid=XXX; csrftoken=YYY`

#### What's the difference between cookie and no-cookie mode?

- **Without cookies**: Basic data (post URLs, thumbnails, some captions) — no login rate limits
- **With cookies**: Full data (likes, comments, owner, location) — richer results

#### What languages are supported?

14 languages: German, English, French, Spanish, Italian, Dutch, Polish, Turkish, Russian, Arabic, Chinese, Japanese, and Korean.

#### What's the maximum number of posts I can scrape?

Up to 100 posts per hashtag, with unlimited hashtags per run.

***

### 🔧 Technical Details

#### How It Works

1. **HTTP Request** — `curl_cffi` sends requests with Chrome 131 TLS fingerprint
2. **Instagram Hashtag Page** — Targets `/explore/tags/{hashtag}/`
3. **JSON Extraction** — Embedded JSON (`__INITIAL_STATE__`) parsed for structured post data
4. **Insights** — Automatic breakdown by hashtag, top posters, engagement analytics
5. **Output** — JSON objects pushed to Apify dataset

#### Requirements

- Python 3.11+
- curl-cffi >= 0.7.0
- beautifulsoup4 >= 4.12.2
- lxml >= 5.1.0

***

### 📞 Support

- **Issues**: [GitHub Issues](https://github.com/Openclaw2605/apify-actors/issues)
- **Source Code**: [GitHub Repository](https://github.com/Openclaw2605/apify-actors/tree/main/actors/instagram-hashtag-tracker)

***

<p align="center">
  <sub>Built with ❤️ by <a href="https://github.com/Openclaw2605">Openclaw2605</a> · <a href="https://apify.com/opencalw-instagram-hashtag-tracker">Try on Apify Store</a></sub>
</p>

# Actor input Schema

## `sessionCookies` (type: `string`):

Instagram-Cookies aus dem Browser (sessionid, csrftoken, etc.) - Format: 'sessionid=XXX; csrftoken=YYY; ...' (siehe README). Ohne Cookies: nur oeffentliche Basis-Daten (Post-URLs, Thumbnails). Mit Cookies: zusaetzlich Likes, Comments, Owner.

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

Liste von Hashtags (ohne #-Zeichen, z.B. \['berlin', 'foodie', 'travel']).

## `maxPostsPerHashtag` (type: `integer`):

Maximale Anzahl Posts pro Hashtag

## `language` (type: `string`):

Sprache fuer Instagram-Seite

## Actor input object example

```json
{
  "sessionCookies": "sessionid=...; csrftoken=...",
  "hashtags": [
    "berlin",
    "foodie",
    "travel"
  ],
  "maxPostsPerHashtag": 30,
  "language": "de"
}
```

# 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 = {
    "sessionCookies": "sessionid=...; csrftoken=...",
    "hashtags": [
        "berlin",
        "foodie",
        "travel"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dexterous_material/opencalw-instagram-hashtag-tracker").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 = {
    "sessionCookies": "sessionid=...; csrftoken=...",
    "hashtags": [
        "berlin",
        "foodie",
        "travel",
    ],
}

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

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

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

```

## CLI example

```bash
echo '{
  "sessionCookies": "sessionid=...; csrftoken=...",
  "hashtags": [
    "berlin",
    "foodie",
    "travel"
  ]
}' |
apify call dexterous_material/opencalw-instagram-hashtag-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dexterous_material/opencalw-instagram-hashtag-tracker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Hashtag Tracker - Posts, Likes, Comments, Analytics",
        "description": "Extract Instagram posts by hashtag: captions, likes, comments, owner profiles, locations, video views, engagement. Hybrid Playwright+curl_cffi engine. Perfect for influencer marketing, trend analysis, and competitor research.",
        "version": "0.1",
        "x-build-id": "JgubWFc51ry1gyAG3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dexterous_material~opencalw-instagram-hashtag-tracker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dexterous_material-opencalw-instagram-hashtag-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dexterous_material~opencalw-instagram-hashtag-tracker/runs": {
            "post": {
                "operationId": "runs-sync-dexterous_material-opencalw-instagram-hashtag-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dexterous_material~opencalw-instagram-hashtag-tracker/run-sync": {
            "post": {
                "operationId": "run-sync-dexterous_material-opencalw-instagram-hashtag-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "hashtags"
                ],
                "properties": {
                    "sessionCookies": {
                        "title": "Instagram Session Cookies (optional)",
                        "type": "string",
                        "description": "Instagram-Cookies aus dem Browser (sessionid, csrftoken, etc.) - Format: 'sessionid=XXX; csrftoken=YYY; ...' (siehe README). Ohne Cookies: nur oeffentliche Basis-Daten (Post-URLs, Thumbnails). Mit Cookies: zusaetzlich Likes, Comments, Owner."
                    },
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "Liste von Hashtags (ohne #-Zeichen, z.B. ['berlin', 'foodie', 'travel']).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPostsPerHashtag": {
                        "title": "Maximale Posts pro Hashtag",
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximale Anzahl Posts pro Hashtag",
                        "default": 30
                    },
                    "language": {
                        "title": "Sprache",
                        "enum": [
                            "de",
                            "en",
                            "fr",
                            "es",
                            "it",
                            "nl",
                            "pt",
                            "pl",
                            "tr",
                            "ru",
                            "ar",
                            "zh",
                            "ja",
                            "ko"
                        ],
                        "type": "string",
                        "description": "Sprache fuer Instagram-Seite",
                        "default": "de"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
