{
  "openapi": "3.0.1",
  "info": {
    "title": "NCS Music Scraper",
    "description": "Scrape tracks, artists, genres, moods, search results, and track metadata from NoCopyrightSounds (NCS).",
    "version": "0.1",
    "x-build-id": "quPBPo4OxgIxWXDzk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/futuristforever~ncs-music-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-futuristforever-ncs-music-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/futuristforever~ncs-music-scraper/runs": {
      "post": {
        "operationId": "runs-sync-futuristforever-ncs-music-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/futuristforever~ncs-music-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-futuristforever-ncs-music-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "library",
              "artists",
              "full",
              "search",
              "genres",
              "moods",
              "artist_tracks",
              "track",
              "artist"
            ],
            "type": "string",
            "description": "Crawl target. Use 'library' to page through the full NCS music catalogue, 'search' to query by keyword/genre/mood, 'artists' for all artist profiles, 'full' for library + artists in one run, 'track' / 'artist' for a single item by URL, 'artist_tracks' for all tracks by a named artist, or 'genres' / 'moods' to retrieve the full list of filter IDs and names.",
            "default": "library"
          },
          "max_pages": {
            "title": "Max Library Pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of music library pages to crawl. Applies to 'library' and 'full' modes only. Each page contains ~18 tracks.",
            "default": 5
          },
          "crawl_track_pages": {
            "title": "Crawl Track Pages",
            "type": "boolean",
            "description": "Visit each individual track page to collect the download URL and full description. Applies to 'library' and 'full' modes. Enabling this multiplies the number of requests by the number of tracks found. When enabled, basic listing records are replaced by richer 'track_detail' records to avoid duplicates.",
            "default": false
          },
          "crawl_artist_pages": {
            "title": "Crawl Artist Pages",
            "type": "boolean",
            "description": "Visit artist profile pages discovered while crawling the library. Applies to 'library' and 'full' modes. Produces 'artist' records with bio, genres, and cover image.",
            "default": true
          },
          "crawl_artist_tracks": {
            "title": "Crawl Artist Tracks",
            "type": "boolean",
            "description": "Extract the track listing from each artist's profile page. Applies to 'artist' and 'artists' modes (or 'library'/'full' when 'crawl_artist_pages' is also enabled). Produces 'artist_track' records.",
            "default": false
          },
          "scrape_popular": {
            "title": "Scrape Popular Releases",
            "type": "boolean",
            "description": "Collect the 5 featured 'Popular Releases' shown at the top of the library page. These are the same tracks on every page, so they are only scraped once from page 1. Produces 'popular_track' records (with 'track_detail' records instead if 'crawl_track_pages' is enabled). Applies to 'library' and 'full' modes.",
            "default": true
          },
          "scrape_recent": {
            "title": "Scrape Recent Releases",
            "type": "boolean",
            "description": "Collect tracks from the 'Recent Releases' table — the paginated listing of newest NCS additions. Produces 'track' records (or 'track_detail' records if 'crawl_track_pages' is enabled). Applies to 'library' and 'full' modes.",
            "default": true
          },
          "query": {
            "title": "Search Query",
            "type": "string",
            "description": "Keyword, track title, or artist name to search for. Applies to 'search' mode.",
            "default": ""
          },
          "artist": {
            "title": "Artist Name",
            "type": "string",
            "description": "Artist name to look up. Applies to 'artist_tracks' mode.",
            "default": ""
          },
          "track_url": {
            "title": "Track URL",
            "type": "string",
            "description": "Direct NCS track URL (e.g. https://ncs.io/dreamer). Applies to 'track' mode.",
            "default": ""
          },
          "genre": {
            "title": "Genre ID",
            "type": "string",
            "description": "Numeric NCS genre ID to filter results. Use 'genres' mode to retrieve the full list of IDs. Prefer 'genre_name' for readability — both cannot be used simultaneously; 'genre_name' takes precedence. Applies to 'search' mode.",
            "default": ""
          },
          "genre_name": {
            "title": "Genre Name",
            "type": "string",
            "description": "Genre filter by human-readable name (e.g. 'drum & bass', 'future bass'). Resolved to an ID automatically. Run 'genres' mode to see all valid values. Takes precedence over 'genre' if both are set. Applies to 'search' mode.",
            "default": ""
          },
          "mood": {
            "title": "Mood ID",
            "type": "string",
            "description": "Numeric NCS mood ID to filter results. Use 'moods' mode to retrieve the full list of IDs. Prefer 'mood_name' for readability — both cannot be used simultaneously; 'mood_name' takes precedence. Applies to 'search' mode.",
            "default": ""
          },
          "mood_name": {
            "title": "Mood Name",
            "type": "string",
            "description": "Mood filter by human-readable name (e.g. 'energetic', 'dark'). Resolved to an ID automatically. Run 'moods' mode to see all valid values. Takes precedence over 'mood' if both are set. Applies to 'search' mode.",
            "default": ""
          },
          "version": {
            "title": "Version",
            "enum": [
              "regular",
              "instrumental",
              "regular-instrumental"
            ],
            "type": "string",
            "description": "Filter by track version. 'regular' returns standard releases, 'instrumental' returns instrumental-only tracks, 'regular-instrumental' returns both. Applies to 'search' mode.",
            "default": "regular"
          },
          "max_search_pages": {
            "title": "Max Search Pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of search result pages to fetch. Applies to 'search' mode only. Each page returns up to 18 tracks.",
            "default": 1
          },
          "artist_url": {
            "title": "Artist URL",
            "type": "string",
            "description": "Direct NCS artist profile URL (e.g. https://ncs.io/artist/13/alan-walker). Applies to 'artist' mode.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}