{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Trending Videos Scraper",
    "description": "YouTube Trending Videos Scraper SD - YouTube Trending Videos Scraper is a video data tool that extracts what is trending on YouTube per country: trending and top music videos, movie trailers, podcasts, the Explore tabs (Gaming, News, Sports, Music...) and the Hype leaderboard, with ranks, views and",
    "version": "1.0",
    "x-build-id": "kDalTCqVoCaIMx4QM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~youtube-trending-videos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-youtube-trending-videos-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/neuro-scraper~youtube-trending-videos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-youtube-trending-videos-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/neuro-scraper~youtube-trending-videos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-youtube-trending-videos-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": {
          "sources": {
            "title": "Trending lists",
            "type": "array",
            "description": "Which trending lists to read. Trending music videos: rank, movement, number of countries and top country ranks. Hype: the hype rank per country. Explore: the videos YouTube features on each Explore tab, shelf by shelf (the log lists the tabs YouTube offers per country).",
            "items": {
              "type": "string",
              "enum": [
                "trendingMusicVideos",
                "hype",
                "explore_gaming",
                "explore_music",
                "explore_live"
              ],
              "enumTitles": [
                "Trending music videos (worldwide chart)",
                "Hype leaderboard (per country)",
                "Explore: Gaming",
                "Explore: Music",
                "Explore: Live"
              ]
            },
            "default": [
              "trendingMusicVideos"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes (us, gb, de, in, br ...), one per line; \"global\" for the worldwide top music charts. Every list is read for every country. Countries without a chart are reported in the log.",
            "default": [
              "us"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSource": {
            "title": "Max videos per list and country",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many entries per list and country (2 lists x 2 countries x 20 = up to 80 rows). Charts hold up to 100 entries; Explore and Hype lists are followed page after page.",
            "default": 20
          },
          "chartDate": {
            "title": "Chart date (charts)",
            "type": "string",
            "description": "Optional end date of a past chart period, e.g. 2026-10-01 (weekly and daily charts). Empty = the latest chart."
          },
          "onlyRisingEntries": {
            "title": "Only rising entries (charts)",
            "type": "boolean",
            "description": "Charts: keep only entries that moved up or are new on the chart.",
            "default": false
          },
          "minRankChange": {
            "title": "Minimum rank change (charts)",
            "minimum": 0,
            "type": "integer",
            "description": "Charts: keep only entries whose rank changed by at least this many places.",
            "default": 0
          },
          "includeVideoDetails": {
            "title": "Add video details",
            "type": "boolean",
            "description": "Add likes, comment count, description, publish date, category and keywords of every video (one extra request per video).",
            "default": false
          },
          "maxItems": {
            "title": "Max rows in total (0 = no total limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the whole run after this many dataset rows.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for YouTube's texts (en, es, de ...).",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Parallel lists",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many list families (charts, Explore, Hype) are read at the same time, each with its own connection.",
            "default": 5
          },
          "deliverMode": {
            "title": "Write mode",
            "enum": [
              "perVideo",
              "summary"
            ],
            "type": "string",
            "description": "perVideo writes one row per video; summary writes one row per list and country with all its videos inside.",
            "default": "perVideo"
          },
          "monitorMode": {
            "title": "Only new entries (monitoring)",
            "type": "boolean",
            "description": "Remember the entries delivered by earlier runs (per list, country and video) and return only new ones.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store that remembers delivered entries for monitorMode.",
            "default": "youtube-trending-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies in the United States (the default) give the most reliable results: visitors from some countries (e.g. the EU) first get a consent page. The country of each list is set by Countries, not by the proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}