{
  "openapi": "3.0.1",
  "info": {
    "title": "통합 음원차트 API (Korean Music · K-pop Chart) – 멜론·지니·벅스·FLO·VIBE 올킬",
    "description": "멜론·지니·벅스·FLO·VIBE 실시간·일간·주간 차트를 한 번에 가져와 곡마다 플랫폼별 순위, 통합 순위, 올킬 여부를 하나의 표로. 5개 플랫폼 곡 검색과 곡 ID 매칭도. 로그인 없이 JSON·CSV, $0.25/1K행, 매달 500행 무료.",
    "version": "0.2",
    "x-build-id": "Tl2ON6nGpoKXUMbTJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/k-data-lab~korean-music-chart-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-k-data-lab-korean-music-chart-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/k-data-lab~korean-music-chart-scraper/runs": {
      "post": {
        "operationId": "runs-sync-k-data-lab-korean-music-chart-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/k-data-lab~korean-music-chart-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-k-data-lab-korean-music-chart-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": {
          "chartType": {
            "title": "차트 종류",
            "enum": [
              "realtime",
              "daily",
              "weekly",
              "none"
            ],
            "type": "string",
            "description": "\"realtime\"(실시간·기본값), \"daily\"(일간), \"weekly\"(주간), \"none\"(차트 없이 검색만) 중 하나. 예: \"realtime\" = 지금 올킬 현황, \"none\" + searchKeywords = 곡 검색만. 고른 모든 플랫폼에서 같은 시점의 종합 차트를 한 번에 가져와 하나의 통합 순위로 합칩니다. 실시간 = 멜론 TOP100 · 지니 TOP200 · 벅스 실시간 · FLO 차트(최근 24시간) · VIBE 오늘 Top 100 (VIBE는 실시간 종합 차트가 없어 일간을 씁니다). 주간에는 VIBE가 빠집니다(주간 차트 없음). '차트 없음'은 아래 검색어만 실행합니다.",
            "default": "realtime"
          },
          "platforms": {
            "title": "플랫폼",
            "type": "array",
            "description": "차트와 검색을 실행할 음원 플랫폼 (여러 개 선택). 기본값은 5개 전부입니다. 예: [\"melon\", \"genie\"] = 멜론·지니만. (Platforms: melon, genie, bugs, flo, vibe.)",
            "items": {
              "type": "string",
              "enum": [
                "melon",
                "genie",
                "bugs",
                "flo",
                "vibe"
              ],
              "enumTitles": [
                "멜론 (Melon)",
                "지니 (Genie)",
                "벅스 (Bugs)",
                "FLO",
                "바이브 (NAVER VIBE)"
              ]
            },
            "default": [
              "melon",
              "genie",
              "bugs",
              "flo",
              "vibe"
            ]
          },
          "maxRank": {
            "title": "플랫폼별 최대 순위",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "각 플랫폼 차트에서 몇 위까지 가져올지 (1~300). 플랫폼마다 상한이 있습니다: 멜론·벅스 100위, 지니 200위, FLO 100위(일간 250위), VIBE 300위. 예: 100 = 각 차트 TOP100, 10 = 상위 10위만 비교.",
            "default": 100
          },
          "searchKeywords": {
            "title": "검색어 (선택)",
            "type": "array",
            "description": "곡명·아티스트로 5개 플랫폼을 한 번에 검색합니다. 같은 곡을 하나의 통합 행으로 묶어 플랫폼별 곡 ID·링크를 함께 돌려줍니다 (플랫폼 간 곡 ID 매칭). 예: 아이유, Golden 비워 두면 검색하지 않습니다. (Song/artist search keywords, e.g. [\"아이유\", \"aespa\"].)",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxSearchResults": {
            "title": "검색어·플랫폼별 최대 곡 수",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "검색어 하나당 플랫폼마다 가져올 곡 수 (1~500, 정확도순 상위). 예: 30(기본값), 5 = 플랫폼마다 상위 5곡만. searchKeywords를 넣었을 때만 쓰입니다.",
            "default": 30
          },
          "outputMode": {
            "title": "출력 형식",
            "enum": [
              "both",
              "unified",
              "perPlatform"
            ],
            "type": "string",
            "description": "\"both\"(기본값), \"unified\", \"perPlatform\" 중 하나. 예: 올킬 순위표만 원하면 \"unified\". 통합 = 곡마다 1행 (플랫폼별 순위·점수·올킬 여부), 플랫폼별 = 플랫폼마다 곡 1행 (`source` 칸으로 구분, 같은 열 구성), 둘 다 = 통합 행 + 플랫폼별 행. 결과 행 수만큼 요금이 나갑니다.",
            "default": "both"
          },
          "proxyConfiguration": {
            "title": "프록시",
            "type": "object",
            "description": "보통은 필요 없습니다. 비워 두면 직접 접속하고, 거절되면 자동으로 Apify 프록시로 다시 시도합니다. 예: {\"useApifyProxy\": false} (기본값 그대로 두면 됩니다).",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}