{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Scraper [FAST] | Search & Channel Videos",
    "description": "Search YouTube videos by keyword or scrape channel uploads. Get views, dates, duration, thumbnails, and optional descriptions, likes, comment counts, and tags. Multi-keyword search, title filters, and resumable cursors. Pay per delivered video—no video-result charge for failed results.",
    "version": "0.0",
    "x-build-id": "FEoQreGCPAmVz1kVE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apizy~youtube-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apizy-youtube-video-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/apizy~youtube-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apizy-youtube-video-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/apizy~youtube-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apizy-youtube-video-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "channel"
            ],
            "type": "string",
            "description": "Search videos finds videos across YouTube. Channel videos collects uploads from one channel. Fill only the settings section matching your mode; the other section is ignored."
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search mode only. One keyword or phrase per line. Each keyword is searched across YouTube with its own result limit.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Videos per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Search mode only. Maximum matching videos per keyword; leave unset to use 20. Shared videos are stored once, with every keyword match recorded."
          },
          "sortBy": {
            "title": "Prioritize",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Search mode only. Leave unset to use Relevance."
          },
          "uploadPeriod": {
            "title": "Upload period",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Search mode only. Leave unset for any time."
          },
          "duration": {
            "title": "Video duration",
            "enum": [
              "any",
              "under3",
              "between3and20",
              "over20"
            ],
            "type": "string",
            "description": "Search mode only. Leave unset for any duration."
          },
          "country": {
            "title": "Search country",
            "type": "string",
            "description": "Search mode only. Leave empty to use US. Sets search context, not the creator’s location."
          },
          "language": {
            "title": "Search language",
            "type": "string",
            "description": "Search mode only. Leave empty to use en. Sets YouTube interface/relevance context, not the spoken language. Raw localized counts and dates are preserved."
          },
          "channelUrl": {
            "title": "Channel URL",
            "type": "string",
            "description": "Channel mode only. Enter a YouTube channel URL, such as https://www.youtube.com/@mkbhd. Search mode ignores this field and searches across YouTube."
          },
          "maxVideos": {
            "title": "Maximum videos",
            "enum": [
              "10",
              "20",
              "50",
              "100",
              "300",
              "500",
              "1000"
            ],
            "type": "string",
            "description": "Channel mode only. Maximum videos to save; leave unset to use 20. Ignored in Search mode."
          },
          "titleInclude": {
            "title": "Title must include",
            "type": "array",
            "description": "Keep titles containing these literal phrases, case-insensitive. Matching is substring-based, not regex.",
            "items": {
              "type": "string"
            }
          },
          "titleMatch": {
            "title": "Match included phrases",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Use Any phrase or All phrases for Title must include. Leave unset to use Any phrase."
          },
          "titleExclude": {
            "title": "Exclude titles containing",
            "type": "array",
            "description": "Skip a video if its title contains any of these phrases. Filtered videos are not saved.",
            "items": {
              "type": "string"
            }
          },
          "includeVideoDetails": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Optional in both modes; off when unset. Adds metadata such as description, likes, comments, exact dates, tags and category when available. Keeps the basic result if enrichment fails."
          },
          "cursor": {
            "title": "Continuation cursor",
            "type": "string",
            "description": "Channel mode or a single keyword: reuse nextCursor from OUTPUT. For search, keep the same keyword, filters, country and language. Search cursors expire after 24 hours."
          },
          "searchCursors": {
            "title": "Cursors per keyword (Search only)",
            "type": "array",
            "description": "Multi-keyword search: copy each keyword and its nextCursor into an entry with keyword and cursor. Omit exhausted keywords from searchKeywords to avoid restarting them.",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string",
                  "title": "Keyword",
                  "editor": "textfield",
                  "description": "The exact keyword to resume, matching an entry in searchKeywords."
                },
                "cursor": {
                  "type": "string",
                  "title": "Cursor",
                  "editor": "textfield",
                  "description": "Copy nextCursor for this keyword from the previous run summary."
                }
              },
              "required": [
                "keyword",
                "cursor"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}