{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Trending & Charts Scraper: Music, Trailers, Podcasts",
    "description": "Trending on YouTube by country: trending music videos and movie trailers, top songs, music videos, artists, Shorts songs and podcasts from YouTube Charts. Rank changes, weeks on chart, weekly views, history back to 2017, 68 countries + global. No API key.",
    "version": "0.1",
    "x-build-id": "7aGqmJw0UYpn8lvib"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~youtube-trending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-youtube-trending-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/s_actors~youtube-trending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-youtube-trending-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/s_actors~youtube-trending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-youtube-trending-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": [
          "charts",
          "countries"
        ],
        "properties": {
          "charts": {
            "title": "📈 Charts",
            "type": "array",
            "description": "YouTube Charts to read. YouTube removed its general Trending page in July 2025; these charts are the trending lists YouTube still publishes. Trending lists have no global version; podcasts exist for the US only.",
            "items": {
              "type": "string",
              "enum": [
                "trending-music-videos",
                "trending-movie-trailers",
                "top-songs",
                "top-music-videos",
                "top-artists",
                "top-shorts-songs",
                "top-podcasts"
              ],
              "enumTitles": [
                "Trending music videos (30)",
                "Trending movie trailers (30)",
                "Top songs (100, weekly)",
                "Top music videos (100, weekly or daily)",
                "Top artists (100, weekly)",
                "Top songs on Shorts (50, weekly or daily)",
                "Top podcasts (100, weekly, US only)"
              ]
            },
            "default": [
              "trending-music-videos"
            ]
          },
          "countries": {
            "title": "🌍 Countries",
            "type": "array",
            "description": "One per line: 2-letter country codes (US, GB, IN, BR, JP...), country names (Germany) or global. 68 countries: AR, AU, AT, BE, BO, BR, CA, CL, CO, CR, CZ, DK, DO, EC, EG, SV, EE, FI, FR, DE, GT, HN, HK, HU, IS, IN, ID, IE, IL, IT, JP, KE, LU, MY, MX, NL, NZ, NI, NG, NO, PA, PY, PE, PH, PL, PT, RO, RU, SA, RS, SG, ZA, KR, ES, SE, CH, TW, TZ, TH, TR, UG, UA, AE, GB, US, UY, VN, ZW.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "period": {
            "title": "🗓️ Period",
            "enum": [
              "weekly",
              "daily"
            ],
            "type": "string",
            "description": "For Top music videos and Top songs on Shorts. Other charts have one period only (weekly, or 'current' for trending lists).",
            "default": "weekly"
          },
          "maxItemsPerChart": {
            "title": "🔢 Entries per chart",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Top N of each chart (charts have 30, 50 or 100 entries).",
            "default": 100
          },
          "addVideoStats": {
            "title": "📊 Add video stats",
            "type": "boolean",
            "description": "For every video: exact total views, likes and comment count now (one extra request per video, charged per video). Useful for trending lists, which show no views.",
            "default": false
          },
          "date": {
            "title": "⏪ Chart date",
            "type": "string",
            "description": "Empty = the latest chart. A date (2019-01-03) or a relative date (6 months ago) gives the chart that covers it; weekly charts go back to September 2017. Trending lists have no history."
          },
          "periods": {
            "title": "🔁 Number of periods",
            "minimum": 1,
            "maximum": 520,
            "type": "integer",
            "description": "How many charts in a row, going back from the chart date (or from the latest): 52 = a year of weekly charts.",
            "default": 1
          },
          "onlyNew": {
            "title": "🔔 Only new entries",
            "type": "boolean",
            "description": "For scheduled runs: the first run remembers each chart, later runs return only entries that were not on it last time.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new entries. Use a different name for each task.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many requests to YouTube run at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Requests go direct first and switch to Apify datacenter proxies when YouTube refuses them. The default works for most runs.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}