{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper: Videos, Shorts & Channels",
    "description": "YouTube search results in YouTube's own order: videos, Shorts, channels, playlists, movies. $0.25 per 1,000 results. Each typed, with YouTube's search filters.",
    "version": "0.1",
    "x-build-id": "QfYANeRdgAAKRJXar"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-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/luzivanlt~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-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/luzivanlt~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-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": "Searches",
            "type": "array",
            "description": "Words to search YouTube for, one search per line, as you would type them in YouTube's search box, up to 200 characters each. The filters below apply to these searches. A link is refused here: paste it under Search links. Give at least one search or one link. Example: space documentary",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search links",
            "type": "array",
            "description": "YouTube search results links (https://www.youtube.com/results?search_query=…), with any filters you picked on YouTube. A link keeps its own filters; the filters below apply to the searches above. A link's own language and country (hl=, gl=) win over the fields below. Example: https://www.youtube.com/results?search_query=lofi+beats",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop each search after this many results, from 1 to 5,000 (100 by default). YouTube's own order comes first; YouTube stops one list after a few hundred results, so a search then goes on through YouTube's duration and upload-date filters, which list more. It caps what you pay: each result saved costs $0.0005 ($0.50 per 1,000), so 100 per search costs at most $0.05. A result found by two searches is charged once.",
            "default": 100
          },
          "resultType": {
            "title": "Type",
            "enum": [
              "all",
              "video",
              "short",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "Keep only results of this type. \"All\" keeps everything YouTube shows, in its order. Choose All, Videos, Shorts, Channels, Playlists (mixes and podcasts included) or Movies; default All. A pasted search link keeps every result it lists. Example: \"video\" for videos only.",
            "default": "all"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Keep only videos posted in this period: any time, today, this week, this month or this year. Default any time. Applies to the searches above; a pasted search link keeps its own filters. Example: \"month\" for videos posted this month.",
            "default": "any"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "under3",
              "3to20",
              "over20"
            ],
            "type": "string",
            "description": "Keep only videos of this length: any, under 3 minutes, 3–20 minutes or over 20 minutes. Default any. Applies to the searches above; a pasted search link keeps its own filters. Example: \"under3\" for videos under 3 minutes.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "The order YouTube lists the results in: relevance or popularity. Default relevance. With Max results per search set, it decides which results you get. Applies to the searches above; a pasted search link keeps its own. Example: \"popularity\" for the most popular first.",
            "default": "relevance"
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "Keep only videos with every feature picked: Live, 4K, HD, Subtitles/CC, Creative Commons, 360°, VR180, 3D, HDR, Location or Purchased. None by default. Applies to the searches above; a pasted search link keeps its own filters. Example: [\"4k\", \"subtitles\"] for 4K videos with subtitles.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creative_commons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "Live",
                "4K",
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D",
                "HDR",
                "Location",
                "Purchased"
              ]
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "The language YouTube answers in, as a code such as \"en\", \"de\" or \"pt-BR\". English gives the fullest rows: in other languages some counts are left empty. Default en. A pasted search link that names its own language (hl=) keeps it. Example: de for German.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "The country YouTube searches for, as a two-letter code such as \"US\", \"DE\" or \"VN\". Default US. A pasted search link that names its own country (gl=) keeps it. Example: DE to search YouTube as it appears in Germany.",
            "default": "US"
          },
          "includeVideoDetails": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Also read each video's and Short's own page: its exact upload date, exact like and view counts, the full description with its links and hashtags, the comment count, and its channel's name, handle and subscribers. One more read per video, so a run takes longer: about 20 to 25 more minutes per 1,000 videos. Off by default."
          },
          "includeChannelDetails": {
            "title": "Include channel details",
            "type": "boolean",
            "description": "Also read the About page of each channel in the results: its subscribers, exact total views, video count, joined date, description, country and links, added to every result from that channel (Shorts from a Shorts shelf do not name their channel, so they get none). One read per channel on each page of results, so a run takes longer: about 8 more minutes per 1,000 results. Off by 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}