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

Search Instagram by keyword, @username or link and get profiles, places, posts and reels, and hashtags. Each result has followers, bio, caption, likes, comments, location and emails or phones found in bios. Bulk input, no account or cookies needed.

- **URL**: https://apify.com/insights_data/instagram-search-scraper.md
- **Developed by:** [Insights Data](https://apify.com/insights_data) (community)
- **Security:** Limited permissions
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 results

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/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

### 🔍 What is Instagram Search Scraper?

**Instagram Search Scraper** helps marketers, sales teams and agencies with Instagram lead generation and influencer discovery. Type a keyword and you get matching public profiles, places, posts and reels, and hashtags, plus the emails and phone numbers people put in their bios. You can try it with the $5 monthly credit that comes with every Apify Free plan. Add keywords, @usernames or Instagram links and click **Start**. No coding, no Instagram account and no login needed.

Think of it as an Instagram keyword search you can export. One run can cover many keywords and accounts, and every result lands in a clean table.

- 🎯 **Build lead lists:** find coaches, studios, shops or creators in a niche and collect the emails, phones and links from their bios.
- 🌟 **Find Instagram influencers:** search a niche keyword and compare followers, verified badges and recent posts before you reach out.
- 🥊 **Run Instagram competitor analysis:** read competitors' profiles by @username and see likes and comments on their recent posts.
- 🏪 **Collect local business leads:** search "coffee shop berlin" and get places with category, phone, address, city and coordinates.
- 📰 **Do Instagram content research:** collect public posts and reels for a topic with captions, hashtags, mentions and engagement.
- ⏰ **Watch a niche over time:** save your search as a task and run it every week to spot new accounts and posts.

#### What can Instagram Search Scraper do?

- 📦 **Bulk input:** mix keywords, @usernames and Instagram links (profile, post, reel, hashtag or place) in one list.
- 🎛️ **Result type filter:** keep all types, or only profiles, places, posts and reels, or hashtags.
- 📇 **Contact extraction:** emails, phone numbers and links found in bios and captions, as fields and as their own table.
- 🖼️ **Recent posts:** optionally open up to 12 recent posts per profile or place, with likes, comments and media links.
- 🧹 **No duplicates:** repeated lines are removed, and a profile or post found by two searches is saved once per run.
- 📡 **Live results:** each result is saved the moment it is ready, so you can watch the table fill up.
- 🔓 **Instagram scraper without login:** it reads public pages the way a logged-out visitor sees them. No account, cookies or API key.
- 🔌 **Platform features:** export to JSON, CSV, Excel, XML or HTML, call it by API, schedule runs and connect it to other apps.

This Instagram scraper works like you searching Instagram in your browser, only it opens every result for you and writes the details into a spreadsheet.

***

### 📊 Instagram Search Scraper data: what can you extract?

Each row in the main table is one result. The `resultType` field tells you whether it is a profile, place, post or hashtag. This is the Instagram data you can expect:

| Result type | Main fields |
|---|---|
| 👤 Profile | `username`, `fullName`, `biography`, `externalUrls`, `followersCount`, `followsCount`, `verified`, `private`, `profilePicUrl`, `highlightsCount`, `latestPosts` |
| 📍 Place | `name`, `category`, `phone`, `location_address`, `location_city`, `location_zip`, `lat`, `lng`, `media_count`, `price_range`, `hours` |
| 🎬 Post or reel | `shortCode`, `type`, `caption`, `hashtags`, `mentions`, `ownerUsername`, `likesCount`, `commentsCount`, `videoUrl`, `videoDuration`, `displayUrl`, `timestamp`, `locationName`, `taggedUsers`, `musicInfo` |
| #️⃣ Hashtag | `name`, `url` |
| 📧 Emails | `emails`: addresses written in a bio, bio-link title or caption |
| ☎️ Phones | `phones`: phone numbers written in a bio, bio-link title or caption |
| 🔗 Links | `links`: bio links for profiles, links in the caption for posts |

Every row also has `searchTerm` (the keyword or link it came from), `inputUrl` and `url`.

So the tool does three jobs at once. It is an Instagram profile scraper for accounts (with the Instagram followers count), an Instagram post scraper and Instagram reels scraper for media, and an Instagram location scraper for places. As an Instagram hashtag scraper it is limited: hashtag rows hold only the name and link.

> **Note:** Instagram hides some numbers from logged-out visitors. `postsCount`, `isBusinessAccount`, `businessCategoryName` and `videoViewCount` are often empty. Hashtag rows have only the name and link: post counts and related tags are not available without login, so `postsCount` is empty and `note` says why. Emails, phones and links only appear when **Extract contacts** is on, and many bios have no email or phone, so expect gaps in a lead list.

#### What data can't Instagram Search Scraper extract?

- Posts and other content of private accounts, stories, follower or following lists, comment text and the list of likers.
- Hashtag post counts, difficulty or related tags.
- Emails that are not written on Instagram itself. The Actor does not visit outside websites. For a dedicated contact tool with lead scores, see [Instagram Email Scraper](https://apify.com/insights_data/instagram-email-scraper).

***

### 🧭 How to scrape Instagram by keyword

Instagram Search Scraper is designed for an easy start, even if you have never extracted data from the web before. It is an Instagram keyword search scraper, so you start from words, not from a list of accounts.

1. Create a free [Apify account](https://console.apify.com/sign-up).
2. Open [Instagram Search Scraper](https://apify.com/insights_data/instagram-search-scraper) and go to the input form.
3. Add keywords, @usernames or Instagram links to **Search terms or links**, one per line.
4. Click **Start** and wait for the run to finish. Results appear while it runs.
5. Download your data in JSON, CSV, Excel, XML or HTML.

For your first run, leave the prefilled `coffee` and `@nasa` as they are and press **Start**. That run saves at most 21 results (up to 20 for the keyword plus 1 for the account).

That is how to scrape Instagram without writing code. An Instagram scraper by keyword works the same way you would search the app: you scrape Instagram for a topic and get a file instead of a scrolling feed.

***

### 💲 How much does it cost to scrape Instagram?

Instagram Search Scraper uses **pay-per-event** pricing. That means you pay a small fee for each result saved, not a monthly rent. Your bill for a run has three parts:

1. **Results:** one charge per result saved to the main table, whatever its type. Profiles, places, posts and hashtags all count, including hashtag rows that hold only a name and link.
2. **Start fee:** $0.00005 per run at the default 1 GB memory.
3. **Platform usage:** the compute and any proxy traffic the run uses, billed at your Apify plan's own rates.

| Apify plan | Price per result | Price per 1,000 results |
|---|---|---|
| 🆓 Free | $0.002 | $2.00 |
| 🌱 Starter | $0.0018 | $1.80 |
| 🚀 Scale | $0.0016 | $1.60 |
| 🏢 Business and higher | $0.0014 | $1.40 |

The plan discount applies to the result price only. The start fee is the same on every plan, and platform usage is billed at your Apify plan's own rates.

Not billed: rows in the Status table (problems), the copies of each result in the extra tables, and the recent posts inside a profile or place result. Prices are also on the [pricing tab](https://apify.com/insights_data/instagram-search-scraper/pricing).

#### What does a run cost?

1,000 results on the Free plan cost $2.00 in result charges, plus the $0.00005 start fee, plus platform usage. The example input below can save at most 21 results (20 for "coffee" plus 1 for "@nasa"), so its result charges are at most $0.042 on the Free plan.

Platform usage depends on the run, so do a small test run first and read the cost on the run's page in Apify Console. To cap your spend, set a **maximum charge limit** in the run options when you start a run. It caps the result charges, and platform usage comes on top. When the limit is reached, the Actor stops cleanly and keeps every result saved so far.

#### Is scraping Instagram free?

You can start for free. The Apify Free plan gives you $5 of credit every month, which pays for result charges and platform usage. Free-plan runs work exactly like paid runs: there is no extra cap on results per run.

***

### ⬇️ Instagram Search Scraper input

The only required field is **Search terms or links**. Everything else has a sensible default.

#### Settings most people change

| Setting | What it does | Default |
|---|---|---|
| 📝 **Search terms or links** (`urls`) | Keywords, @usernames or Instagram links, one per line. Duplicates are removed. | `coffee`, `@nasa` (prefill) |
| 🎛️ **Result type** (`searchType`) | `all`, `profiles`, `places`, `posts` (posts and reels) or `hashtags` | `all` |
| 🔢 **Max results per search** (`maxItems`) | Stop each keyword search after this many results. 0 means as many as can be found. | `20` |
| 🖼️ **Recent posts per profile or place** (`postsPerResult`) | Open this many recent posts (0–12) for each profile or place | `0` |
| 📇 **Extract contacts** (`includeContacts`) | Pull emails, phones and links out of bios and captions | on |
| 🛡️ **Proxy** (`proxyConfiguration`) | Optional. By default no proxy is used, and the Actor switches to Apify Proxy by itself if Instagram refuses requests. | off |

Here is an example that searches one keyword and reads one account:

```json
{
  "urls": ["coffee", "@nasa"],
  "searchType": "all",
  "maxItems": 20,
  "postsPerResult": 0,
  "includeContacts": true
}
```

The full field list is on the [input tab](https://apify.com/insights_data/instagram-search-scraper/input-schema).

#### Search terms or links

Each line is one of three things. A **keyword** starts a search. An **@username** or an **Instagram link** is read directly, so this field also covers Instagram username search and Instagram account search. Because you can paste hundreds of lines at once, it is also an Instagram bulk scraper.

- ✅ Good: `yoga studio`, `@nasa`, `https://www.instagram.com/explore/locations/123456789/`
- ❌ Bad: `https://example.com/coffee` (not an Instagram link, so it is searched as a keyword)

> ⚠️ **Result type** also filters @usernames and links. With **Profiles** selected, a post link in your list is skipped (the log says so).

#### Max results per search

The limit counts **per keyword**, not per run. Three keywords at 20 each give up to 60 results, plus one result for each @username or link. Those direct entries are not limited by this setting.

- ✅ Good: `20` for a first test, then raise it.
- ❌ Bad: `0` on many broad keywords without a maximum charge limit. Every saved result is billed.

#### Recent posts per profile or place

With `0`, a profile result can still include a short list of recent posts (link, type and caption) when the profile page shows them; otherwise `latestPosts` is empty, as in the example below. Set 1–12 to open those posts for likes, comments and media links. Places get recent posts only when this is above 0. A higher number makes the run take longer, but it does not add billed results: the posts sit inside their profile or place result.

***

### ⬆️ Instagram Search Scraper output

Results are stored in a **dataset**, which is a table of rows in your Apify storage. Open the **Output** tab to see them while the run is going, and switch between the views. To download, use the export button on the Output tab, or go to **Storage → Datasets → Export** and pick JSON, CSV, Excel, XML or HTML. That is all it takes to export Instagram data to Excel.

#### JSON example

Example rows for the input above (shortened; the values are illustrative, not from a real run):

```json
[
  {
    "resultType": "profile",
    "searchTerm": "@nasa",
    "inputUrl": "https://www.instagram.com/nasa/",
    "id": "528817151",
    "username": "nasa",
    "url": "https://www.instagram.com/nasa/",
    "fullName": "NASA",
    "biography": "Exploring the universe and our home planet.",
    "externalUrls": ["https://www.nasa.gov/"],
    "followersCount": 104361171,
    "followsCount": 77,
    "postsCount": null,
    "verified": true,
    "private": false,
    "hasClips": true,
    "highlightsCount": 6,
    "latestPosts": [],
    "emails": [],
    "phones": [],
    "links": ["https://www.nasa.gov/"]
  },
  {
    "resultType": "place",
    "searchTerm": "coffee",
    "name": "Example Coffee House",
    "url": "https://www.instagram.com/explore/locations/123456789/",
    "phone": "+1 555 010 0000",
    "category": "Cafe",
    "media_count": 120,
    "lat": 40.0,
    "lng": -74.0,
    "location_id": "123456789"
  },
  {
    "resultType": "hashtag",
    "searchTerm": "coffee",
    "name": "coffee",
    "url": "https://www.instagram.com/explore/tags/coffee/",
    "postsCount": null
  }
]
```

Hashtag rows also carry a short `note` field that explains why the post count is empty (it is left out above to keep the example short).

#### Output tables

In plain words: start with **All results**. The Profiles, Places, Posts and reels, and Hashtags tables hold the same results split by type, with fewer columns. Emails, phones and links has one row per contact found, and Recent posts has one row per recent post. Two more show problems and run totals. You find them all on the **Output** tab.

| Table | What it holds |
|---|---|
| 📋 All results | Every result, one row each, with every field (views: All results, Profiles, Places, Posts and reels, Hashtags) |
| 👤 Profiles | Followers, bio, links and badges for each profile |
| 📍 Places | Name, category, phone, address and coordinates of each place |
| 🎬 Posts and reels | Caption, likes, comments, owner and media links |
| #️⃣ Hashtags | Hashtag name and link |
| 📇 Emails, phones and links | One row per contact found, with the source account or post |
| 🖼️ Recent posts | One row per recent post attached to a profile or place |
| 🚦 Status and problems | Searches or links that gave nothing, with the reason (never billed) |
| 🧾 Run summary | Totals for the run, such as results saved and problems. It is a file in the run's **key-value store** (small file storage), under **Storage → Key-value stores → RUN_SUMMARY** |

***

### 💡 Tips and advanced usage

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

A keyword returns as many results as Instagram shows publicly for it. Every keyword has a natural ceiling, so a narrow keyword can return fewer results than **Max results per search**, and even `0` (as many as can be found) is a finite number. To get more results, add more keywords or related phrases instead of raising the limit. A small test run shows what to expect for your niche.

#### How to keep runs cheaper

- Start with **Max results per search** at 20 and raise it when the results look right.
- Pick one **Result type**. Hashtag rows are billed like other results, so skip them if you only need accounts.
- Keep **Recent posts per profile or place** at 0 unless you need likes and comments of recent posts. It does not add billed results, but it makes the run longer.
- Set a maximum charge limit in the run options.

#### Run it on a schedule

Instagram market research and influencer marketing are most useful when you repeat them. Here is a weekly recipe:

1. Fill in the input, for example `["vegan bakery london", "plant based cafe london"]`, **Result type** `profiles` and **Max results per search** `50`.
2. Save it as a **task** (a saved copy of your input that you can run again with one click).
3. Open **Schedules**, create a weekly schedule and add the task.
4. After each run, export the Profiles table and compare it with last week's file on `username`. New usernames are new accounts in your niche, and changes in `followersCount` show who is growing.

Each run saves all results it finds, so the comparison happens in your spreadsheet or tool, not inside the Actor.

#### If something goes wrong

- **Check the Status table.** It lists each problem with a status: `no_results` (a keyword found nothing), `no_data` (an @username or link is private, removed or hidden), `blocked` (Instagram refused the requests), `unreachable` (the requests never connected) or `failed` (the page could not be read). Status rows are never billed.
- **What was billed:** only the results saved to the main table. A run that stops early keeps every result it saved, and those results stay billed.
- **If the run stopped early,** Instagram refused many requests in a row, or the Actor could not connect many times in a row. Wait some time (for example an hour) and run the same input again. If you set your own proxy in the **Proxy** field, check it.
- **If a keyword gives nothing,** try a broader or more common word, or choose another result type.

***

### 🔌 Instagram Search Scraper integrations and API

#### Can I use Instagram Search Scraper as an API?

Yes. You can use it as an Instagram search API through the [Apify API](https://docs.apify.com/api/v2): start a run, wait for it, and read the dataset. The `apify-client` library is available for [JavaScript (NPM)](https://apify.com/insights_data/instagram-search-scraper/api/javascript) and [Python (PyPI)](https://apify.com/insights_data/instagram-search-scraper/api/python). Ready-made code for this Instagram scraper API is on the [API tab](https://apify.com/insights_data/instagram-search-scraper/api). It is a simple Instagram keyword search API: send keywords, get rows back.

#### How to scrape Instagram with Python

Here is a short Instagram scraper Python example. It runs the Actor and prints each result. Replace the token with your own: you find it in Apify Console under **Settings → API & Integrations**.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("insights_data/instagram-search-scraper").call(run_input={
    "urls": ["coffee", "@nasa"],
    "searchType": "all",
    "maxItems": 20,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["resultType"], item.get("url"))
```

#### Can I integrate Instagram Search Scraper with other apps?

Yes. Apify connects to Make, Zapier, n8n, Slack, Google Sheets, Google Drive, Airbyte, GitHub and LangChain through [integrations](https://apify.com/integrations). Two workflows that fit this Actor:

- 📑 **Lead list in Google Sheets:** run a weekly task with **Result type** `profiles` and send the results to a Google Sheet for your sales team. Each profile row already has its `emails`, `phones` and `links`. If you want one row per contact instead, export the Emails, phones and links table.
- 🪝 **Slack alert when a run finishes:** add a [webhook](https://docs.apify.com/integrations/webhooks), which is a message Apify sends to a URL when a run event happens, such as "run succeeded". Point it at Make, Zapier or n8n to post the run's result count and dataset link to Slack.

Webhooks fire on run events, not on each new row. For ongoing monitoring, use scheduled runs as shown above.

#### Can I use Instagram Search Scraper with AI agents (MCP)?

Yes. **MCP** (Model Context Protocol) lets AI assistants such as Claude call tools. Add the Apify MCP server and your agent can find and run this Actor. Setup details are on the [MCP tab](https://apify.com/insights_data/instagram-search-scraper/api/mcp).

***

### 🧩 Other Instagram scrapers

These tools pick up where a keyword search ends: go deeper on the accounts and posts you found.

| Actor | What it adds |
|---|---|
| 👤 [Instagram Profile Scraper](https://apify.com/insights_data/instagram-profile-scraper) | Full public profiles from usernames or links, with engagement rate and latest posts |
| 📷 [Fast Instagram Post Scraper](https://apify.com/insights_data/fast-instagram-post-scraper) | The latest posts of any profile, with reel views, audio, tagged users and top comments, and post type or date filters |
| 🧲 [Instagram Related Profiles Scraper](https://apify.com/insights_data/instagram-related-profiles-scraper) | Similar and suggested accounts for any profile, with a similarity score |
| 📮 [Instagram Email Scraper](https://apify.com/insights_data/instagram-email-scraper) | Public emails by niche and location, with phone, WhatsApp, website and a lead score |
| 🗺️ [Google Map Scraper](https://apify.com/insights_data/google-map-scraper) | Google Maps places by keyword, with phone, website, rating, reviews and hours |
| 🧵 [Search Threads By Keywords](https://apify.com/insights_data/search-threads-by-keywords) | Threads posts by keyword, hashtag or @username |

***

### ❓ FAQ

#### Is it legal to scrape Instagram?

Scraping publicly available data is generally legal, but you must respect personal data and intellectual property rules. Profiles often contain personal data, so laws such as GDPR and CCPA apply when you store or use it, and you need a legitimate reason. Follow Instagram's terms and use the data responsibly. This is not legal advice; ask a lawyer for your case.

#### How does Instagram Search Scraper work?

It works like you browsing Instagram while logged out, only it does the clicking for you. For each keyword it finds matching public profiles, posts and reels, places and hashtags, opens each one and saves the public details. @usernames and links are opened directly. Each result goes into the main table and its own table at once, and problems go to the Status table.

#### How is Instagram Search Scraper different from Instagram Profile Scraper?

Instagram Search Scraper starts from a keyword and finds accounts, places, posts and hashtags for you. [Instagram Profile Scraper](https://apify.com/insights_data/instagram-profile-scraper) starts from usernames you already have and goes deeper on each profile.

| | Instagram Search Scraper | Instagram Profile Scraper |
|---|---|---|
| Input | Keywords, @usernames, links | Usernames or profile links |
| Finds new accounts by keyword | Yes | No |
| Result types | Profiles, places, posts and reels, hashtags | Profiles with their latest posts |
| Emails and phones from bios | Yes | Yes |
| Engagement rate | No | Yes |

A good pairing: use this Actor to find accounts, then run Instagram Profile Scraper on the usernames you keep.

#### Why scrape Instagram search results?

- **Social media lead generation:** turn a niche keyword into a list of accounts with contacts.
- **Instagram influencer search:** shortlist creators by followers and verified badge.
- **Local markets:** use it as an Instagram business scraper to find local business Instagram accounts and places in a city.
- **Content ideas:** see which posts and reels exist for a topic and how they perform.

#### Can I search for business accounts only?

You can do an Instagram business account search by using business words as keywords, such as "bakery london" or "dental clinic miami", with **Result type** set to `profiles`. There is no business-only filter. `isBusinessAccount` and `businessCategoryName` are often empty because Instagram hides them from logged-out visitors, so judge accounts by `biography`, `externalUrls` and the contact fields instead.

#### How to scrape Instagram profiles from a keyword?

Set **Result type** to `profiles`, add your keywords and click **Start**. Each profile comes with followers, bio, links and any emails or phones from the bio. That is how to scrape Instagram profiles you don't know yet.

#### Is this an Instagram email scraper?

Partly. It is an Instagram contact scraper and Instagram bio scraper: it collects emails, phones and links that people write in their bio, bio-link titles or captions. It does not visit outside websites. Accounts without contacts in their bio come back with empty `emails` and `phones`.

#### Why am I getting fewer results than expected?

- The keyword has fewer public results than your **Max results per search**. Add related keywords.
- **Result type** removed the other types, including @usernames or links of another type.
- Accounts or posts with no public data (removed or hidden) are skipped. Direct links show up in the Status table.
- The run stopped early because Instagram refused many requests, or your maximum charge limit was reached. Everything saved before that is kept.

#### Is there a limit on the Free plan?

No. Free-plan runs work the same as paid runs. The $5 monthly credit pays for result charges and platform usage, and Free-plan runs are billed the same way as paid runs: the result price, the start fee and platform usage.

***

### 🤝 Support and feedback

Found a bug or need another field? Please open an issue on the [Issues tab](https://apify.com/insights_data/instagram-search-scraper/issues/open). Your reports help improve the Actor.

Need a custom Instagram data scraper, a different output format or a one-off dataset? Email **hello.insights.data@gmail.com** to discuss a custom solution.

Built and maintained by [Insights Data](https://apify.com/insights_data).

# Actor input Schema

## `urls` (type: `array`):

One per line: a keyword (coffee), an @username, or an Instagram link (profile, post, reel, hashtag or place). Duplicates are removed.

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

Which kind of results to keep for keyword searches. All returns profiles, places, posts and hashtags together.

## `maxItems` (type: `integer`):

Stop each keyword search after this many results. 0 means as many as can be found.

## `postsPerResult` (type: `integer`):

Also open this many recent posts for each profile or place, with likes, comments and video links. 0 turns it off and is fastest.

## `includeContacts` (type: `boolean`):

Pull emails, phone numbers and links out of bios and captions into their own fields and table.

## `proxyConfiguration` (type: `object`):

By default no proxy is used. If a request is refused, the Actor switches to a stronger proxy automatically and keeps using it.

## Actor input object example

```json
{
  "urls": [
    "coffee",
    "@nasa"
  ],
  "searchType": "all",
  "maxItems": 20,
  "postsPerResult": 0,
  "includeContacts": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every profile, place, post and hashtag found, one row each.

## `profiles` (type: `string`):

Followers, bio, links and verification for each profile.

## `places` (type: `string`):

Name, category, phone, address and coordinates of each place.

## `posts` (type: `string`):

Caption, likes, comments, owner and media links of each post.

## `hashtags` (type: `string`):

Hashtag name and link.

## `contacts` (type: `string`):

Contact details found in bios and captions.

## `latest_posts` (type: `string`):

Recent posts attached to profiles and places.

## `status` (type: `string`):

Searches that returned nothing and why. Never charged.

## `summary` (type: `string`):

Counts and timing of the run.

# 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 = {
    "urls": [
        "coffee",
        "@nasa"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("insights_data/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 = {
    "urls": [
        "coffee",
        "@nasa",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("insights_data/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 '{
  "urls": [
    "coffee",
    "@nasa"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call insights_data/instagram-search-scraper --silent --output-dataset

```

## MCP server setup

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