{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Most Popular Videos (Top by Country & Category)",
    "description": "Most popular YouTube videos by country and category. Multi-select regions, choose [All] or specific categories, paginate results, and get clean JSON with rank, video + channel metadata, stats, and timestamps. Great for research, trend tracking, and dashboards.",
    "version": "1.0",
    "x-build-id": "Cuzf9DE1eeCe2m9x9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~youtube-most-popular-videos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-youtube-most-popular-videos",
        "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/coregent~youtube-most-popular-videos/runs": {
      "post": {
        "operationId": "runs-sync-coregent-youtube-most-popular-videos",
        "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/coregent~youtube-most-popular-videos/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-youtube-most-popular-videos",
        "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": [
          "regions"
        ],
        "properties": {
          "regions": {
            "title": "Regions (Countries)",
            "type": "array",
            "description": "Select one or more countries to fetch most popular videos for.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "AU",
                "CA",
                "IN",
                "DE",
                "FR",
                "IT",
                "ES",
                "PT",
                "BR",
                "MX",
                "AR",
                "CO",
                "CL",
                "JP",
                "KR",
                "TW",
                "HK",
                "SG",
                "ID",
                "TH",
                "PH",
                "MY",
                "VN",
                "RU",
                "UA",
                "PL",
                "NL",
                "BE",
                "SE",
                "NO",
                "DK",
                "FI",
                "AT",
                "CH",
                "IE",
                "NZ",
                "ZA",
                "EG",
                "NG",
                "KE",
                "GH",
                "AE",
                "SA",
                "IL",
                "TR",
                "GR",
                "CZ",
                "RO"
              ],
              "enumTitles": [
                "United States (US)",
                "United Kingdom (GB)",
                "Australia (AU)",
                "Canada (CA)",
                "India (IN)",
                "Germany (DE)",
                "France (FR)",
                "Italy (IT)",
                "Spain (ES)",
                "Portugal (PT)",
                "Brazil (BR)",
                "Mexico (MX)",
                "Argentina (AR)",
                "Colombia (CO)",
                "Chile (CL)",
                "Japan (JP)",
                "South Korea (KR)",
                "Taiwan (TW)",
                "Hong Kong (HK)",
                "Singapore (SG)",
                "Indonesia (ID)",
                "Thailand (TH)",
                "Philippines (PH)",
                "Malaysia (MY)",
                "Vietnam (VN)",
                "Russia (RU)",
                "Ukraine (UA)",
                "Poland (PL)",
                "Netherlands (NL)",
                "Belgium (BE)",
                "Sweden (SE)",
                "Norway (NO)",
                "Denmark (DK)",
                "Finland (FI)",
                "Austria (AT)",
                "Switzerland (CH)",
                "Ireland (IE)",
                "New Zealand (NZ)",
                "South Africa (ZA)",
                "Egypt (EG)",
                "Nigeria (NG)",
                "Kenya (KE)",
                "Ghana (GH)",
                "UAE (AE)",
                "Saudi Arabia (SA)",
                "Israel (IL)",
                "Turkey (TR)",
                "Greece (GR)",
                "Czech Republic (CZ)",
                "Romania (RO)"
              ]
            }
          },
          "categoryIds": {
            "title": "Categories",
            "type": "array",
            "description": "Select categories or choose 'All categories' for the overall most popular in each region (no category filter). Categories may vary by region.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "1",
                "2",
                "10",
                "15",
                "17",
                "18",
                "19",
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "32",
                "33",
                "34",
                "35",
                "36",
                "37",
                "38",
                "39",
                "40",
                "41",
                "42",
                "43",
                "44"
              ],
              "enumTitles": [
                "[All categories] — overall most popular",
                "Film & Animation (1)",
                "Autos & Vehicles (2)",
                "Music (10)",
                "Pets & Animals (15)",
                "Sports (17)",
                "Short Movies (18)",
                "Travel & Events (19)",
                "Gaming (20)",
                "Videoblogging (21)",
                "People & Blogs (22)",
                "Comedy (23)",
                "Entertainment (24)",
                "News & Politics (25)",
                "Howto & Style (26)",
                "Education (27)",
                "Science & Technology (28)",
                "Nonprofits & Activism (29)",
                "Movies (30)",
                "Anime/Animation (31)",
                "Action/Adventure (32)",
                "Classics (33)",
                "Comedy (34)",
                "Documentary (35)",
                "Drama (36)",
                "Family (37)",
                "Foreign (38)",
                "Horror (39)",
                "Sci-Fi/Fantasy (40)",
                "Thriller (41)",
                "Shorts (42)",
                "Shows (43)",
                "Trailers (44)"
              ]
            },
            "default": []
          },
          "maxResultsPerPage": {
            "title": "Max Results Per Page",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of results per API page (1-50).",
            "default": 50
          },
          "maxPages": {
            "title": "Max Pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of pages to fetch per region-category combo.",
            "default": 1
          },
          "apiKey": {
            "title": "YouTube API Key",
            "type": "string",
            "description": "Optional. Your own YouTube Data API v3 key. Added to the key pool alongside the built-in key."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for snippet localization (e.g., en, es, ja). Leave empty for API default."
          },
          "dedupeAcrossCombos": {
            "title": "Deduplicate Across Combos",
            "type": "boolean",
            "description": "Skip duplicate video IDs when the same video appears in multiple region-category combos.",
            "default": true
          },
          "includeTopicDetails": {
            "title": "Include Topic Details",
            "type": "boolean",
            "description": "Add topicDetails part to API response (uses more quota).",
            "default": false
          },
          "includeStatus": {
            "title": "Include Status",
            "type": "boolean",
            "description": "Add status part to API response (privacy, upload, license info).",
            "default": false
          },
          "includeLiveStreamingDetails": {
            "title": "Include Live Streaming Details",
            "type": "boolean",
            "description": "Add liveStreamingDetails part to API response.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request Timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each API request.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retries for transient API errors (5xx).",
            "default": 3
          },
          "minDelayMs": {
            "title": "Min Delay Between Pages (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional delay between API pages for rate smoothing.",
            "default": 0
          },
          "debug": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging for debugging.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}