{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Search Scraper",
    "description": "YouTube Search Scraper helps you extract YouTube search results by keyword, discover relevant videos, and collect video titles, URLs, channel details, and other available data for SEO research, content discovery, and competitor analysis.",
    "version": "0.2",
    "x-build-id": "Cr4XfTuxm1Hn6GGqf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpha-scraper~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpha-scraper-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/alpha-scraper~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alpha-scraper-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/alpha-scraper~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alpha-scraper-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": {
          "keywords": {
            "title": "keywords",
            "type": "array",
            "description": "One or more keywords (e.g. 'pubg'). Every keyword is searched on its own and gets its own 'Max Items Per keyword'. Leave empty to scrape only the video & Shorts URLs below.",
            "items": {
              "type": "string"
            }
          },
          "contentType": {
            "title": "Content Type",
            "enum": [
              "video",
              "shorts",
              "both"
            ],
            "type": "string",
            "description": "'Videos' = regular videos and live streams, 'Shorts' = YouTube Shorts. With 'Videos and Shorts' the limit below is shared between the two types (half each).",
            "default": "both"
          },
          "maxItemsPerkeyword": {
            "title": "Max Items Per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items to extract per keyword. The Actor keeps loading result pages until this count is reached or the search has no more results. Videos skipped by the filters below (or as duplicates) do not count. Ignored when 'Newer Than' is set.",
            "default": 20
          },
          "extractTranscript": {
            "title": "Turn On to Extract Transcripts of every video/short with metadata",
            "type": "boolean",
            "description": "Turn on to extract the transcript of every video, in the format chosen below. Turn off to skip transcripts completely: no transcript is requested or returned, and the Transcript Format setting is ignored.",
            "default": true
          },
          "transcriptFormat": {
            "title": "Transcript Format Per video & short",
            "enum": [
              "All Formats",
              "Transcript with Timestamps",
              "Transcript Text (Paragraphs)",
              "One Line Text",
              "Word-level Transcript",
              "sentence_wise"
            ],
            "type": "string",
            "description": "Choose how the transcript should be formatted. Used only while 'Extract Transcripts' is turned on; ignored when it is off.",
            "default": "One Line Text"
          },
          "transcriptLanguage": {
            "title": "Transcript Language",
            "enum": [
              "ab",
              "aa",
              "af",
              "ak",
              "sq",
              "am",
              "ar",
              "hy",
              "as",
              "ay",
              "az",
              "bn",
              "ba",
              "eu",
              "be",
              "bho",
              "bs",
              "br",
              "bg",
              "my",
              "ca",
              "ceb",
              "zh-Hans",
              "zh-Hant",
              "co",
              "hr",
              "cs",
              "da",
              "dv",
              "nl",
              "dz",
              "en",
              "eo",
              "et",
              "ee",
              "fo",
              "fj",
              "fil",
              "fi",
              "fr",
              "gaa",
              "gl",
              "lg",
              "ka",
              "de",
              "el",
              "gn",
              "gu",
              "ht",
              "ha",
              "haw",
              "iw",
              "hi",
              "hmn",
              "hu",
              "is",
              "ig",
              "id",
              "iu",
              "ga",
              "it",
              "ja",
              "jv",
              "kl",
              "kn",
              "kk",
              "kha",
              "km",
              "rw",
              "ko",
              "kri",
              "ku",
              "ky",
              "lo",
              "la",
              "lv",
              "ln",
              "lt",
              "lua",
              "luo",
              "lb",
              "mk",
              "mg",
              "ms",
              "ml",
              "mt",
              "gv",
              "mi",
              "mr",
              "mn",
              "mfe",
              "ne",
              "new",
              "nso",
              "no",
              "ny",
              "oc",
              "or",
              "om",
              "os",
              "pam",
              "ps",
              "fa",
              "pl",
              "pt",
              "pt-PT",
              "pa",
              "qu",
              "ro",
              "rn",
              "ru",
              "sm",
              "sg",
              "sa",
              "gd",
              "sr",
              "crs",
              "sn",
              "sd",
              "si",
              "sk",
              "sl",
              "so",
              "st",
              "es",
              "su",
              "sw",
              "ss",
              "sv",
              "tg",
              "ta",
              "tt",
              "te",
              "th",
              "bo",
              "ti",
              "to",
              "ts",
              "tn",
              "tum",
              "tr",
              "tk",
              "uk",
              "ur",
              "ug",
              "uz",
              "ve",
              "vi",
              "war",
              "cy",
              "fy",
              "wo",
              "xh",
              "yi",
              "yo",
              "zu"
            ],
            "type": "string",
            "description": "Choose the language of the transcript. If a video has no captions in this language, YouTube's auto-translation or another language of the video is used instead. Used only while 'Extract Transcripts' is turned on; ignored when it is off.",
            "default": "en"
          },
          "minViews": {
            "title": "Minimum Views (Extract only videos & shorts with enough views.)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos with fewer views than this. Skipped videos do not count towards the item limit."
          },
          "minDuration": {
            "title": "Minimum Length (Skip videos shorter than this)",
            "type": "object",
            "description": "Skip videos shorter than this. Fill in any of the three boxes - for example 1 hour and 30 minutes, or just 90 minutes. Leave all three at 0 for no minimum. Shorts and live streams are not filtered.",
            "properties": {
              "hours": {
                "title": "Hours",
                "description": "Whole hours, for example 1.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "minutes": {
                "title": "Minutes",
                "description": "Minutes, for example 30. More than 59 is fine: 90 minutes is the same as 1 hour 30 minutes.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "seconds": {
                "title": "Seconds",
                "description": "Seconds, for example 45.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              }
            },
            "default": {
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "additionalProperties": false
          },
          "maxDuration": {
            "title": "Maximum Length (skip videos longer than this)",
            "type": "object",
            "description": "Skip videos longer than this. Fill in any of the three boxes - for example 1 hour and 30 minutes, or just 90 minutes. Leave all three at 0 for no maximum. Shorts and live streams are not filtered.",
            "properties": {
              "hours": {
                "title": "Hours",
                "description": "Whole hours, for example 1.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "minutes": {
                "title": "Minutes",
                "description": "Minutes, for example 30. More than 59 is fine: 90 minutes is the same as 1 hour 30 minutes.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "seconds": {
                "title": "Seconds",
                "description": "Seconds, for example 45.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              }
            },
            "default": {
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "additionalProperties": false
          },
          "min_Duration": {
            "title": "Minimum Length (Skip shorts shorter than this)",
            "type": "object",
            "description": "Skip shorts shorter than this. Fill in any of the three boxes - for example 1 hour and 30 minutes, or just 90 minutes. Leave all three at 0 for no minimum. Regular videos and live streams are not filtered.",
            "properties": {
              "hours": {
                "title": "Hours",
                "description": "Whole hours, for example 1.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "minutes": {
                "title": "Minutes",
                "description": "Minutes, for example 30. More than 59 is fine: 90 minutes is the same as 1 hour 30 minutes.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "seconds": {
                "title": "Seconds",
                "description": "Seconds, for example 45.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              }
            },
            "default": {
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "additionalProperties": false
          },
          "max_Duration": {
            "title": "Maximum Length (skip shorts longer than this)",
            "type": "object",
            "description": "Skip shorts longer than this. Fill in any of the three boxes - for example 1 hour and 30 minutes, or just 90 minutes. Leave all three at 0 for no maximum. Regular videos and live streams are not filtered.",
            "properties": {
              "hours": {
                "title": "Hours",
                "description": "Whole hours, for example 1.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "minutes": {
                "title": "Minutes",
                "description": "Minutes, for example 30. More than 59 is fine: 90 minutes is the same as 1 hour 30 minutes.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              },
              "seconds": {
                "title": "Seconds",
                "description": "Seconds, for example 45.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 0
              }
            },
            "default": {
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "additionalProperties": false
          },
          "individual_video/shorts_url": {
            "title": "Youtube Video & Shorts URL.",
            "type": "array",
            "description": "Enter direct Youtube video/shorts URLs to scrape individual data.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "newerThan": {
            "title": "Video & Shorts Newer Than (Date Filter)",
            "type": "string",
            "description": "Only return Video & Shorts posted on or after this date. Pick a date (YYYY-MM-DD) or type an age such as '2 weeks' (meaning 2 weeks ago). Leave empty for no filter."
          },
          "olderThan": {
            "title": "Video & Shorts Older Than (Date Filter)",
            "type": "string",
            "description": "Only return Video & Shorts posted BEFORE this date. Pick a date (YYYY-MM-DD) or type an age such as '1 month' (meaning 1 month ago). Combine it with 'Newer Than' to get a date range. Leave empty for no filter."
          },
          "scrapeVideoDetails": {
            "title": "Scrape Video Details",
            "type": "boolean",
            "description": "Open every video page to add likes, exact comment count, full description and links, tags, category, chapters, monetization and caption info. Turn off for a much faster and cheaper run that returns only what the search results list: title, URL, thumbnail, views, upload date, duration and channel name. Transcripts, channel details and the filters keep working when this is off: a video's page is then opened only when one of them needs it.",
            "default": true
          },
          "scrapeChannelDetails": {
            "title": "Scrape Channel Details",
            "type": "boolean",
            "description": "Open each channel's About page to add subscribers, description, country, join date, total views and videos, links and the verified badge. Every channel is opened once, however many of its videos are found.",
            "default": true
          },
          "removeDuplicates": {
            "title": "Remove Duplicate Videos",
            "type": "boolean",
            "description": "A video that matches several keywords (or is also listed in your URLs) is returned only once.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxies used to reach YouTube. Residential proxies are recommended: YouTube blocks most datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}