# Instagram Audio Scraper - Reels by Audio, Song & Sound (`khadinakbar/instagram-audio-scraper`) Actor

Scrape public Instagram audio usage from audio IDs, audio URLs, Reel URLs, profile Reels, and Reel search queries. Returns audio metadata, Reel URLs, engagement metrics, media links, author metadata, and provider diagnostics. No cookies required.

- **URL**: https://apify.com/khadinakbar/instagram-audio-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Videos, MCP servers
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 instagram audio or reel results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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.md):

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

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

Scrape public Instagram audio usage from audio IDs, audio page URLs, Reel URLs, profile Reels, and Reel search queries. The actor returns audio metadata, Reel URLs, captions, engagement metrics, media links, author metadata, source provenance, and provider diagnostics.

This actor is built for trend researchers, social media teams, creator agencies, music marketers, and AI agents that need structured Instagram sound usage data without running a fragile browser session.

### What You Can Scrape

- Reels using a specific Instagram audio ID or audio page URL
- Audio metadata from one or more public Reel/post URLs
- Audio usage across a public profile's recent Reels
- Audio metadata from keyword-based Instagram Reel search results
- Public engagement metrics such as plays, likes, comments, duration, captions, hashtags, mentions, thumbnails, video URLs, and creator metadata

### Inputs

- `audioInputs` - Instagram audio IDs or URLs like `https://www.instagram.com/reels/audio/579408562507956/`
- `reelUrls` - public Instagram Reel/post URLs to inspect for audio metadata
- `profileHandles` - public Instagram profile handles or URLs whose Reels should be scanned
- `searchQueries` - Reel search keywords
- `maxReelsPerAudio`, `maxAudioPages`, `maxReelsPerProfile`, `maxSearchPages`, `maxResults` - cost and runtime controls
- `datePosted` - optional date filter for Reel search
- `includeRaw` - include the provider response fragment for debugging

At least one source field must be provided.

### Output

The default dataset contains two record types:

- `audio_summary` - one row per target or inferred audio ID
- `reel` - one row per Reel/post using an audio track

Important fields include:

- `audio_id`, `audio_url`, `audio_title`, `audio_artist`, `uses_original_audio`
- `reel_url`, `shortcode`, `caption`, `caption_hashtags`, `mentions`
- `play_count`, `like_count`, `comment_count`, `video_duration_secs`
- `author_username`, `author_full_name`, `author_is_verified`
- `thumbnail_url`, `video_url`
- `source_type`, `source_input`, `provider`, `scraped_at`

The default key-value store also includes `OUTPUT` and `RUN_SUMMARY` records with saved counts, stop reason, source counts, provider attempts, retries, status codes, next cursors, and warnings.

### Reliability

Instagram public pages are highly changeable and browser scraping is often blocked. This actor uses provider-backed public data routes instead:

- ScrapeCreators for Reel URL, profile Reels, and Reel search modes
- SociaVault for Reels-by-audio and fallback post/profile modes

No Instagram cookies are required. The actor only returns public data exposed by the providers. Private accounts, login-only fields, follower graphs, and stable audio file downloads are outside this actor's scope.

### Pricing

The actor uses pay-per-event pricing:

- Actor start: platform start event
- `audio-result`: one public audio summary or Reel/audio usage row saved to the dataset

Use `maxResults` and Apify's `maxTotalChargeUsd` run option to cap spend.

### Example Input

```json
{
  "audioInputs": ["579408562507956"],
  "reelUrls": ["https://www.instagram.com/reel/DLDXI0fylTC/"],
  "profileHandles": ["nasa"],
  "searchQueries": ["running shoes"],
  "maxReelsPerAudio": 25,
  "maxAudioPages": 2,
  "maxReelsPerProfile": 25,
  "maxSearchPages": 1,
  "maxResults": 100
}
````

### Example Output Row

```json
{
  "record_type": "reel",
  "source_type": "audio",
  "source_input": "579408562507956",
  "provider": "sociavault",
  "audio_id": "579408562507956",
  "audio_url": "https://www.instagram.com/reels/audio/579408562507956/",
  "audio_title": "Original audio",
  "audio_artist": "creator",
  "reel_url": "https://www.instagram.com/reel/SHORTCODE/",
  "caption": "Example caption",
  "play_count": 123456,
  "like_count": 1234,
  "comment_count": 56,
  "author_username": "creator",
  "scraped_at": "2026-06-10T12:00:00.000Z"
}
```

### Notes

- Instagram CDN media URLs may expire.
- Audio page URLs are stable when an `audio_id` is available.
- `includeRaw` is useful for debugging but increases dataset size.
- Runs soft-exit with a clear summary for invalid inputs or missing provider secrets instead of failing noisily.

# Actor input Schema

## `audioInputs` (type: `array`):

Audio IDs or Instagram audio page URLs such as https://www.instagram.com/reels/audio/579408562507956/. When enabled, the actor finds Reels that use each audio.

## `reelUrls` (type: `array`):

Public Instagram Reel/post URLs to inspect for audio metadata and engagement fields.

## `profileHandles` (type: `array`):

Public Instagram profiles whose Reels should be scanned for audio metadata. Accepts handles like nasa or profile URLs.

## `searchQueries` (type: `array`):

Keywords to search Instagram Reels for, then extract audio metadata from matching Reels.

## `includeReelsUsingAudio` (type: `boolean`):

When true, audioInputs are expanded into Reels using that audio via the provider route.

## `maxReelsPerAudio` (type: `integer`):

Maximum Reels to save for each audio ID or audio URL. Range 1-500.

## `maxAudioPages` (type: `integer`):

Maximum provider pages to request for each audio ID. Keep this low for fast canaries; raise it when you need deeper coverage.

## `maxReelsPerProfile` (type: `integer`):

Maximum profile Reels to inspect for each profile handle. Range 1-500.

## `maxSearchPages` (type: `integer`):

Maximum result pages per Reel search query. Range 1-20.

## `maxResults` (type: `integer`):

Hard cap for dataset rows saved across the whole run. Range 1-5000.

## `datePosted` (type: `string`):

Optional date filter for Reel search queries.

## `includeRaw` (type: `boolean`):

Adds a raw field with the provider response fragment for debugging. Keep off for smaller datasets.

## Actor input object example

```json
{
  "audioInputs": [
    "579408562507956"
  ],
  "reelUrls": [
    "https://www.instagram.com/reel/DLDXI0fylTC/"
  ],
  "includeReelsUsingAudio": true,
  "maxReelsPerAudio": 50,
  "maxAudioPages": 3,
  "maxReelsPerProfile": 50,
  "maxSearchPages": 2,
  "maxResults": 250,
  "datePosted": "any",
  "includeRaw": false
}
```

# Actor output Schema

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

Dataset items containing audio IDs, audio page URLs, song/artist names, Reel URLs, captions, engagement metrics, author metadata, media URLs, and scrape provenance.

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

Run summary including savedCount, stopReason, sourceCounts, providerAttempts, providerRetries, providerStatusCodes, nextCursors, and billing counters.

# 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 = {
    "audioInputs": [
        "579408562507956"
    ],
    "reelUrls": [
        "https://www.instagram.com/reel/DLDXI0fylTC/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/instagram-audio-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 = {
    "audioInputs": ["579408562507956"],
    "reelUrls": ["https://www.instagram.com/reel/DLDXI0fylTC/"],
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/instagram-audio-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 '{
  "audioInputs": [
    "579408562507956"
  ],
  "reelUrls": [
    "https://www.instagram.com/reel/DLDXI0fylTC/"
  ]
}' |
apify call khadinakbar/instagram-audio-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Instagram Audio Scraper - Reels by Audio, Song & Sound",
        "description": "Scrape public Instagram audio usage from audio IDs, audio URLs, Reel URLs, profile Reels, and Reel search queries. Returns audio metadata, Reel URLs, engagement metrics, media links, author metadata, and provider diagnostics. No cookies required.",
        "version": "1.0",
        "x-build-id": "ZRp6oNYre7dJqqYrF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~instagram-audio-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-instagram-audio-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-audio-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-instagram-audio-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-audio-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-instagram-audio-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": {
                    "audioInputs": {
                        "title": "Instagram Audio IDs or Audio URLs",
                        "type": "array",
                        "description": "Audio IDs or Instagram audio page URLs such as https://www.instagram.com/reels/audio/579408562507956/. When enabled, the actor finds Reels that use each audio.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "reelUrls": {
                        "title": "Instagram Reel or Post URLs",
                        "type": "array",
                        "description": "Public Instagram Reel/post URLs to inspect for audio metadata and engagement fields.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "profileHandles": {
                        "title": "Profile Handles or URLs",
                        "type": "array",
                        "description": "Public Instagram profiles whose Reels should be scanned for audio metadata. Accepts handles like nasa or profile URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQueries": {
                        "title": "Reel Search Queries",
                        "type": "array",
                        "description": "Keywords to search Instagram Reels for, then extract audio metadata from matching Reels.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeReelsUsingAudio": {
                        "title": "Find Reels Using Audio IDs",
                        "type": "boolean",
                        "description": "When true, audioInputs are expanded into Reels using that audio via the provider route.",
                        "default": true
                    },
                    "maxReelsPerAudio": {
                        "title": "Max Reels Per Audio",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum Reels to save for each audio ID or audio URL. Range 1-500.",
                        "default": 50
                    },
                    "maxAudioPages": {
                        "title": "Max Audio Pages",
                        "minimum": 1,
                        "maximum": 25,
                        "type": "integer",
                        "description": "Maximum provider pages to request for each audio ID. Keep this low for fast canaries; raise it when you need deeper coverage.",
                        "default": 3
                    },
                    "maxReelsPerProfile": {
                        "title": "Max Reels Per Profile",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum profile Reels to inspect for each profile handle. Range 1-500.",
                        "default": 50
                    },
                    "maxSearchPages": {
                        "title": "Max Search Pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum result pages per Reel search query. Range 1-20.",
                        "default": 2
                    },
                    "maxResults": {
                        "title": "Total Max Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Hard cap for dataset rows saved across the whole run. Range 1-5000.",
                        "default": 250
                    },
                    "datePosted": {
                        "title": "Search Date Filter",
                        "enum": [
                            "any",
                            "last-hour",
                            "last-day",
                            "last-week",
                            "last-month",
                            "last-year"
                        ],
                        "type": "string",
                        "description": "Optional date filter for Reel search queries.",
                        "default": "any"
                    },
                    "includeRaw": {
                        "title": "Include Raw Provider Object",
                        "type": "boolean",
                        "description": "Adds a raw field with the provider response fragment for debugging. Keep off for smaller datasets.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
