{
  "openapi": "3.0.1",
  "info": {
    "title": "Music Tagging API: BPM, Key, Mood, Genre and Similar Songs",
    "description": "Music tagging API for your audio library and Spotify tracks: genre, mood, BPM, key, instruments, voice and energy tags, similar song search with BPM and key filters, and free text music search, through the Cyanite API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "YUp28X5hoHsisHR3b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~music-tagging-similarity-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-music-tagging-similarity-search-api",
        "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/nabeelbaghoor~music-tagging-similarity-search-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-music-tagging-similarity-search-api",
        "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/nabeelbaghoor~music-tagging-similarity-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-music-tagging-similarity-search-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "libraryTracks",
              "libraryTrack",
              "spotifyTrack",
              "similarTracks",
              "freeTextSearch"
            ],
            "type": "string",
            "description": "Each mode sends one documented operation of the Cyanite GraphQL API. Tagging modes return the audio analysis (BPM, key, genre, mood, instruments, voice, energy) of tracks; the search modes return ranked matching tracks.",
            "default": "libraryTracks"
          },
          "apiKey": {
            "title": "Cyanite integration access token",
            "type": "string",
            "description": "The access token of your own integration, created in the Integrations section of app.cyanite.ai. Sent as a Bearer token in the Authorization header, never in a URL. Leave empty to use the DATA_API_KEY secret."
          },
          "titleFilter": {
            "title": "Title contains",
            "type": "string",
            "description": "Library tracks. Only tracks whose title includes this text. Use at most one of title, SHA256 hash and external ID."
          },
          "sha256": {
            "title": "Audio file SHA256 hash",
            "type": "string",
            "description": "Library tracks. Find the track uploaded from the audio file with this 64 character SHA256 hash, for example to check for a duplicate before uploading."
          },
          "externalId": {
            "title": "External ID",
            "type": "string",
            "description": "Library tracks. Find tracks with this external ID, the identifier you gave the track when it was created."
          },
          "libraryTrackIds": {
            "title": "Library track IDs",
            "type": "array",
            "description": "Library tracks by ID and similar tracks. One Cyanite library track ID per line.",
            "items": {
              "type": "string"
            }
          },
          "spotifyTrackIds": {
            "title": "Spotify tracks",
            "type": "array",
            "description": "Spotify tracks and similar tracks. One Spotify track ID, spotify:track: URI or open.spotify.com/track/ link per line.",
            "items": {
              "type": "string"
            }
          },
          "enqueueMissing": {
            "title": "Request analysis for Spotify tracks not analysed yet",
            "type": "boolean",
            "description": "Spotify tracks. When a track has no analysis yet, ask Cyanite to analyse it (spotifyTrackEnqueue). The row then shows the analysis as pending; run again later for the tags. Uses your Cyanite analysis allowance.",
            "default": false
          },
          "searchTexts": {
            "title": "Search descriptions",
            "type": "array",
            "description": "Free text music search. One description per line, in English, such as uplifting acoustic folk for a travel video.",
            "items": {
              "type": "string"
            }
          },
          "target": {
            "title": "Where to search",
            "enum": [
              "library",
              "crate",
              "spotify"
            ],
            "type": "string",
            "description": "Similar tracks and free text search. Where the matching tracks come from.",
            "default": "library"
          },
          "crateId": {
            "title": "Crate ID",
            "type": "string",
            "description": "Similar tracks and free text search, with the crate target. The ID of the crate to search in."
          },
          "similarCount": {
            "title": "Matches per seed or search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Similar tracks and free text search. How many ranked matches to return for each seed track or description, up to 100.",
            "default": 10
          },
          "includeAnalysis": {
            "title": "Include tags for each match",
            "type": "boolean",
            "description": "Similar tracks and free text search. Adds BPM, key, genre, mood and the other tags to each match where Cyanite has analysed it (charged as a tagged track). Turn off for a cheaper list of IDs and titles.",
            "default": true
          },
          "searchMode": {
            "title": "Part of the seed track to compare",
            "enum": [
              "default",
              "mostRepresentative",
              "complete",
              "interval"
            ],
            "type": "string",
            "description": "Similar tracks. Which part of the seed track the search compares. The custom interval uses the start and end below.",
            "default": "default"
          },
          "intervalStart": {
            "title": "Interval start (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Similar tracks with the custom interval. Start of the part of the seed track to compare, in seconds."
          },
          "intervalEnd": {
            "title": "Interval end (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "Similar tracks with the custom interval. End of the part of the seed track to compare, in seconds."
          },
          "bpmFilter": {
            "title": "BPM filter",
            "enum": [
              "none",
              "input",
              "range"
            ],
            "type": "string",
            "description": "Similar tracks. Keep only matches in a tempo range. Marked experimental by Cyanite.",
            "default": "none"
          },
          "bpmMin": {
            "title": "Minimum BPM",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Similar tracks with the custom BPM range."
          },
          "bpmMax": {
            "title": "Maximum BPM",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Similar tracks with the custom BPM range."
          },
          "keyFilter": {
            "title": "Key filter",
            "enum": [
              "none",
              "matching",
              "camelot"
            ],
            "type": "string",
            "description": "Similar tracks. Keep only matches in the seed track's key, or in keys that mix with it on the Camelot wheel. Marked experimental by Cyanite.",
            "default": "none"
          },
          "genreFilter": {
            "title": "Same genre as the seed track",
            "type": "boolean",
            "description": "Similar tracks. Keep only matches that share the seed track's genre. Marked experimental by Cyanite.",
            "default": false
          },
          "voiceFilter": {
            "title": "Same voice as the seed track",
            "type": "boolean",
            "description": "Similar tracks. Keep only matches with the seed track's voice tags, such as instrumental. Marked experimental by Cyanite.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops after this many rows.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}