# Instagram Search Scraper (`instax/instagram-search-scraper`) Actor

- **URL**: https://apify.com/instax/instagram-search-scraper.md
- **Developed by:** [InstaX](https://apify.com/instax) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Search Scraper — Hashtag, Keyword & Place

Search Instagram the way a person would — by hashtag, keyword, or location — and get back structured post and Reel data. No login required, runs fully anonymously.

### Who this is for

- **Content & social media managers** researching what's actually performing under a hashtag before planning a campaign.
- **Marketers & brand strategists** doing competitive and trend research across a niche or industry.
- **Researchers** studying how a topic, event, or keyword is being discussed on Instagram.
- **Agencies** building content pitches backed by real examples of what's working right now.

### What you can do with it

| Use case | How |
|---|---|
| **Hashtag content research** | Search a hashtag (e.g. #sustainablefashion) and see the actual top-performing posts and Reels — captions, view counts, and creators — to plan your own content. |
| **Competitor & trend monitoring** | Search a keyword tied to your industry and track what content is trending around it week over week. |
| **Influencer discovery** | Surface accounts actively posting in your niche via hashtag/keyword search, as a starting point for outreach. |
| **Market research** | Pull a structured sample of real public posts around a topic for sentiment or trend analysis, without manually scrolling Instagram. |

### How it works

Give it a search term and choose hashtag, keyword, or place search. It queries Instagram's own search data — the same data that powers the app's Explore/Search tab — and returns clean, structured post/Reel data with captions, engagement counts, and media links. Runs anonymously; no Instagram account of yours is ever used.

### Example output

| shortCode | type | ownerUsername | caption | videoViewCount | hashtags | url |
|---|---|---|---|---|---|---|
| DVLaePSiIsD | Video | bisilver.it | "🎁💍Mom deserves the shine. Make it unforgettable.✨ #Reels #Jewelry…" | 2,787,332 | \[earcuff, madeinitaly, earrings, jewelry] | instagram.com/p/DVLaePSiIsD/ |
| DWrHk0LCCgE | Video | please.deer | "Hii fairies! Orders on my DM 🌙Based in Poland ✨ #fairycore #jewelry…" | 20,911,915 | \[fairycore, jewelry, handmadejewelry] | instagram.com/p/DWrHk0LCCgE/ |

Every row also includes `id`, `productType`, `displayUrl`, `videoUrl`, `likesCount`, `commentsCount`, `location`, and `timestamp`.

### Pricing

**Pay per result** — you're charged for what you actually get back, not for compute time or failed searches:

- **$0.00005** per run start
- **$0.002** per post/Reel returned

**Example**: a search returning 100 results costs about **$0.20**. There's no subscription and no minimum spend.

### See it in action

*(30-second demo video coming soon — showing a hashtag search from input to results.)*

### Frequently asked questions

**Does this need an Instagram account or session cookies?**
No — search runs fully anonymously, the same way Instagram's own Explore tab works for a logged-out visitor. No login, no API key, no risk to any account.

**What's the difference between hashtag, keyword, and place search?**
Hashtag search returns posts tagged with a specific hashtag; keyword search matches posts and captions related to a general term; place search finds posts tied to a specific location.

**Can I filter for Reels only, or photos only?**
Yes — the `resultsType` input lets you request `reels`, `posts`, or `raw` (unfiltered) results.

**How fresh is the data?**
Live — every run queries Instagram directly at the time it runs, there's no cached/stale dataset involved.

# Actor input Schema

## `search` (type: `string`):

Provide a search query to search Instagram for hashtags, keywords, or places.

## `searchType` (type: `string`):

What type of search to perform: hashtag (posts by #tag), keyword (top SERP results), or place (location-based).

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

Choose what data to extract: posts, comments, details, mentions, or reels. Note: comments can only be scraped from post URLs.

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

How many posts or comments to scrape. Set to 0 for unlimited (will paginate until no more results).

## `searchLimit` (type: `integer`):

How many search results (hashtags, users, or places) should be returned.

## `onlyPostsNewerThan` (type: `string`):

Only return posts newer than this date. Format: YYYY-MM-DD or relative (e.g. '7 days', '1 month'). UTC timezone.

## `addParentData` (type: `boolean`):

Attach the search source info (hashtag name, place name, keyword) to each result.

## Actor input object example

```json
{
  "search": "jewelry",
  "searchType": "hashtag",
  "resultsType": "posts",
  "resultsLimit": 50,
  "searchLimit": 5,
  "addParentData": false
}
```

# Actor output Schema

## `results` (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 = {
    "search": "jewelry"
};

// Run the Actor and wait for it to finish
const run = await client.actor("instax/instagram-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 = { "search": "jewelry" }

# Run the Actor and wait for it to finish
run = client.actor("instax/instagram-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 '{
  "search": "jewelry"
}' |
apify call instax/instagram-search-scraper --silent --output-dataset

```

## MCP server setup

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