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

Search Instagram by keyword and extract posts, Reels, and carousels with 130+ data points. Get all metadata, video data and direct media download URLs. Multiple keywords per run. No login needed. JSON, CSV, Excel, API, MCP, webhook, AI-agent ready.

- **URL**: https://apify.com/scrapesmith/instagram-search-scraper-api.md
- **Developed by:** [Scrape Smith](https://apify.com/scrapesmith) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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.

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Keyword Search Scraper

Extract Instagram posts, Reels, and carousels from keyword search results. Get full engagement data — play counts, likes, comments, shares, video duration, music info, location, user profiles, and direct media download URLs. Supports multiple keywords in a single run.

### Why use this scraper?

Instagram keyword search is the fastest way to discover trending content, identify influencers, and monitor brand mentions. This scraper automates the entire process — just enter your keywords and get structured data in seconds.

**130+ data points per post.** Every result includes the complete media object with engagement metrics, creator information, audio/music details, location data, and high-resolution image and video URLs ready for download.

**No login required from you.** The scraper handles authentication automatically. You don't need to provide Instagram cookies, passwords, or any credentials. Just add your keywords and run.

**Multiple keywords per run.** Search for "luxury fashion", "street food NYC", and "fitness motivation" all in one run. Results are labeled with the search keyword so you can filter and segment your data.

---

### What data do you get?

Each result contains the full Instagram media object — over 130 fields. Here are the most popular ones:

#### Engagement metrics
- **Play count** — total video/reel views
- **Like count** — number of likes
- **Comment count** — number of comments
- **Share count** — number of shares/reposts
- **Video duration** — length in seconds

#### Post details
- **Post URL** — direct link to the Instagram post
- **Shortcode** — Instagram post identifier
- **Caption** — full caption text
- **Hashtags** — extracted from caption
- **Mentions** — extracted from caption
- **Media type** — photo, video, reel, or carousel
- **Posted date** — ISO timestamp
- **Product type** — clips, feed, IGTV

#### Media files
- **Thumbnail URL** — highest resolution image
- **Video URL** — direct video download link
- **Image candidates** — multiple resolutions available
- **Video versions** — multiple quality options
- **Carousel items** — all slides with individual media URLs

#### Creator profile
- **Username** — Instagram handle
- **Full name** — display name
- **User ID** — unique identifier
- **Profile picture URL** — avatar image
- **Verified status** — blue checkmark
- **Private status** — public or private account

#### Location
- **Location name** — place name (when tagged)
- **Location ID** — Instagram place identifier
- **Latitude / Longitude** — geo coordinates
- **Address** — street address
- **City** — city name

#### Audio and music
- **Audio asset ID** — unique audio identifier
- **Song title** — track name
- **Artist name** — performer
- **Is explicit** — explicit content flag
- **Cover artwork URL** — album art

#### Additional metadata
- **Is sponsored** — paid partnership flag
- **Comments disabled** — commenting turned off
- **Likes hidden** — like count hidden by creator
- **Carousel media count** — number of slides
- **Original dimensions** — width and height in pixels
- **Has audio** — audio track present

---

### Use cases

#### Brand monitoring
Track how your brand, products, or campaigns appear in Instagram search results. Monitor competitor mentions and compare engagement metrics across brands.

#### Influencer discovery
Find influencers and creators in any niche by searching relevant keywords. Identify top performers by play count, likes, and engagement rate. Build targeted outreach lists with verified profiles.

#### Trend research
Discover what content is trending for any topic or industry. Analyze engagement patterns, popular formats (Reels vs photos vs carousels), and content timing. Spot emerging trends before they go mainstream.

#### Content strategy
Research what works in your niche — which captions get the most engagement, what music tracks are popular, which locations drive discovery. Use data to inform your content calendar.

#### Market research
Understand consumer sentiment and behavior around products, services, or categories. Analyze how people discuss topics visually on Instagram. Extract location data for geographic market analysis.

#### Competitive analysis
Compare your content performance against competitors. Analyze their posting frequency, engagement rates, content formats, and audience response. Identify gaps and opportunities.

#### Lead generation
Find potential customers and partners by searching industry-specific keywords. Extract creator profiles, engagement data, and content themes to build targeted prospect lists.

#### Academic research
Collect Instagram data for social media research, content analysis, and digital marketing studies. Structured JSON/CSV output integrates with any analysis tool.

---

### Input

| Field | Type | Description |
|-------|------|-------------|
| `keywords` | Array of strings | Keywords to search for. Each keyword runs as a separate search. |
| `maxResultsPerKeyword` | Number | Maximum results per keyword. Default: 250. |

#### Example input

```json
{
    "keywords": ["sustainable fashion", "organic skincare", "vegan recipes"],
    "maxResultsPerKeyword": 200
}
````

***

### Output

Results are saved as structured JSON. Each item contains 130+ fields from the Instagram API plus computed convenience fields (direct URLs, parsed hashtags/mentions, formatted dates).

#### Example output

```json
{
    "url": "https://www.instagram.com/p/ABC123/",
    "profileUrl": "https://www.instagram.com/creator/",
    "thumbnailUrl": "https://...",
    "videoUrl": "https://...",
    "captionText": "Check out this amazing product! #fashion #style",
    "hashtags": ["fashion", "style"],
    "mentions": [],
    "postedAt": "2025-07-15T14:30:00+00:00",
    "searchKeyword": "sustainable fashion",
    "play_count": 125000,
    "like_count": 4500,
    "comment_count": 230,
    "media_repost_count": 89,
    "video_duration": 15.5,
    "product_type": "clips",
    "code": "ABC123",
    "user": {
        "username": "creator",
        "full_name": "Content Creator",
        "is_verified": true
    },
    "location": {
        "name": "New York City",
        "lat": 40.7128,
        "lng": -74.0060
    }
}
```

***

### Export formats

Download your results in any format:

- **JSON** — raw structured data
- **CSV** — spreadsheet-ready
- **Excel** — formatted tables
- **XML** — for enterprise systems

***

### Integrations

Connect Instagram keyword search data to your existing workflow:

- **Zapier** — trigger automations when new results are found
- **Make (Integromat)** — build custom data pipelines
- **Google Sheets** — auto-populate spreadsheets
- **Slack** — get notifications for brand mentions
- **Webhooks** — push data to any endpoint
- **API** — programmatic access with full CRUD
- **MCP** — AI agent and LLM tool integration
- **Scheduled runs** — automate daily or weekly searches

***

### How it works

1. Enter one or more keywords
2. The scraper searches Instagram for matching content
3. Results are collected with full engagement data and media URLs
4. Data is delivered in your preferred format

Runs complete in seconds for typical searches. Multiple keywords are processed sequentially with automatic session management and retry logic.

***

### Tips for best results

- **Be specific** — "vegan meal prep" returns more relevant results than just "food"
- **Use multiple keywords** — batch related searches in one run to save time
- **Check different phrasings** — "luxury bags" and "designer handbags" may return different content
- **Combine with other scrapers** — pair with Instagram Profile Scraper or Instagram Comments Scraper for deeper analysis

***

### FAQ

#### How many results can I get per keyword?

Instagram's search algorithm returns up to approximately 250 results per keyword query. This is consistent across all Instagram search tools. For larger datasets, try multiple related keywords.

#### Does this scrape hashtag feeds?

This scraper is designed for keyword search (the Instagram Explore search page). For dedicated hashtag feeds with unlimited pagination, check out our Instagram Hashtag Scraper.

#### Do I need to provide my Instagram account?

No. The scraper handles authentication automatically. You don't need to provide cookies, passwords, or any login credentials.

#### What content types are returned?

The scraper returns all content types that appear in Instagram keyword search: Reels, photos, carousels, and video posts.

#### Can I filter by date?

Instagram's keyword search returns algorithmically ranked results. Results typically span recent and popular content. Each result includes a timestamp so you can filter by date after scraping.

#### How often should I run this?

Instagram search results change frequently as new content is posted. For brand monitoring, daily runs work well. For trend research, weekly runs are sufficient.

***

### Pricing

Pay per result with a generous free tier. No compute costs, no hidden fees — you only pay for the data you actually receive.

***

### Related scrapers

- **Instagram Hashtag Scraper** — unlimited pagination on hashtag feeds
- **Instagram Profile Scraper** — extract profile data and metadata
- **Instagram Comments Scraper** — collect comments from posts
- **Instagram Followers Scraper** — extract follower and following lists

# Actor input Schema

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

Keywords to search for on Instagram (e.g. 'luxury bags', 'street food NYC'). Each keyword runs as a separate search.

## `maxResultsPerKeyword` (type: `integer`):

Maximum results per keyword. Instagram limits keyword search to ~250 results per query. Leave empty for maximum available.

## Actor input object example

```json
{
  "keywords": [
    "gucci"
  ],
  "maxResultsPerKeyword": 10
}
```

# 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": [
        "gucci"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesmith/instagram-search-scraper-api").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": ["gucci"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesmith/instagram-search-scraper-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Search Scraper",
        "description": "Search Instagram by keyword and extract posts, Reels, and carousels with 130+ data points. Get all metadata, video data and direct media download URLs. Multiple keywords per run. No login needed. JSON, CSV, Excel, API, MCP, webhook, AI-agent ready.",
        "version": "0.0",
        "x-build-id": "D3Bzyn8iO4FpavOfu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesmith~instagram-search-scraper-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesmith-instagram-search-scraper-api",
                "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/scrapesmith~instagram-search-scraper-api/runs": {
            "post": {
                "operationId": "runs-sync-scrapesmith-instagram-search-scraper-api",
                "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/scrapesmith~instagram-search-scraper-api/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesmith-instagram-search-scraper-api",
                "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": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "Keywords to search for on Instagram (e.g. 'luxury bags', 'street food NYC'). Each keyword runs as a separate search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerKeyword": {
                        "title": "Max results per keyword",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum results per keyword. Instagram limits keyword search to ~250 results per query. Leave empty for maximum available.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
