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

Export public Instagram popular-topic search results for keywords, including topics, reels, posts, profiles, hashtags, and per-query status.

- **URL**: https://apify.com/fetch_cat/instagram-search-scraper.md
- **Developed by:** [Fetch Cat](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 11 total users, 5 monthly users, 97.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 instagram search item saveds

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

Instagram Search Scraper exports links and visible metadata from public Instagram popular-topic pages for your keywords. Collect topic, reel, post, profile, hashtag and location records when exposed, then export JSON, CSV or Excel for topic research and social-listening workflows.

**Scope:** this is logged-out popular-topic discovery, not full Instagram search. It does not provide private data, authenticated search, exhaustive hashtag feeds, or business/place search. Availability and optional fields depend on what Instagram shows publicly.

### Quick start

1. Open the Actor in Apify Console and enter one or more keywords.
2. Start with a small result limit and review the dataset and `QUERY_STATUS` record.
3. Export useful rows or retrieve them through the API.

**Large batches:** before starting, set **Timeout to 900 seconds** in Apify **Run options**. The default is 300 seconds. A verified 185-keyword request needed more than five minutes and cannot complete at that default; use the longer timeout or split your keywords into smaller runs. Explicit caller and saved-task timeout settings still apply.

```json
{
  "keywords": ["travel"],
  "maxItems": 10,
  "maxItemsPerKeyword": 10
}
```

Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.

https://youtu.be/1OW8gOqlZbY?t=25

### Ready-to-run examples

Choose a public example to see its settings before starting a run:

- [Monitor Instagram skincare topic trends](https://apify.com/fetch_cat/instagram-search-scraper/examples/instagram-skincare-trend-monitor)
- [Instagram fitness reels search API example](https://apify.com/fetch_cat/instagram-search-scraper/examples/instagram-fitness-reels-search)
- [Instagram travel topic search scraper](https://apify.com/fetch_cat/instagram-search-scraper/examples/instagram-travel-topic-search)

### What you get

- **Topic research:** public topic titles, descriptions and visible counts, where available.
- **Creator discovery:** public profile links and creator hints alongside visible media cards.
- **Content discovery:** reel/post URLs, shortcodes, visible caption or accessibility text, hashtags and mentions.
- **Pipeline context:** source keyword, result type, collection timestamp and per-keyword status.

The result limit is a ceiling, not a promised number of records. `rank` is the Actor's output order within a keyword, not Instagram relevance or chronological order. Media, profile and topic records can be interleaved. No sorting or result-type filter is offered.

### Who is it for?

- **Content researchers** reviewing logged-out topic pages before inspecting source links.
- **Social-listening analysts** assembling limited keyword-linked media and topic samples.
- **Creator-research teams** qualifying visible profile hints at their original pages.
- **Data developers** retaining mixed record types and per-keyword outcomes in downstream reports.

### How you can use the data

- **Review a small travel-topic sample.** Use the existing travel keyword with explicit total and per-keyword caps. Keep sourceKeyword, resultType, URL and available text together rather than treating a topic row as a full post or profile record.
- **Compare two supported topics in your own report.** Use the existing travel/ceramic mugs recipe and preserve keyword context. Topic names are normalized rather than interpreted as arbitrary Boolean or full Instagram search expressions.
- **Separate mixed record types after export.** Topic, media, profile, hashtag and location records can be interleaved. Use resultType in your own analysis because the Actor offers no result-type filter or popularity sort. Rank is within-keyword output order rather than Instagram relevance or chronology.
- **Track your own observations with honest coverage.** Retain source URL, shortcode where available and collection time before joining later exports. Check QUERY_STATUS for empty, failed, skipped and pending topics. A successful saved row or absent best-effort status record does not establish every keyword completed.

### Input settings

| Setting | API key | Purpose |
| --- | --- | --- |
| Keywords / popular topics | `keywords` | Required list of topic keywords, such as `travel` or `ceramic mugs`. |
| Maximum items | `maxItems` | Maximum rows across the run. |
| Maximum items per keyword | `maxItemsPerKeyword` | Maximum rows for one keyword. |
| Attempts per keyword | `maxRetries` | Total attempts including the first. Default 3. |
| Browser locale | `locale` | Uses the first comma-separated locale value. |
| Proxy configuration | `proxyConfiguration` | Existing managed or custom proxy settings, or explicit no-proxy selection. See field help. |

For larger keyword batches, increase the run timeout in Apify run options (up to 900 seconds). The Actor honors that timeout with a 30-second shutdown reserve and an independent 15-minute ceiling measured from the original run start, including restarted runs. The default remains 300 seconds. Requests and retries are bounded; a longer timeout is not a guarantee that every topic is available. No keywords are silently truncated to fit the deadline; inspect `QUERY_STATUS` for each normalized keyword. No fixed maximum keyword count is advertised.

The Console/schema limits default to 20. Raw API inputs that omit both limits use 100 total and 100 per keyword. Keywords are normalized to lowercase hyphen-separated ASCII topic names. They are not arbitrary Instagram search expressions. At least one usable keyword is needed.

#### Example inputs

For a small multi-topic research batch:

```json
{
  "keywords": ["travel", "ceramic mugs"],
  "maxItems": 20,
  "maxItemsPerKeyword": 10,
  "locale": "en-US"
}
```

### Output data

The dataset contains only saved result rows with `queryStatus: "succeeded"`. Empty, failed and skipped keywords are described separately in the `QUERY_STATUS` key-value-store record, not as paid status rows in the dataset.

The following is a **shape-only illustration**, not a captured Instagram result:

```json
{
  "sourceKeyword": "travel",
  "queryStatus": "succeeded",
  "rank": 1,
  "resultType": "topic",
  "topicTitle": "travel",
  "topicSlug": "travel",
  "topicUrl": "https://www.instagram.com/popular/travel/",
  "topicDescription": null,
  "topicReelCount": null,
  "relatedTopics": [],
  "url": "https://www.instagram.com/popular/travel/",
  "shortcode": null,
  "username": null,
  "profileUrl": null,
  "captionText": null,
  "hashtags": [],
  "mentions": [],
  "viewCount": null,
  "playCount": null,
  "likeCount": null,
  "commentCount": null,
  "thumbnailUrls": [],
  "mediaUrls": [],
  "accessibilityText": null,
  "sourcePage": "https://www.instagram.com/popular/travel/",
  "scrapedAt": "2026-10-25T00:00:00.000Z"
}
```

| Fields | Meaning |
| --- | --- |
| `sourceKeyword`, `sourcePage`, `scrapedAt` | Normalized keyword, public source page and extraction time. |
| `queryStatus`, `rank`, `resultType` | Saved-row status, within-keyword output order and `topic`, `reel`, `post`, `profile`, `hashtag` or `location` type. |
| `url`, `shortcode` | Result URL and media shortcode where applicable. |
| `topicTitle`, `topicSlug`, `topicUrl`, `topicDescription`, `topicReelCount` | Available topic metadata. Counts are text-derived estimates. |
| `relatedTopics` | Related searches exposed on the source topic page. Empty when absent or for a related-topic record that was not fetched. |
| `username`, `profileUrl` | Profile identity or visible creator hint. Not a full profile lookup. |
| `captionText`, `hashtags`, `mentions`, `accessibilityText` | Visible card text and extracted text signals, not guaranteed complete captions. |
| `viewCount`, `playCount`, `likeCount`, `commentCount` | Optional visible counters. Null means unavailable, not zero. |
| `thumbnailUrls`, `mediaUrls` | Observed thumbnail images and public video URLs when supplied. If no video URL is exposed, media URLs fall back to the thumbnails. No files are downloaded. |

`QUERY_STATUS.statuses` lists `sourceKeyword`, `status`, `itemCount`, `error` and `sourcePage`. Its `summary` records saved/failed/skipped/completed/pending counts and pending keywords. A limit or charge budget can leave keywords skipped. Status persistence is best effort. A missing record is not proof that every keyword succeeded. Useful mixed-batch rows are preserved when another keyword fails. If every keyword fails without a successful or legitimate-empty outcome, the run fails.

#### Download your results

Open your run's dataset, choose **Export** and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.

See [Apify's download and export guide](https://docs.apify.com/storage/dataset#apify-console) for the available formats and field options.

### Pricing

Pay-per-event pricing uses a one-time `start` event and `item` for each saved dataset row. Empty or failed keyword outcomes do not create paid status-only dataset rows. The start event can still apply when later work returns no results or fails.

Per-result prices are reduced on every plan from 24 Nov 2026, with larger discounts on higher subscription plans; the start fee is unchanged. Until then, current rates apply.

Use small explicit total and per-keyword limits. See the live [Pricing tab](https://apify.com/fetch_cat/instagram-search-scraper/pricing) for current rates, the scheduled rates and discounts.

### Tips for best results

- **Start with one public topic and explicit small caps.** Raw API and Console/schema fallback limits differ.
- **Keep result type with source keyword.** Topic and profile hints are not full post or account lookups.
- **Preserve URL or shortcode for your own deduplication.** The Actor does not track changes across runs.
- **Leave missing captions and counters unknown.** Sparse metadata is not zero engagement or proof of privacy or deletion.
- **Inspect per-keyword outcomes and image freshness.** URLs can expire, and budget limits can leave topics skipped or pending.

### Limits and caveats

This is logged-out public popular-topic discovery rather than full Instagram search. There is no private data, authenticated search, arbitrary Boolean search, exhaustive hashtag feed or business/place search. Keywords become lowercase hyphen-separated ASCII topic names rather than general search expressions.

Instagram can throttle requests, show login or challenge pages, alter its pages or expose only sparse topic metadata. Higher caps do not unlock inaccessible content. Topics that Instagram explicitly marks unavailable return an empty result with a clear QUERY_STATUS reason. Login challenges, rate limits, timeouts and unrecognized empty pages remain failures. A successful empty result does not establish that richer search data is available or every query was accessible.

Useful mixed-batch rows survive another keyword's failure. If every keyword fails without a successful or legitimate-empty outcome, the run fails. QUERY_STATUS holds best-effort outcome and pending information separately from the paid dataset, and a limit or charge budget can skip keywords. Missing status persistence is not proof of completion.

Optional counters can be null, full captions are included when exposed in the public page data, and visible creator hints are not full profiles. Related topics are populated for the fetched source topic when Instagram exposes them; other records retain an empty array. Media URLs include public video links when Instagram supplies them, otherwise thumbnail links. No files are downloaded. Sort, type filtering, historical comparisons and alerts require your own downstream work.

### Automation and integrations

#### Save your settings for next time

Once you have an input that works for you, [save it as an Apify task](https://docs.apify.com/actors/running/tasks). This keeps your settings together so you can use them again without filling in the form from scratch.

#### Run on a schedule

Need fresh results regularly? You can [schedule the Actor or a saved task](https://docs.apify.com/actors/running/schedules) to run at a time that suits you.

Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.

#### Send results to your other tools

Use **n8n, Make or Zapier** to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the [Apify integration guides](https://docs.apify.com/integrations) for your chosen tool.

For a custom connection, an [Apify webhook](https://docs.apify.com/integrations/webhooks) can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.

### API usage

Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.

The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its `defaultDatasetId` to fetch the results.

For setup instructions, see Apify's [JavaScript client guide](https://docs.apify.com/api/client/js), [Python client guide](https://docs.apify.com/api/client/python) and [Actor runs API reference](https://docs.apify.com/api/v2/acts-runs-post).

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~instagram-search-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  --data @- <<'JSON'
{
  "keywords": [
    "travel"
  ],
  "maxItems": 10,
  "maxItemsPerKeyword": 10
}
JSON
```

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/instagram-search-scraper').call({
  "keywords": [
    "travel"
  ],
  "maxItems": 10,
  "maxItemsPerKeyword": 10
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/instagram-search-scraper').call(run_input={'keywords': ['travel'], 'maxItems': 10, 'maxItemsPerKeyword': 10})
print(client.dataset(run['defaultDatasetId']).list_items().items)
```

#### API and AI-agent usage notes

Use the same bounded JSON input from Console, the [Apify API](https://docs.apify.com/api/v2), or your integrations. Retrieve the run's default dataset after completion, and inspect `QUERY_STATUS` separately when keyword-level diagnostics matter.

This starts an asynchronous run. After it completes, use its `defaultDatasetId` to download results through the datasets API.

### MCP and AI agents

You can ask your AI assistant to collect data with **Instagram Popular Search Scraper** and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.

Connect your assistant through the [Apify MCP server](https://mcp.apify.com/). MCP gives your assistant a way to find this scraper, run it and read the results. Follow the [official setup and sign-in guide](https://docs.apify.com/mcp) for your app.

#### Easier setup with an Apify plugin

If you use a supported coding assistant, the [official Apify plugin](https://docs.apify.com/agents/plugins) can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.

#### Use Apify AI in Console

Prefer to keep everything in Apify? Open [Apify AI in Console](https://docs.apify.com/account/apify-ai) and ask it to find Fetch Cat's **Instagram Popular Search Scraper**. You can describe the data you want and ask questions about the results.

Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.

#### Choose your assistant

- **Claude and Claude Code (Anthropic):** [Apify setup guide](https://docs.apify.com/integrations/claude).
- **ChatGPT and Codex (OpenAI):** [Apify setup guides](https://docs.apify.com/integrations/openai).
- **Grok Bot (xAI):** [Apify plugin guide](https://docs.apify.com/integrations/grok-bot).
- **Gemini CLI (Google):** [MCP server setup guide](https://geminicli.com/docs/tools/mcp-server/). Use the server URL below with the HTTP configuration supported by Gemini CLI.

#### Connect just this scraper

To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=fetch_cat/instagram-search-scraper"
    }
  }
}
```

Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.

#### Use Apify's general server

Already connected to the general Apify MCP server at `https://mcp.apify.com`? You can use it to find this scraper without adding another server. Ask your assistant to use **Instagram Popular Search Scraper** by Fetch Cat, or give it the identifier `fetch_cat/instagram-search-scraper`.

Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.

#### Example requests

- “Use Fetch Cat’s Instagram Search Scraper to collect up to 5 public popular-topic results for travel, with both total and per-keyword caps set to 5. Show actual record types and source links without claiming full Instagram search coverage.”
- “Collect up to 6 results in total for travel and ceramic mugs, capped at 3 per keyword. Keep keyword context and QUERY_STATUS outcomes, leaving absent counters unknown rather than assuming all topics completed.”
- “Retrieve up to 5 travel-topic records with both caps set to 5. Make a review table of visible text, profile hints and thumbnail links, separating record types yourself without claiming full captions, profiles or video downloads.”

Normal Apify charges apply. Check the [live Pricing tab](https://apify.com/fetch_cat/instagram-search-scraper/pricing) before asking your assistant to run a larger batch.

### Pay with x402

If your AI agent has a funded wallet, it can pay for Apify usage through [x402](https://docs.apify.com/integrations/x402). This experimental option lets an agent use Apify without a conventional account.

[Apify AGI](https://agi.apify.com/) provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.

Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.

Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.

#### Other ways for agents to pay

Apify also supports **MPP** for prepaid access through AGI and **Skyfire** for eligible Actors. If your agent already uses one of these, see the [agentic payment guide](https://docs.apify.com/agents/payments) to choose the right setup.

### FAQ

#### Is this an Instagram search API alternative?

It provides an Apify API for public popular-topic discovery only. It is not Instagram's official API and does not support full blended search, Boolean expressions or authenticated search modes.

#### Can I export Instagram search data to CSV or Excel?

Yes. Download the default dataset as CSV, Excel or JSON, or retrieve it with the API. Optional fields remain empty when Instagram does not expose them.

#### Why are there fewer results or no results?

The public page may contain few usable records, return no matches or be inaccessible. Check the run outcome and `QUERY_STATUS`. Raising limits cannot guarantee more data. An access failure alone does not identify a private or deleted target.

#### Does it require Instagram login?

No. The Actor uses logged-out public pages and accepts no Instagram login credentials.

### Related Actors

- [Instagram Profile & Posts Scraper](https://apify.com/fetch_cat/instagram-profile-posts-scraper) — start from known profiles.
- [Instagram Reel Scraper](https://apify.com/fetch_cat/instagram-reel-scraper) — collect available public video metadata from known Reel URLs.
- [Instagram Post Details Scraper](https://apify.com/fetch_cat/instagram-post-details-scraper) — inspect known post URLs.
- [Instagram Hashtag Scraper](https://apify.com/fetch_cat/instagram-hashtag-scraper) — research hashtags.
- [Instagram Comments Scraper](https://apify.com/fetch_cat/instagram-comments-scraper) — collect visible comments.

### Support and feedback

For custom additions or integrations, email <hello@fetchcat.dev>.

Found an error or have a feature request? [Open an issue](https://apify.com/fetch_cat/instagram-search-scraper/issues) with the run URL, a non-sensitive input example and what you expected.

Need help sharing it? See [Apify’s guide to sharing a run when reporting an issue](https://docs.apify.com/account/collaboration/general-resource-access#automatically-sharing-runs-via-actor-issues). Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.

Tried this scraper? We'd love to hear how it worked for you. [Leave a review](https://apify.com/fetch_cat/instagram-search-scraper/reviews) to help others choose the right tool and help us improve it. Your feedback means a lot to us.

Made with care for curious people, AI agents and the possibilities in data. ♥

# Changelog

This Actor's version history is a separate document: https://apify.com/fetch_cat/instagram-search-scraper/changelog.md

# Actor input Schema

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

Enter public popular-topic keywords, for example travel or ceramic mugs. Keywords are lowercased, a leading # is removed, and non-ASCII letters or punctuation become hyphens. Empty normalized values are ignored; at least one usable keyword is required. This is not full Instagram search.

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

Maximum dataset rows across all keywords. Console/schema default is 20; raw API inputs omitting this value use 100. This is a limit, not a guarantee of results.

## `maxItemsPerKeyword` (type: `integer`):

Maximum rows for each keyword, also bounded by the total limit. Console/schema default is 20; raw API omission uses maxItems.

## `maxRetries` (type: `integer`):

Total attempts including the first, not additional retries. Default 3. Rate limits, server errors and detected challenges may be retried; ordinary HTTP 4xx responses are not retried.

## `locale` (type: `string`):

Browser locale uses the first comma-separated value. For example en-US,en;q=0.9 selects en-US. If omitted from raw API input the browser locale is en-US.

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

Existing proxy settings are used from the first request; there is no automatic direct-to-proxy fallback. The schema default enables Apify Proxy, while the form prefill selects no proxy. An omitted raw API value asks the SDK for its default managed configuration in cloud runs. Explicit useApifyProxy:false without proxyUrls disables the proxy; custom proxyUrls are forwarded unchanged even with that switch false. Existing managed groups/country settings are preserved; choose only groups your account can access. Invalid or unsupported settings are rejected, not converted to a paid default.

## Actor input object example

```json
{
  "keywords": [
    "travel"
  ],
  "maxItems": 20,
  "maxItemsPerKeyword": 20,
  "maxRetries": 3,
  "locale": "en-US,en;q=0.9",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `queryStatus` (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": [
        "travel"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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