{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper - Keywords & Hashtags with Filters",
    "description": "[$1/1000] Search YouTube videos, channels and playlists by keyword with every official filter (date, length, HD, subtitles, live, country, language), with exact stats, comments and a summary per query. #hashtags work without a key.",
    "version": "0.1",
    "x-build-id": "SP09jgBhPsUubAivo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amethys~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amethys-youtube-search-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/amethys~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-amethys-youtube-search-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/amethys~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-amethys-youtube-search-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": {
          "queries": {
            "title": "Search keywords or #hashtags",
            "type": "array",
            "description": "One search per line. Keywords use the official YouTube Data API with your own key. #hashtags (e.g. #minecraft) also work without a key: you get the hashtag's top 20 videos plus its total video and channel counts.",
            "items": {
              "type": "string"
            }
          },
          "youtubeApiKey": {
            "title": "Your YouTube Data API key",
            "type": "string",
            "description": "Required for keyword search, optional for #hashtags. Free: Google Cloud Console > APIs & Services > Library > enable 'YouTube Data API v3' > Credentials > Create API key. Each page of up to 50 search results costs 100 of your 10,000 free daily quota units. Stored encrypted."
          },
          "searchTypes": {
            "title": "Result types",
            "type": "array",
            "description": "Which result types to return: videos, channels and/or playlists.",
            "items": {
              "type": "string",
              "enum": [
                "video",
                "channel",
                "playlist"
              ],
              "enumTitles": [
                "Videos",
                "Channels",
                "Playlists"
              ]
            },
            "default": [
              "video"
            ]
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "YouTube returns up to ~500 results per search. 50 results = 100 quota units.",
            "default": 50
          },
          "order": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date",
              "viewCount",
              "rating",
              "title",
              "videoCount"
            ],
            "type": "string",
            "description": "Sort order of the search results.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Uploaded after",
            "type": "string",
            "description": "Only results published on or after this date (YYYY-MM-DD)."
          },
          "publishedBefore": {
            "title": "Uploaded before",
            "type": "string",
            "description": "Only results published on or before this date (YYYY-MM-DD)."
          },
          "regionCode": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code to search as (US, ID, GB, IN, ...)."
          },
          "relevanceLanguage": {
            "title": "Language",
            "type": "string",
            "description": "Prefer results in this language (ISO 639-1 code: en, id, es, ja, ...)."
          },
          "safeSearch": {
            "title": "Safe search",
            "enum": [
              "moderate",
              "none",
              "strict"
            ],
            "type": "string",
            "description": "Filter restricted content from search results.",
            "default": "moderate"
          },
          "videoDuration": {
            "title": "Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Video length filter (videos only).",
            "default": "any"
          },
          "videoDefinition": {
            "title": "Quality",
            "enum": [
              "any",
              "high",
              "standard"
            ],
            "type": "string",
            "description": "HD / SD filter (videos only).",
            "default": "any"
          },
          "videoCaption": {
            "title": "Subtitles",
            "enum": [
              "any",
              "closedCaption",
              "none"
            ],
            "type": "string",
            "description": "Subtitle filter (videos only).",
            "default": "any"
          },
          "eventType": {
            "title": "Live",
            "enum": [
              "live",
              "upcoming",
              "completed"
            ],
            "type": "string",
            "description": "Live broadcast filter (videos only). Leave empty for all videos."
          },
          "videoLicense": {
            "title": "License",
            "enum": [
              "any",
              "creativeCommon",
              "youtube"
            ],
            "type": "string",
            "description": "License filter (videos only).",
            "default": "any"
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "any",
              "episode",
              "movie"
            ],
            "type": "string",
            "description": "Episode / movie filter (videos only).",
            "default": "any"
          },
          "videoEmbeddable": {
            "title": "Embeddable videos only",
            "type": "boolean",
            "description": "Only videos that can be embedded on other websites.",
            "default": false
          },
          "videoCategoryId": {
            "title": "Category ID",
            "type": "string",
            "description": "e.g. 10 = Music, 20 = Gaming, 17 = Sports, 25 = News & Politics, 27 = Education, 28 = Science & Technology."
          },
          "channelId": {
            "title": "Only inside this channel",
            "type": "string",
            "description": "Channel ID (UC...) to search within."
          },
          "enrichResults": {
            "title": "Add full statistics",
            "type": "boolean",
            "description": "Fetch exact views, likes, comments, duration, tags and more for videos, subscriber and video counts for channels, and video counts for playlists. ~1 quota unit per 50 results.",
            "default": true
          },
          "scrapeVideoPages": {
            "title": "Open video pages (no quota)",
            "type": "boolean",
            "description": "Open each video's public page for extra fields: chapters, caption languages, channel badge and subscribers, and (optionally) related videos. Slower.",
            "default": false
          },
          "includeRelatedVideos": {
            "title": "Include related videos",
            "type": "boolean",
            "description": "Only with 'Open video pages'.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Top-level comments to save inside each video. 0 = none. 1 quota unit per 100 comments.",
            "default": 0
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Replies to keep under each comment. 0 = none. Extra replies cost 1 quota unit per 100.",
            "default": 0
          },
          "commentsOrder": {
            "title": "Comment order",
            "enum": [
              "relevance",
              "time"
            ],
            "type": "string",
            "description": "Order of top-level comments: YouTube's top comments or newest first.",
            "default": "relevance"
          },
          "includeQuerySummary": {
            "title": "Add a summary row per query",
            "type": "boolean",
            "description": "Total matches, views (total/average/median), top channels, top tags and hashtags, most-viewed and newest video, quota used.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional; only used for #hashtag and video pages."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}