{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper: Videos with Chapters",
    "description": "Scrape YouTube search results: videos, Shorts, channels and playlists with YouTube's filters, exact dates, likes, tags and the chapters of each video. $0.50 per 1,000 results, failed results free.",
    "version": "0.1",
    "x-build-id": "sqgNEnxHio02iX04D"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/farovin~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-farovin-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/farovin~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-farovin-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/farovin~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-farovin-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 queries",
            "type": "array",
            "description": "What you would type into the YouTube search box, one per line, e.g. \"python tutorial\". Search operators such as quotes and -word are passed to YouTube as typed.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube search URLs",
            "type": "array",
            "description": "Optional: full YouTube search links (youtube.com/results?search_query=...). The filters already in the link (sp=) are kept unless you set filters below.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many results to deliver for each query. YouTube usually stops after a few hundred results for one query.",
            "default": 50
          },
          "type": {
            "title": "Result type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "movie",
              "all"
            ],
            "type": "string",
            "description": "Which kind of results to collect. Uses YouTube's own Type filter.",
            "default": "video"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "YouTube's sort order. YouTube currently offers only these two; for the newest videos use \"Upload date\" or \"Published after\".",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload-date filter. With video details on, results YouTube lets through from outside the period are dropped and not charged.",
            "default": "any"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "under3",
              "3to20",
              "over20",
              "under4",
              "4to20"
            ],
            "type": "string",
            "description": "YouTube's duration filter.",
            "default": "any"
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "YouTube's feature filters; all selected must match.",
            "items": {
              "type": "string",
              "enum": [
                "hd",
                "4k",
                "hdr",
                "subtitles",
                "creativeCommons",
                "live",
                "360",
                "vr180",
                "3d",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "HD",
                "4K",
                "HDR",
                "Subtitles/CC",
                "Creative Commons",
                "Live",
                "360°",
                "VR180",
                "3D",
                "Location",
                "Purchased"
              ]
            }
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only videos published on or after this date (YYYY-MM-DD). Checked against the exact publish date when video details are on; skipped videos are not charged."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep only videos published on or before this date (YYYY-MM-DD). Skipped videos are not charged."
          },
          "includeChapters": {
            "title": "Video chapters",
            "type": "boolean",
            "description": "Add each video's chapters (title, start time and a link that opens the video at that point). Read from the creator's description, or from the chapters YouTube shows in search.",
            "default": true
          },
          "includeDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "Add the full description, tags, hashtags, exact view count, exact publish date, category and family-safe flag (one small extra request per video). Turn off for the fastest run with search-page data only.",
            "default": true
          },
          "includeLikes": {
            "title": "Like count",
            "type": "boolean",
            "description": "Add the exact like count (needs video details on). Empty when the creator hides likes.",
            "default": true
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code YouTube localises results for, e.g. US, GB, DE, GR.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language code, e.g. en, de, el. Affects texts like \"3 weeks ago\" and can change ranking.",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos are enriched at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave empty: on Apify the Actor uses residential proxy automatically, included in the price."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}