{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Hashtag Trend Discovery — Find Trending Videos",
    "description": "Discover viral YouTube hashtags by topic. Find trending Shorts and videos behind any hashtag — explore, bulk-audit, autocomplete-discover, or expand into related hashtags. Built for social media managers, content strategists, and trend forecasters. No account or API key needed.",
    "version": "1.0",
    "x-build-id": "Te5dgmkJKS83c4Lse"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~youtube-hashtag-trend-discovery/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-youtube-hashtag-trend-discovery",
        "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-hashtag-trend-discovery/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-youtube-hashtag-trend-discovery",
        "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-hashtag-trend-discovery/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-youtube-hashtag-trend-discovery",
        "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": [
              "hashtagVideos",
              "bulkHashtags",
              "suggestHashtags",
              "hashtagExpansion"
            ],
            "type": "string",
            "description": "Which operation to run. **`hashtagVideos`** explores ONE hashtag and returns trending videos or Shorts. **`bulkHashtags`** runs the same explore across many hashtags at once. **`suggestHashtags`** seeds YouTube's autocomplete (e.g. `trav` → `#travel`, `#traveltips`) for hashtag discovery. **`hashtagExpansion`** searches YouTube using a hashtag query and surfaces related hashtags + the trending content for each.",
            "default": "hashtagVideos"
          },
          "hashtag": {
            "title": "#️⃣ Hashtag (single)",
            "type": "string",
            "description": "**`hashtagVideos` mode.** A single hashtag to explore (e.g. `music`, `gaming`, `solana`). The `#` prefix is auto-stripped if present. Spaces are not allowed by YouTube — use the joined form (`machinelearning`, not `machine learning`). Non-Latin scripts and accented characters work fine (e.g. `アニメ`, `comida`)."
          },
          "hashtags": {
            "title": "📚 Hashtags (bulk)",
            "type": "string",
            "description": "**`bulkHashtags` mode.** A list of hashtags, comma-separated OR one per line. Each hashtag becomes one paginated pull. The `#` prefix is auto-stripped. Limit 200 hashtags per run — split larger jobs into multiple runs."
          },
          "seedTopic": {
            "title": "💡 Seed Topic (autocomplete)",
            "type": "string",
            "description": "**`suggestHashtags` mode.** A topic seed for YouTube's autocomplete engine (e.g. `trav`, `fitness`, `react`). YouTube returns up to 15 suggestions; we surface every suggestion that looks like a hashtag (starts with `#`) plus a normalized hashtag form for non-hashtag suggestions. Use this to find which hashtags YouTube *thinks* people search for in your topic."
          },
          "seedHashtag": {
            "title": "🌐 Seed Hashtag (expansion)",
            "type": "string",
            "description": "**`hashtagExpansion` mode.** A seed hashtag — we search YouTube with it as a query and return BOTH the related hashtag suggestions YouTube surfaces AND the trending videos for that search. Charges `related-hashtag-row` per related hashtag plus `hashtag-video-row` per video found."
          },
          "contentType": {
            "title": "🎥 Content Type",
            "enum": [
              "videos",
              "shorts"
            ],
            "type": "string",
            "description": "For `hashtagVideos` and `bulkHashtags`. **`videos`** returns long-form videos with full metadata (title, channel, description, viewCount, publishDate). **`shorts`** returns YouTube Shorts only — these are sparser (viewCount, videoId, and thumbnail only — title/channel/date are not returned by YouTube for the Shorts feed). Pick one. To get both, run twice.",
            "default": "videos"
          },
          "maxPages": {
            "title": "📄 Max pages per hashtag",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Max paginated pages to fetch PER hashtag for `hashtagVideos`, `bulkHashtags`, and `hashtagExpansion`. Each page returns about 36 video rows. Set to `1` for cheap sampling, `3-5` for a quality dataset, `10+` for deep dives. Range 1-25. Has no effect on `suggestHashtags` (single call always).",
            "default": 3
          },
          "geo": {
            "title": "🌍 Geo (optional)",
            "type": "string",
            "description": "Optional 2-letter country code (ISO 3166-1 alpha-2, e.g. `US`, `JP`, `DE`) to localize trending results. Different geos surface different videos for the same hashtag. Omit for global default."
          },
          "lang": {
            "title": "🗣 Language (optional)",
            "type": "string",
            "description": "Optional language code (e.g. `en`, `es`, `ja`, `ar`) to localize the result language. Pairs well with `geo`. Omit for 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}