# Instagram Keyword, Trends and Reels Scraper (`s-r/instagram-keyword-trends`) Actor

Scrape Instagram keyword search volume, related keywords, trending topics, reels with likes and comments, profile stats and location data. No login required.

- **URL**: https://apify.com/s-r/instagram-keyword-trends.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.40 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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 Scraper: Keywords, Trends and Reels

An Instagram scraper that returns keyword search volume, related keywords,
trending topics and reels with engagement data. It reads only Instagram's
public pages and never signs in, so there is no login, no session cookie and no
account to get restricted.

Most Instagram scrapers hand you posts. This one also tells you what people are
actually searching for on Instagram, how much volume a term carries, and which
terms sit next to it, which is the part that usually requires guesswork.

### What you get

- **Profile lookups by username**: exact follower count (268,996,171, not
  "269M"), exact post count, verified badge, profile picture, whether a public
  story is live, and the account's most recent posts with full engagement.
- **Keyword search volume** per term, as Instagram reports it (`37M reels` for
  `laptop`), returned both as displayed text and as a parsed integer.
- **Up to 30 related keywords per term**, taken from Instagram's own related
  links rather than inferred. Each one is itself a valid term you can crawl.
- **Automatic keyword expansion** up to three levels deep, so one seed can
  produce hundreds of real Instagram search terms.
- **Up to 12 reels per keyword**, each returned complete with views, caption,
  owner and download links, at no extra request.
- **Reel engagement**: exact like counts (not the rounded `592K` the page
  shows), total comment count, view counts, caption, hashtags, mentions and
  post date.
- **Comments** on each reel: author, user id, verified badge, text, like count,
  reply linkage and timestamp. No login involved.
- **Direct download URLs**: MP4 video links in every available quality, plus
  full-size images, thumbnails and the creator's profile picture.
- **Reel metadata**: duration, dimensions, audio flag, music title and artist,
  tagged users and location when published.
- **72 trending terms with EXACT volumes** from Instagram's trending page
  (`nails` = 1,311,706,685, not "1.3B"), each with rank, thumbnail and a
  featured reel. Plus 12 ranked trending creators and Instagram's own 12-category
  browse taxonomy.
- **Creator follower counts and engagement rate** on every reel, so you can rank
  creators by performance rather than raw audience size.
- **Audio track** title, artist, and whether it is original audio.
- **Profile stats** for any username: followers, following, post count,
  display name.
- **Location data** for any Instagram location ID: name, latitude, longitude
  and total tagged posts.

### Why scrape Instagram keywords instead of hashtags

Hashtag tools tell you how many posts carry a tag. That is a supply number: how
many people published something. It says nothing about how many people went
looking. Instagram's own popular-search pages expose the demand side, which is
why the same term can look enormous as a hashtag and thin as a search.

The related-keyword links are the more valuable half. Instagram publishes, for
each term, the terms it considers adjacent, in real user phrasing rather than
compressed hashtag form. `laptop` leads to `how to screenshot on a laptop`,
`crochet laptop sleeve for men` and `como dividir pantalla en laptop`. Those are
content briefs and ad-targeting seeds, and they are phrases no hashtag
generator would produce because nobody tags a post `#comodividirpantallaenlaptop`.

Because every related term is a real page, the graph can be walked. Set the
expansion depth and one seed becomes a map of a niche as Instagram itself
organises it, with a volume figure attached to each node.

### Input

Pick what kind of input you have, then paste it. Instagram URLs are always
detected automatically, whatever type is selected.

| Search type | What you give it | What you get back |
|---|---|---|
| **Keyword** | `laptop` | Search volume, 30 related keywords, up to 12 reels |
| **Profile** | `natgeo` or `@natgeo` | Exact follower / post counts, plus the account's recent posts |
| **URL** | any post, reel or profile link | The item behind the link, fully enriched |
| **Location** | `212988663` | Name, coordinates, total tagged posts |
| **Trending** | nothing | 72 trending terms with exact volumes, 12 creators, 12 categories |

You can mix them in one run. Passing `["laptop", "@natgeo",
"https://www.instagram.com/reel/DVdFk_9jCan/", "212988663"]` works and returns
all four kinds of row.

#### All fields

| Field | Type | Default | Description |
|---|---|---|---|
| `searchType` | select | `keyword` | Which of the five input kinds you are giving. |
| `search` | array | `["laptop"]` | **Required.** The terms, usernames, URLs or IDs. |
| `mode` | select | `both` | `keywords`, `reels`, or `both`. |
| `expandRelated` | integer 0–3 | `1` | Levels of related-keyword expansion. |
| `maxKeywords` | integer | `25` | Cap on keyword pages fetched. |
| `maxReels` | integer | `50` | Cap on reel rows. |
| `maxPostsPerProfile` | integer | `12` | Cap on posts returned per profile. |
| `enrichReels` | boolean | `true` | Fetch each reel's page for exact counts and comments. |
| `includeCreatorStats` | boolean | `true` | Add follower count, engagement rate, audio and duration. |
| `includeComments` | boolean | `true` | Attach comments to each reel row. |
| `maxComments` | integer | `30` | Cap on comments per reel. |
| `expandRelatedTopics` | boolean | `true` | Also follow per-reel related-topic links. |
| `includeTrending` | boolean | `false` | Also return Instagram's trending page. |
| `seedFromTrending` | boolean | `false` | Also crawl Instagram's trending terms. |
| `maxSeedTerms` | integer | `10` | How many trending terms to seed from. |
| `concurrency` | integer 1–16 | `8` | Parallel requests. |

The older `queries`, `profiles` and `locationIds` fields still work for saved
tasks, and now auto-detect what you put in them.

### Output

Rows are mixed and discriminated by `record_type`. A keyword row:

```json
{
  "record_type": "keyword",
  "keyword": "laptop",
  "display_name": "Laptop",
  "url": "https://www.instagram.com/popular/laptop/",
  "reels_volume_text": "37M",
  "reels_volume": 37000000,
  "related_keywords": ["how to screenshot on a laptop", "castle laptop", "..."],
  "related_keyword_count": 30,
  "top_reel_shortcodes": ["DVdFk_9jCan", "..."],
  "top_reel_count": 12,
  "top_creators": ["techburner", "9gag", "..."],
  "depth": 0
}
````

A reel row:

```json
{
  "record_type": "reel",
  "shortcode": "DVdFk_9jCan",
  "url": "https://www.instagram.com/reel/DVdFk_9jCan/",
  "source_keyword": "laptop",
  "owner_username": "hxzrshk",
  "owner_full_name": "HXZRSH STUDIO",
  "owner_is_verified": false,
  "owner_profile_pic_url": "https://scontent.cdninstagram.com/...jpg",
  "caption": "Dark.",
  "hashtags": [],
  "mentions": [],
  "likes": 591947,
  "comments_count": 2004,
  "views": 3275442,
  "video_url": "https://instagram.fnbo10-1.fna.fbcdn.net/o1/v/t2/...mp4",
  "video_urls": ["...", "...", "..."],
  "image_url": "https://instagram.fnbo10-1.fna.fbcdn.net/v/t51...jpg",
  "width": 720,
  "height": 1280,
  "has_audio": true,
  "product_type": "clips",
  "related_topics": ["oled laptop", "gaming setup", "rgb keyboard"],
  "posted_at": "2026-03-04T07:46:38Z",
  "comments_returned": 14,
  "comments": [
    {
      "username": "zyvrenl.24",
      "user_id": "57646758540",
      "user_is_verified": false,
      "text": "Legion pro pro 7 btw",
      "likes": 0,
      "is_reply": false,
      "created_at": "2026-07-18T04:45:42Z"
    }
  ],
  "enriched": true
}
```

Profile rows carry `followers`, `following`, `posts_count` and `full_name`.
Location rows carry `name`, `latitude`, `longitude` and `media_count`.
Trending rows carry `topic`, `rank`, an exact `media_count`, `thumbnail_url` and
`featured_reel_shortcode`. Category rows carry `category`, `keyword` and
`media_count`.

### Use cases

**Content planning for social teams.** Pick the topic you publish about, expand
two levels, and sort by `reels_volume`. You get a ranked list of what Instagram
users search in that niche, phrased the way they phrase it. The related
keywords double as video titles, because they are already questions and
qualifiers rather than compressed tags.

**Instagram trends monitoring.** Run the trending topics daily with a scheduled
task and diff the output. Topics enter and leave Instagram's trending page
faster than they enter general search trend tools, and each one links to a
keyword page with its own volume and reels, so you can go from "this is
spiking" to "here is who is winning it" in one run.

**Influencer and creator discovery.** Every keyword page returns the creators
Instagram ranks for that term, and every reel carries its creator's follower
count and engagement rate. That lets you sort a niche by performance instead of
audience size, which is how you find the 2,776-follower account whose reel did
591,000 likes. `went_viral` flags exactly those cases.

**Ad copy and targeting research.** The related-keyword graph is phrase-level
demand data for a platform that does not publish a keyword planner. Paid social
teams use it to write hooks in the audience's own words and to find adjacent
interests worth testing, at a fraction of what a managed Instagram data API
charges per record.

### How it compares

| | This actor | apify/instagram-scraper | apify/instagram-hashtag-analytics-scraper |
|---|---|---|---|
| Price per 1k results | **$1.40** | $2.70 | $2.30 |
| Actor start fee | none | none | $0.001 |
| Search-phrase volume | yes | no | no |
| Hashtag post counts | no | no | yes |
| Related terms | search phrases | no | related hashtags |
| Multi-level expansion | yes, up to 3 | no | no |
| Trending topics | yes | no | no |
| Reels with engagement | yes | yes | top/latest posts as add-ons |
| Comments included | yes, in the reel row | separate actor | no |
| Video download URLs | yes, included | $0.02/reel add-on | no |
| View counts | yes | yes | no |
| Profile stats | yes | yes | no |
| Location metadata | yes | yes | no |
| Full post history per profile | no | yes | no |
| Comment threads | no | yes | no |

Being straightforward about the overlap. If you want hashtag metrics, Apify's
hashtag analytics actor gives post counts, posts per day and related hashtags,
and it does that well. The difference is which namespace you are measuring:
hashtags are what publishers tagged, search phrases are what users typed. This
actor reports the search side, in full phrases like `how to screenshot on a
laptop` rather than tags, and lets you walk that graph outward several levels.

If you need a profile's complete post history, apify/instagram-scraper does
that and this one does not. Note the add-on pricing though: Apify's reel scraper
charges $0.02 per reel for a video download link and runs a separate actor for
comments. Here both are part of the row you already paid for. At $1.40 per 1k
this runs below both, with no start fee.

### Pricing

$0.0014 per result, which is $1.40 per 1,000 rows. Every row bills the same
regardless of type, so cost is predictable from row count alone. All pricing is
pay-per-event, you only pay for results you receive. No actor-start fee, no
per-compute-unit charges.

### Limits and gotchas

- **Volume counts reels, not all posts.** `37M reels` is a reels figure.
  Treat it as relative demand between terms, not as a total post count.
- **Terms are traversed, not guessed.** Instagram only builds a popular-search
  page for terms it has indexed, so an invented phrase returns nothing. Seed
  with a common head term and use `expandRelated` to reach the long tail, or
  switch on `seedFromTrending` to start from terms Instagram itself is
  promoting. Even those are not universally live: a very fresh news term can be
  listed on the trending page before its own page exists. When a seed has no
  page, the run reports it in `errors` and continues.
- **Like counts are exact.** They come from Instagram's embedded data
  (`591947`), not the rounded `592K` on the page. In the rare case only the
  rounded figure is available, the row sets `likes_are_approximate: true`.
- **Comments are a sample, not the full thread.** Instagram serves roughly 12
  to 15 top-level comments per reel without a login. `comments_count` gives the
  true total; `comments_returned` tells you how many you got. Raising
  `maxComments` past what Instagram serves changes nothing.
- **Download URLs expire.** Instagram signs its CDN links, so `video_url` and
  `image_url` are valid for hours, not indefinitely. Fetch the media promptly
  or re-run for fresh links.
- **Enrichment costs one request per reel.** With it off you still get views,
  captions, owner details and download URLs, because those come inlined with
  the keyword page. Only exact like counts, comment totals and the comments
  themselves need the extra request.
- **Long-tail terms return fewer related keywords.** Head terms give 30,
  niche terms give as few as 3. That is the graph thinning out, not an error.
- **Volume is mostly a head-term figure.** Instagram publishes a reels count
  for popular terms but usually omits it on long-tail ones, so expanded
  keywords often have `reels_volume: null`. Their related links and reels are
  unaffected.
- **No login means no private data.** Private accounts, stories, follower
  lists and comment threads are all out of reach by design.
- **Engagement rate is uncapped and can exceed 100%.** It is likes divided by
  the creator's followers. A reel that escapes its creator's audience will read
  in the thousands of percent (591,953 likes against 2,776 followers is 21,323%).
  That is real signal, not a bug. Use `like_to_view_rate` when you want a
  measure that does not depend on audience size.
- **Exact volumes come from the trending page, not term pages.** Term pages show
  a rounded figure in their title ("262M"); the trending page publishes the exact
  integer (262,052,087) for the terms it lists.
- **Profile mode returns recent posts, not full history.** Instagram publishes
  the 6 most recent posts per account without a login, so an account with 800
  posts still returns 6. `posts_count` gives the true total. To go deeper, pass
  specific post URLs directly.
- **Free Apify plans are capped at 10 rows per run.** Paid plans are uncapped.

### FAQ

**Can I scrape Instagram without logging in?**
Yes. This actor only reads pages Instagram serves publicly, so no credentials
are used or stored, and nothing you own can be rate-limited or restricted.

**How do I do Instagram keyword research?**
Seed a term you care about, set `expandRelated` to 1 or 2, and sort the keyword
rows by `reels_volume`. You get real Instagram search terms with volume
attached, which is the closest equivalent to a keyword planner Instagram has.

**Is this an Instagram hashtag generator?**
Not exactly, and it is more useful for planning. It returns search phrases
rather than tags. Hashtags found in reel captions are extracted into the
`hashtags` field, so you get real tags in use as a by-product.

**How do I find Instagram trends?**
Set `includeTrending` to true. You get Instagram's current trending topics with
rankings, and each topic is a keyword you can then expand for volume and reels.

**How accurate are the follower and like counts?**
They come from Instagram's own pages but are abbreviated above 1,000, so `269M`
becomes `269000000`. Use them for ranking and comparison rather than as exact
figures.

**Can I download Instagram reels and videos with this?**
Yes. Every reel row carries `video_url` with a direct MP4 link in the highest
available quality, plus `video_urls` for the other renditions and `image_url`
for the still. The links are Instagram's own signed CDN URLs, so download
promptly, they expire after a few hours.

**Can I scrape Instagram comments without logging in?**
Yes. Each reel row includes a `comments` array with author, user id, verified
badge, text, like count, reply linkage and timestamp. Instagram serves roughly
12 to 15 top-level comments per reel publicly, and `comments_count` tells you
the true total.

**Can I scrape all posts from an Instagram account?**
You get the account's exact follower and post counts plus its 6 most recent
posts, which is what Instagram publishes without a login. Each post comes fully
enriched with likes, comments, views and download links. For older posts, pass
their URLs directly using the URL input type.

**Can I get an Instagram creator's follower count and engagement rate?**
Yes. Every reel row includes `owner_followers`, `engagement_rate` (likes over
followers) and `like_to_view_rate` (likes over views), plus a `went_viral` flag
when a reel outperformed its creator's audience.

**What is an Instagram location ID and where do I find one?**
It is the number in an `instagram.com/explore/locations/<id>/` URL. Pass it in
`locationIds` to get the name, coordinates and total tagged post count.

# Actor input Schema

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

Pick the kind of input you have. Keyword searches Instagram's public search terms. Profile takes usernames and returns the account plus its recent posts. URL accepts any Instagram post, reel or profile link. Location takes location IDs. Trending ignores your input and reads Instagram's trending page.

## `search` (type: `array`):

What to look up, matching the type above. Terms like 'laptop', usernames like 'natgeo' or '@natgeo', full Instagram URLs, or numeric location IDs. Instagram URLs are always detected automatically, whatever type is selected.

## `maxPostsPerProfile` (type: `integer`):

How many of each profile's posts to return. Instagram publishes the 6 most recent without a login, so higher values return whatever is available.

## `queries` (type: `array`):

Legacy field, still supported. Prefer the Search input above. Accepts terms, usernames, URLs or location IDs and detects each automatically.

## `mode` (type: `string`):

Return keyword rows (search volume plus related keywords), reel rows (individual reels with engagement), or both.

## `expandRelated` (type: `integer`):

How many levels to follow Instagram's own related-keyword links outward from each seed. 0 returns only the seeds. 1 typically yields around 30 keywords per seed. Higher depths grow quickly, so pair with Max keywords.

## `maxKeywords` (type: `integer`):

Hard cap on how many keyword pages the run fetches, including expanded ones.

## `maxReels` (type: `integer`):

Hard cap on reel rows. Each keyword page lists up to 12 reels.

## `enrichReels` (type: `boolean`):

Fetch each reel's own page to add its exact like count, total comment count and the comments themselves. Views, captions, owner details and download URLs are returned either way. Turn off for a much faster run.

## `includeComments` (type: `boolean`):

Attach comments to each reel row, with author, text, like count, timestamp and reply linkage. Requires Enrich reels. Comments are nested in the reel row, so they cost no extra results.

## `maxComments` (type: `integer`):

Upper bound on comments attached to each reel. Instagram serves roughly 12 to 15 per reel without logging in, so higher values simply return whatever is available.

## `expandRelatedTopics` (type: `boolean`):

Also follow the related-topic links attached to individual reels, not just the related keywords listed on the term page. Widens keyword discovery considerably.

## `includeTrending` (type: `boolean`):

Also return what Instagram is currently surfacing on its public trending page, independent of your search terms.

## `profiles` (type: `array`):

Legacy field, still supported. Usernames to fetch as profile rows with their recent posts.

## `locationIds` (type: `array`):

Optional Instagram location IDs. Returns name, latitude, longitude and total post count. The ID is the number in an instagram.com/explore/locations/<id>/ URL.

## `concurrency` (type: `integer`):

Parallel requests against Instagram. Raise carefully; too high increases the rate of throttled responses.

## `includeCreatorStats` (type: `boolean`):

Fetch each reel's lightweight embed page to add the creator's follower count, engagement rate, audio track title and artist, and video duration. Roughly seven times smaller than the full reel page.

## `seedFromTrending` (type: `boolean`):

Also crawl the terms Instagram is currently promoting, on top of your own. Most of them have pages, so they are far better seeds than guessed terms, though a few very fresh news terms do not render yet. Useful for discovery when you do not know what to search for.

## `maxSeedTerms` (type: `integer`):

How many trending terms to use as crawl seeds when seeding from trending is on.

## Actor input object example

```json
{
  "searchType": "keyword",
  "search": [
    "laptop",
    "@natgeo",
    "https://www.instagram.com/reel/DVdFk_9jCan/"
  ],
  "maxPostsPerProfile": 12,
  "queries": [
    "laptop",
    "coffee shop aesthetic"
  ],
  "mode": "both",
  "expandRelated": 1,
  "maxKeywords": 25,
  "maxReels": 50,
  "enrichReels": true,
  "includeComments": true,
  "maxComments": 30,
  "expandRelatedTopics": true,
  "includeTrending": false,
  "profiles": [
    "natgeo"
  ],
  "locationIds": [
    "212988663"
  ],
  "concurrency": 8,
  "includeCreatorStats": true,
  "seedFromTrending": false,
  "maxSeedTerms": 10
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "search": [
        "laptop"
    ],
    "maxPostsPerProfile": 12,
    "queries": [],
    "expandRelated": 1,
    "maxKeywords": 25,
    "maxReels": 50,
    "maxComments": 30,
    "profiles": [],
    "locationIds": [],
    "concurrency": 8,
    "maxSeedTerms": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/instagram-keyword-trends").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "search": ["laptop"],
    "maxPostsPerProfile": 12,
    "queries": [],
    "expandRelated": 1,
    "maxKeywords": 25,
    "maxReels": 50,
    "maxComments": 30,
    "profiles": [],
    "locationIds": [],
    "concurrency": 8,
    "maxSeedTerms": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/instagram-keyword-trends").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 '{
  "search": [
    "laptop"
  ],
  "maxPostsPerProfile": 12,
  "queries": [],
  "expandRelated": 1,
  "maxKeywords": 25,
  "maxReels": 50,
  "maxComments": 30,
  "profiles": [],
  "locationIds": [],
  "concurrency": 8,
  "maxSeedTerms": 10
}' |
apify call s-r/instagram-keyword-trends --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Keyword, Trends and Reels Scraper",
        "description": "Scrape Instagram keyword search volume, related keywords, trending topics, reels with likes and comments, profile stats and location data. No login required.",
        "version": "0.1",
        "x-build-id": "KmC9SrzFCb70zLYQu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/s-r~instagram-keyword-trends/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-s-r-instagram-keyword-trends",
                "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/s-r~instagram-keyword-trends/runs": {
            "post": {
                "operationId": "runs-sync-s-r-instagram-keyword-trends",
                "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/s-r~instagram-keyword-trends/run-sync": {
            "post": {
                "operationId": "run-sync-s-r-instagram-keyword-trends",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "search"
                ],
                "properties": {
                    "searchType": {
                        "title": "What are you searching for?",
                        "enum": [
                            "keyword",
                            "profile",
                            "url",
                            "location",
                            "trending"
                        ],
                        "type": "string",
                        "description": "Pick the kind of input you have. Keyword searches Instagram's public search terms. Profile takes usernames and returns the account plus its recent posts. URL accepts any Instagram post, reel or profile link. Location takes location IDs. Trending ignores your input and reads Instagram's trending page.",
                        "default": "keyword"
                    },
                    "search": {
                        "title": "Search input",
                        "type": "array",
                        "description": "What to look up, matching the type above. Terms like 'laptop', usernames like 'natgeo' or '@natgeo', full Instagram URLs, or numeric location IDs. Instagram URLs are always detected automatically, whatever type is selected.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPostsPerProfile": {
                        "title": "Max posts per profile",
                        "minimum": 0,
                        "maximum": 200,
                        "type": "integer",
                        "description": "How many of each profile's posts to return. Instagram publishes the 6 most recent without a login, so higher values return whatever is available.",
                        "default": 12
                    },
                    "queries": {
                        "title": "Search terms (advanced)",
                        "type": "array",
                        "description": "Legacy field, still supported. Prefer the Search input above. Accepts terms, usernames, URLs or location IDs and detects each automatically.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "What to return",
                        "enum": [
                            "both",
                            "keywords",
                            "reels"
                        ],
                        "type": "string",
                        "description": "Return keyword rows (search volume plus related keywords), reel rows (individual reels with engagement), or both.",
                        "default": "both"
                    },
                    "expandRelated": {
                        "title": "Expand related keywords (depth)",
                        "minimum": 0,
                        "maximum": 3,
                        "type": "integer",
                        "description": "How many levels to follow Instagram's own related-keyword links outward from each seed. 0 returns only the seeds. 1 typically yields around 30 keywords per seed. Higher depths grow quickly, so pair with Max keywords.",
                        "default": 1
                    },
                    "maxKeywords": {
                        "title": "Max keywords",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Hard cap on how many keyword pages the run fetches, including expanded ones.",
                        "default": 25
                    },
                    "maxReels": {
                        "title": "Max reels",
                        "minimum": 0,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Hard cap on reel rows. Each keyword page lists up to 12 reels.",
                        "default": 50
                    },
                    "enrichReels": {
                        "title": "Enrich reels with exact counts and comments",
                        "type": "boolean",
                        "description": "Fetch each reel's own page to add its exact like count, total comment count and the comments themselves. Views, captions, owner details and download URLs are returned either way. Turn off for a much faster run.",
                        "default": true
                    },
                    "includeComments": {
                        "title": "Include comments",
                        "type": "boolean",
                        "description": "Attach comments to each reel row, with author, text, like count, timestamp and reply linkage. Requires Enrich reels. Comments are nested in the reel row, so they cost no extra results.",
                        "default": true
                    },
                    "maxComments": {
                        "title": "Max comments per reel",
                        "minimum": 0,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Upper bound on comments attached to each reel. Instagram serves roughly 12 to 15 per reel without logging in, so higher values simply return whatever is available.",
                        "default": 30
                    },
                    "expandRelatedTopics": {
                        "title": "Expand related topics too",
                        "type": "boolean",
                        "description": "Also follow the related-topic links attached to individual reels, not just the related keywords listed on the term page. Widens keyword discovery considerably.",
                        "default": true
                    },
                    "includeTrending": {
                        "title": "Include global trending topics",
                        "type": "boolean",
                        "description": "Also return what Instagram is currently surfacing on its public trending page, independent of your search terms.",
                        "default": false
                    },
                    "profiles": {
                        "title": "Profiles (advanced)",
                        "type": "array",
                        "description": "Legacy field, still supported. Usernames to fetch as profile rows with their recent posts.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "locationIds": {
                        "title": "Location IDs (advanced)",
                        "type": "array",
                        "description": "Optional Instagram location IDs. Returns name, latitude, longitude and total post count. The ID is the number in an instagram.com/explore/locations/<id>/ URL.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "concurrency": {
                        "title": "Concurrent requests",
                        "minimum": 1,
                        "maximum": 16,
                        "type": "integer",
                        "description": "Parallel requests against Instagram. Raise carefully; too high increases the rate of throttled responses.",
                        "default": 8
                    },
                    "includeCreatorStats": {
                        "title": "Include creator follower counts and audio",
                        "type": "boolean",
                        "description": "Fetch each reel's lightweight embed page to add the creator's follower count, engagement rate, audio track title and artist, and video duration. Roughly seven times smaller than the full reel page.",
                        "default": true
                    },
                    "seedFromTrending": {
                        "title": "Seed from Instagram's trending terms",
                        "type": "boolean",
                        "description": "Also crawl the terms Instagram is currently promoting, on top of your own. Most of them have pages, so they are far better seeds than guessed terms, though a few very fresh news terms do not render yet. Useful for discovery when you do not know what to search for.",
                        "default": false
                    },
                    "maxSeedTerms": {
                        "title": "Max trending seed terms",
                        "minimum": 1,
                        "maximum": 72,
                        "type": "integer",
                        "description": "How many trending terms to use as crawl seeds when seeding from trending is on.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
