{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Audio Scraper · Sounds, Music & Trending Reels",
    "description": "Search Instagram sounds, look up any audio page id (catalogue or creator original), or name the track on a reel or profile. Artist, duration, cover, lyrics and trending flags, Instagram's reel count, a download URL, and optional permanent audio save. No login, no cookies.",
    "version": "1.0",
    "x-build-id": "zheVsdHUcdKVk63YH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~instagram-audio-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-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/memo23~instagram-audio-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-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/memo23~instagram-audio-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-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": {
          "queries": {
            "title": "Sound search terms",
            "type": "array",
            "description": "Words to search Instagram's sound catalogue for — a song title, an artist, or a phrase. Example: [\"lofi\", \"coffee\"]. Leave empty if you only want post URLs, track ids, profile scans, or datasetId. Default: unused.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post or reel URLs",
            "type": "array",
            "description": "Reels or posts whose sound you want named. Accepts instagram.com/reel/<code>/ or /p/<code>/ URLs. An audio page URL (instagram.com/reels/audio/<id>/) is peeled off and looked up as a track id. Names licensed tracks and creator original audio. Example: [\"https://www.instagram.com/reel/Dcy-7IJhWAP/\"]. Default: unused.",
            "items": {
              "type": "string"
            }
          },
          "profileHandles": {
            "title": "Profile handles",
            "type": "array",
            "description": "Public Instagram profiles whose Reels should be scanned for the sound on each one. Accepts handles (nasa), @-handles, or profile URLs. Example: [\"nasa\"]. Private or missing accounts come back as an error row and are not billed. Pair with datePosted / postedWithinDays / minViews to keep only matching Reels. Default: unused.",
            "items": {
              "type": "string"
            }
          },
          "trackIds": {
            "title": "Audio IDs",
            "type": "array",
            "description": "Instagram audio ids or audio page URLs, e.g. [\"346308129265917\"] or [\"https://www.instagram.com/reels/audio/346308129265917/\"]. Same number this Actor returns as \"trackId\", so you can feed one run's output into the next. Catalogue cluster ids and creator-original asset ids both resolve. Each id returns one \"sound\" row with title, artist, duration, cover, lyrics/trending flags, download URL, optional 30s preview, and the total number of reels using it.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Input dataset ID (pipeline chaining)",
            "type": "string",
            "description": "Read reel/post URLs, profile handles, or audio track IDs straight from an existing Apify dataset (e.g. output from another Instagram scraper or a previous audio run). Merges with any direct inputs above and deduplicates automatically."
          },
          "maxReelsPerProfile": {
            "title": "Max reels per profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many of a profile's newest Reels to inspect for audio. Whole number from 1 to 500. Example: 20. Default: 50.",
            "default": 50
          },
          "maxSoundsPerQuery": {
            "title": "Max sounds per search term",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on sounds returned per search term. Instagram's catalogue returns about 10 per term, so a cap above that changes nothing. Whole number, e.g. 5. Leave empty to take everything the catalogue returns. Default: unlimited."
          },
          "maxItems": {
            "title": "Max total items (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Global hard cap on total delivered dataset rows across all queries, post URLs, track IDs, profiles, and expanded reels combined. Enforced before audio downloads and billing. Leave empty for unlimited."
          },
          "includeReelsUsingSound": {
            "title": "Also return the reels using each sound",
            "type": "boolean",
            "description": "For every sound found, add the reels actually using it as separate rows with rowType \"reel\" (plays, likes, creator). Also fills totalReelsUsingSound on search/post/profile rows. Track-id lookups already include that count. Example: true. Default: false. Paid Apify plans only.",
            "default": false
          },
          "maxReelsPerSound": {
            "title": "Max reels per sound",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on how many reels are collected per sound when includeReelsUsingSound is on. Ignored otherwise. Whole number, e.g. 24. Default: 24.",
            "default": 24
          },
          "saveAudio": {
            "title": "Save audio files",
            "type": "boolean",
            "description": "Download each sound into this run's key-value store and put a permanent audioKvStoreUrl on the row. Instagram CDN links expire; this copy does not. Off by default. Paid Apify plans only.",
            "default": false
          },
          "datePosted": {
            "title": "Posted within",
            "enum": [
              "any",
              "last-hour",
              "last-day",
              "last-week",
              "last-month",
              "last-year"
            ],
            "type": "string",
            "description": "Keep only Reels posted in this window. Values: any, last-hour, last-day, last-week, last-month, last-year. Applies to profile scans, post URLs, and the expanded reels-using-this-sound list. Catalogue search results have no post date, so they are unchanged. Example: last-month. Default: any.",
            "default": "any"
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only posts/reels published within the last N days (e.g. 7 or 14). Complements datePosted and applies before audio download or billing. Catalogue search results have no post date and are unchanged."
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "Lower post date bound (inclusive). Accepts YYYY-MM-DD, ISO 8601 timestamp, or relative offset like \"7d\", \"24h\", \"2w\", \"3mo\". Filtered before audio download and billing."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Upper post date bound (inclusive end of UTC day for YYYY-MM-DD). Accepts YYYY-MM-DD, ISO 8601 timestamp, or relative offset like \"1d\". Filtered before audio download and billing."
          },
          "minViews": {
            "title": "Minimum views / plays",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only post-sound and reel rows with at least this many plays/views. Applied BEFORE audio downloads, pushing, or billing. Catalogue sound search rows have no view count and are unchanged."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only post-sound and reel rows with at least this many likes. Applied BEFORE audio downloads, pushing, or billing. Catalogue sound search rows have no like count and are unchanged."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "default",
              "most_viewed",
              "most_liked",
              "newest"
            ],
            "type": "string",
            "description": "Order delivered items by a real engagement or recency metric (bounded in-memory sort applied before maxItems, audio downloads, and billing). \"default\" streams immediately; \"most_viewed\" sorts by playCount (falling back to totalReelsUsingSound on sound rows); \"most_liked\" sorts by likeCount; \"newest\" sorts by takenAt.",
            "default": "default"
          },
          "watchlistId": {
            "title": "Watchlist ID (incremental dedup)",
            "type": "string",
            "description": "Named Apify Key-Value Store used to persist delivered track IDs and reel shortcodes across scheduled runs. Previously delivered items are skipped BEFORE downloading audio or billing."
          },
          "newItemsOnly": {
            "title": "New items only",
            "type": "boolean",
            "description": "Skip items already delivered in the watchlist before audio downloads or billing. Defaults to true whenever watchlistId is set (set explicitly to false to refresh/seed a watchlist without skipping). When set to true without watchlistId, uses the default store \"instagram-audio-watchlist\"."
          },
          "compact": {
            "title": "Compact output rows",
            "type": "boolean",
            "description": "Emit a streamlined core subset of fields per row type (omitting secondary metadata such as cover art, preview URL, audioClusterId, and scrapedAt).",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Omit null, undefined, and empty string/array/object keys from output rows while preserving 0 and false.",
            "default": false
          },
          "searchQueries": {
            "title": "searchQueries (alias for queries)",
            "type": "array",
            "description": "Drop-in alias for \"queries\".",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "keywords (alias for queries)",
            "type": "array",
            "description": "Drop-in alias for \"queries\".",
            "items": {
              "type": "string"
            }
          },
          "reelUrls": {
            "title": "reelUrls (alias for postUrls)",
            "type": "array",
            "description": "Drop-in alias for \"postUrls\".",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "urls (alias for postUrls / audio / profile URLs)",
            "type": "array",
            "description": "Drop-in alias accepting plain URL strings or Apify { \"url\": \"...\" } objects. Routes reel/post URLs, audio page URLs, and profile URLs automatically."
          },
          "startUrls": {
            "title": "startUrls (alias for postUrls / audio / profile URLs)",
            "type": "array",
            "description": "Drop-in alias accepting plain URL strings or Apify RequestList { \"url\": \"...\" } objects. Routes reel/post URLs, audio page URLs, and profile URLs automatically."
          },
          "usernames": {
            "title": "usernames (alias for profileHandles)",
            "type": "array",
            "description": "Drop-in alias for \"profileHandles\".",
            "items": {
              "type": "string"
            }
          },
          "handles": {
            "title": "handles (alias for profileHandles)",
            "type": "array",
            "description": "Drop-in alias for \"profileHandles\".",
            "items": {
              "type": "string"
            }
          },
          "audioIds": {
            "title": "audioIds (alias for trackIds)",
            "type": "array",
            "description": "Drop-in alias for \"trackIds\".",
            "items": {
              "type": "string"
            }
          },
          "downloadAudio": {
            "title": "downloadAudio (alias for saveAudio)",
            "type": "boolean",
            "description": "Drop-in alias for \"saveAudio\". Takes effect even when saveAudio is left at its 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}