{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper: YouTube Search Results & Videos",
    "description": "Scrape YouTube search results for any keyword: video title, URL, views, duration, upload date, channel and thumbnail, plus Shorts. Filter by upload date, type or length, sort by popularity, and run many keywords at once. No API key, no login.",
    "version": "0.1",
    "x-build-id": "Ghn7JKZGBVDtUsIjY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xmolodtsov~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xmolodtsov-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/xmolodtsov~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xmolodtsov-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/xmolodtsov~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xmolodtsov-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": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "One search per line, in any language, exactly as you would type it into YouTube. Required unless you add search result URLs below. You can also paste a YouTube search results URL (youtube.com/results?search_query=…); its own filters are kept.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search result URLs",
            "type": "array",
            "description": "Optional, instead of or next to search terms: YouTube search results URLs (youtube.com/results?search_query=…), for example from a list you already have. Each URL keeps its own filters. Video, channel and playlist URLs aren't supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max videos per search",
            "minimum": 0,
            "type": "integer",
            "description": "How many regular videos and live streams to return for each search term. YouTube usually lists 200–400 results per search. Set 0 to get Shorts only. Free Apify plan: 10 results per run in total.",
            "default": 50
          },
          "maxResultsShorts": {
            "title": "Max Shorts per search",
            "minimum": 0,
            "type": "integer",
            "description": "How many Shorts to return for each search term, on top of the videos. Each Short comes with its channel, upload date and exact view count. 0 skips Shorts. With \"Popularity\" sorting YouTube shows no Shorts next to videos (set max videos to 0 to get popular Shorts); \"Videos only\" excludes them.",
            "default": 0
          },
          "sortingOrder": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "views"
            ],
            "type": "string",
            "description": "YouTube's \"Prioritize\" setting. YouTube no longer offers sorting by upload date or rating; use \"Upload date\" below for recent videos.",
            "default": "relevance"
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded within this window. YouTube mixes a few older videos into date-filtered results; this Actor drops them by their listed upload date."
          },
          "videoType": {
            "title": "Type",
            "enum": [
              "video"
            ],
            "type": "string",
            "description": "\"Videos only\" hides Shorts, channels and playlists from YouTube's results. Leave empty for the normal mix."
          },
          "lengthFilter": {
            "title": "Duration",
            "enum": [
              "under4",
              "between420",
              "plus20"
            ],
            "type": "string",
            "description": "YouTube's duration buckets. YouTube changed them to under 3 minutes, 3–20 minutes and over 20 minutes; the option names stay compatible with other YouTube scrapers."
          },
          "isLive": {
            "title": "Live now",
            "type": "boolean",
            "description": "Only live streams that are on air."
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Only videos available in 4K."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Only videos available in 720p or higher."
          },
          "hasSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Only videos with subtitles or closed captions."
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Only videos under a Creative Commons licence (reuse allowed)."
          },
          "is360": {
            "title": "360°",
            "type": "boolean",
            "description": "Only 360° videos."
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Only VR180 videos."
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Only 3D videos (YouTube counts VR180 stereo videos as 3D)."
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Only videos available in HDR."
          },
          "hasLocation": {
            "title": "Location",
            "type": "boolean",
            "description": "Only videos with a location tag. Works best when the search names a place; generic searches often return nothing."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Apify datacenter proxy by default, which YouTube search accepts. Change it only to use residential or your own proxies."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}