{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Trending & Hype Pulse — Rising Videos by Region",
    "description": "Scrape YouTube Trending plus the new Hype leaderboard by region and category. The only Apify actor exposing YouTube's Hype tab — catch rising videos before they peak. Multi-region scan, multi-niche cuts, clean structured rows. Built for trend forecasters, news outlets, and content strategists.",
    "version": "1.0",
    "x-build-id": "ztrH405t3SW42VqfX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~youtube-trending-hype-pulse/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-youtube-trending-hype-pulse",
        "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/sian.agency~youtube-trending-hype-pulse/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-youtube-trending-hype-pulse",
        "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/sian.agency~youtube-trending-hype-pulse/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-youtube-trending-hype-pulse",
        "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": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "🎯 Operation",
            "enum": [
              "trending",
              "hype",
              "home",
              "trendingAndHype"
            ],
            "type": "string",
            "description": "Which operation to run. **`trending`** pulls the canonical YouTube Trending tab for a region (single page, 30-50 rows). **`hype`** pulls the new Hype leaderboard for a region — UNIQUE TO THIS ACTOR, surfaces rising videos before they peak (100 rows per page, paginated by niche). **`home`** pulls the region home-feed with personalized + topical mixes. **`trendingAndHype`** runs both in one input — best for daily-cron dashboards.",
            "default": "trending"
          },
          "region": {
            "title": "🌍 Region (single)",
            "type": "string",
            "description": "Uppercase 2-letter ISO 3166-1 alpha-2 country code (e.g. `US`, `GB`, `DE`, `JP`, `BR`, `IN`, `MX`, `FR`, `KR`, `CA`). Determines which country's Trending / Hype / Home feed to pull. Defaults to `US` when omitted. Use **`regions`** below to scan multiple regions in one run.",
            "default": "US"
          },
          "regions": {
            "title": "🌎 Regions (multi-region scan)",
            "type": "string",
            "description": "Optional — for multi-region scans. Comma-separated OR newline-separated uppercase 2-letter ISO codes (e.g. `US,GB,DE,JP,BR`). When provided, the actor iterates each region for the chosen `operation` and tags every row with its source region. Max 25 regions per run. Overrides `region` when set."
          },
          "niche": {
            "title": "🎭 Niche / Category (single)",
            "type": "string",
            "description": "Optional category filter. For **`trending`** mode: one of `music` or `gaming` (omit for the catch-all Trending tab). For **`hype`** mode: free-string filter label such as `All`, `Gaming`, `Sports`, `Music`, `Food`, `DIY`, `Style`, `Books`, `Podcast` (varies by region). For **`home`** mode: free-string label from YouTube's region-dynamic filter list. Omit for the default (`All`). Use **`niches`** below to scan multiple cuts in one run."
          },
          "niches": {
            "title": "🎨 Niches (multi-niche scan)",
            "type": "string",
            "description": "Optional — for multi-niche scans. Comma-separated OR newline-separated niche labels (e.g. `Music,Gaming,Sports`). When provided, the actor iterates each niche for the chosen `operation` + `region` and tags every row with its source niche. Max 10 niches per run. Overrides `niche` when set."
          },
          "maxPages": {
            "title": "📄 Max pages per region+niche",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Max paginated pages to fetch PER region+niche pair (for `hype` and `home` operations). Each Hype page returns ~100 rows (All) or ~50 rows (per-niche). Each Home page returns ~25 video rows (ads filtered out). Set to `1` for cheap sampling, `2-3` for a quality dataset. Range 1-10. **Has no effect on `trending` mode** (single page only — YouTube doesn't paginate Trending).",
            "default": 1
          },
          "lang": {
            "title": "🗣 Language (optional)",
            "type": "string",
            "description": "Optional language code (e.g. `en`, `es`, `ja`, `ar`, `pt`) to localize result language. Pairs well with `region`. Omit for region default."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}