# Instagram Keyword Search Scraper (`khadinakbar/instagram-keyword-search-scraper`) Actor

Discover public Instagram profiles from niche, brand, profession, or local-business keywords. Returns normalized usernames, bios, public audience signals, business flags, links, matched keywords, provider provenance, and collection time.

- **URL**: https://apify.com/khadinakbar/instagram-keyword-search-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, MCP servers
- **Stats:** 4 total users, 2 monthly users, 99.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 instagram profile founds

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/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 for Public Profile Discovery

Discover public Instagram profiles from niche, brand, profession, or local-business keywords and receive one normalized dataset row per unique username. Records include profile identity, biography, public audience signals, business or professional flags, links, matched keyword, provider provenance, and collection time for creator research, market mapping, outreach preparation, and AI-agent workflows.

### Best fit for this Actor

Choose this Actor when your workflow starts with keywords and needs public Instagram profile discovery. To continue into profile-level enrichment, pass returned `username` values to the [Instagram Profile Scraper](https://apify.com/khadinakbar/instagram-profile-scraper), which accepts usernames and can add public contact, bio-link, related-profile, and recent-post fields.

### A practical creator-discovery scenario

A partnership researcher starts with a niche and location phrase such as `vegan bakery london`. The Actor searches public profile results, applies account and audience filters, deduplicates usernames across keyword pages, and returns a source-linked profile dataset. The researcher then enriches selected usernames and exports a focused outreach list.

### Quick start input

```json
{
  "keywords": ["fitness coach", "vegan bakery london"],
  "maxResultsPerKeyword": 20,
  "maxProviderPages": 3,
  "minimumFollowers": 1000,
  "accountType": "business",
  "includePrivateProfiles": false,
  "outputMode": "full"
}
````

Use `compact` output for core identity and matching fields, or `full` output for links and richer provenance.

### What data you receive

| Field | Meaning |
| --- | --- |
| `username`, `fullName`, `profileUrl` | Public profile identity |
| `biography`, `externalUrl`, `bioLinks` | Public profile text and links |
| `followerCount`, `mediaCount` | Public profile counts at collection time |
| `isVerified`, `isBusinessAccount`, `isProfessionalAccount` | Public account signals |
| `matchedKeyword`, `position` | Discovery query and result position |
| `provider`, `sourceEndpoint`, `runId`, `scrapedAt` | Provider and collection provenance |

```json
{
  "username": "example_creator",
  "fullName": "Example Creator",
  "profileUrl": "https://www.instagram.com/example_creator/",
  "biography": "Public creator biography",
  "followerCount": 12500,
  "mediaCount": 240,
  "isVerified": false,
  "isBusinessAccount": true,
  "matchedKeyword": "fitness coach",
  "position": 1,
  "provider": "scrapecreators",
  "sourceEndpoint": "/v1/instagram/search/profiles",
  "scrapedAt": "<ISO-8601 collection time>"
}
```

### Run through the Apify API

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~instagram-keyword-search-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["fitness coach"],"maxResultsPerKeyword":20,"accountType":"all","outputMode":"full"}'
```

Read the default dataset for profile records and the default key-value store for `OUTPUT` and `RUN_SUMMARY`.

### Use with AI agents through Apify MCP

Example prompt:

> Discover public Instagram profiles for these niche and location keywords. Return username, canonical profile URL, biography, public profile counts, business signals, matched keyword, provider, and collection time. Read the dataset and produce a focused shortlist with source provenance.

Give the agent keywords, filters, output mode, and a bounded per-keyword scope. Ask it to read the dataset, preserve `matchedKeyword`, `provider`, and `scrapedAt`, and report the outcome and Apify cost.

### Pricing

This Actor uses Pay per event plus Apify platform usage. A profile event is associated with a unique normalized profile saved to the dataset. Open the live Pricing tab for current billing details and use `maxResultsPerKeyword`, `maxProviderPages`, or Apify run cost controls to manage scope.

### Best results

Provide specific niche, profession, brand, or location phrases, use account filters that match the research brief, and choose `full` output when provenance and public links support the next step. Continue with the Instagram Profile Scraper for selected usernames that need deeper enrichment.

### Builder's note

I designed deduplication around the normalized username because the same public profile can appear for several keywords and provider pages. Saving one profile row while retaining the matched keyword gives agents a cleaner entity list and preserves why each profile entered the workflow.

### Responsible use

Collect public profile data you are authorized to access and follow applicable laws, Instagram terms, and relevant privacy and marketing requirements.

# Actor input Schema

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

Use this when you need public Instagram profiles matching a niche, brand, or local business phrase. Enter one or more phrases such as 'fitness coach' or 'vegan bakery london'. The actor searches each phrase independently and deduplicates matching profiles across the run. This is not a list of Instagram usernames, post URLs, or hashtags; use the dedicated profile, post, or hashtag actors for those jobs.

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

Use this when you need a predictable cap for each keyword and its billable profile rows. Enter an integer from 1 to 200; the default is 20. The actor stops after this many unique matching profiles for a keyword, subject to the provider's available public results. This is a per-keyword cap, not the total cap for the whole run.

## `maxProviderPages` (type: `integer`):

Use this advanced control to bound page requests for each keyword. Enter an integer from 1 to 20; the default is 3. Lower values are useful for inexpensive canaries and one-page discovery, while higher values can find more public matches. This limits provider requests rather than directly setting the number of saved profiles.

## `minimumFollowers` (type: `integer`):

Use this when only profiles with a minimum public follower count are relevant. Enter a whole number such as 1000; the default is 0 and keeps every returned profile. Profiles below the threshold are filtered before they are written or charged. This is not a verification, engagement-rate, or audience-quality filter.

## `accountType` (type: `string`):

Use this when you want all profiles, only business accounts, or only professional accounts reported by the public provider response. Choose all for no type filter; the default is all. A profile can satisfy more than one public account flag depending on Instagram metadata. This does not reveal private account information or guarantee an account's legal business status.

## `includePrivateProfiles` (type: `boolean`):

Use this when public search results may include private accounts and a limited identity row is still useful. Enable it to retain those matches or leave it off to exclude them; the default is off. Private profiles expose only the fields returned by the public provider. This setting does not bypass Instagram privacy controls or collect private posts.

## `outputMode` (type: `string`):

Use this when selecting concise agent-friendly records or fuller research records. Choose compact for core identity, bio, count, and matching fields, or full for link and provider provenance fields; the default is full. Both modes return one row per discovered public profile. This changes field breadth, not the provider's search coverage.

## Actor input object example

```json
{
  "keywords": [
    "fitness coach"
  ],
  "maxResultsPerKeyword": 20,
  "maxProviderPages": 3,
  "minimumFollowers": 0,
  "accountType": "all",
  "includePrivateProfiles": false,
  "outputMode": "full"
}
```

# Actor output Schema

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

No description

## `output` (type: `string`):

No description

## `runSummary` (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 = {
    "keywords": [
        "fitness coach"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/instagram-keyword-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 = { "keywords": ["fitness coach"] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Keyword Search Scraper",
        "description": "Discover public Instagram profiles from niche, brand, profession, or local-business keywords. Returns normalized usernames, bios, public audience signals, business flags, links, matched keywords, provider provenance, and collection time.",
        "version": "1.2",
        "x-build-id": "YfHYk7KBWIUOOlK7X"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~instagram-keyword-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-instagram-keyword-search-scraper",
                "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/khadinakbar~instagram-keyword-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-instagram-keyword-search-scraper",
                "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/khadinakbar~instagram-keyword-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-instagram-keyword-search-scraper",
                "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",
                "properties": {
                    "keywords": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "Use this when you need public Instagram profiles matching a niche, brand, or local business phrase. Enter one or more phrases such as 'fitness coach' or 'vegan bakery london'. The actor searches each phrase independently and deduplicates matching profiles across the run. This is not a list of Instagram usernames, post URLs, or hashtags; use the dedicated profile, post, or hashtag actors for those jobs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerKeyword": {
                        "title": "Maximum profiles per keyword",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Use this when you need a predictable cap for each keyword and its billable profile rows. Enter an integer from 1 to 200; the default is 20. The actor stops after this many unique matching profiles for a keyword, subject to the provider's available public results. This is a per-keyword cap, not the total cap for the whole run.",
                        "default": 20
                    },
                    "maxProviderPages": {
                        "title": "Maximum provider pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Use this advanced control to bound page requests for each keyword. Enter an integer from 1 to 20; the default is 3. Lower values are useful for inexpensive canaries and one-page discovery, while higher values can find more public matches. This limits provider requests rather than directly setting the number of saved profiles.",
                        "default": 3
                    },
                    "minimumFollowers": {
                        "title": "Minimum followers",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Use this when only profiles with a minimum public follower count are relevant. Enter a whole number such as 1000; the default is 0 and keeps every returned profile. Profiles below the threshold are filtered before they are written or charged. This is not a verification, engagement-rate, or audience-quality filter.",
                        "default": 0
                    },
                    "accountType": {
                        "title": "Account type filter",
                        "enum": [
                            "all",
                            "business",
                            "professional"
                        ],
                        "type": "string",
                        "description": "Use this when you want all profiles, only business accounts, or only professional accounts reported by the public provider response. Choose all for no type filter; the default is all. A profile can satisfy more than one public account flag depending on Instagram metadata. This does not reveal private account information or guarantee an account's legal business status.",
                        "default": "all"
                    },
                    "includePrivateProfiles": {
                        "title": "Include private-profile search matches",
                        "type": "boolean",
                        "description": "Use this when public search results may include private accounts and a limited identity row is still useful. Enable it to retain those matches or leave it off to exclude them; the default is off. Private profiles expose only the fields returned by the public provider. This setting does not bypass Instagram privacy controls or collect private posts.",
                        "default": false
                    },
                    "outputMode": {
                        "title": "Output mode",
                        "enum": [
                            "full",
                            "compact"
                        ],
                        "type": "string",
                        "description": "Use this when selecting concise agent-friendly records or fuller research records. Choose compact for core identity, bio, count, and matching fields, or full for link and provider provenance fields; the default is full. Both modes return one row per discovered public profile. This changes field breadth, not the provider's search coverage.",
                        "default": "full"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
