{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper: Videos, Shorts, Filters",
    "description": "YouTube search results for any keyword (title, channel, views, duration, date, rank) at $0.90 per 1,000. YouTube's own filters (upload date, length, HD, 4K, live, CC, Shorts), any country, full details optional. Free error rows.",
    "version": "0.1",
    "x-build-id": "sqbv9Wqa2WNIsrzaA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arcadium~youtube-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arcadium-youtube-search",
        "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/arcadium~youtube-search/runs": {
      "post": {
        "operationId": "runs-sync-arcadium-youtube-search",
        "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/arcadium~youtube-search/run-sync": {
      "post": {
        "operationId": "run-sync-arcadium-youtube-search",
        "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": "YouTube search terms, e.g. [\"web scraping tutorial\", \"iphone 17 review\"]. Each term gives up to maxResults videos in YouTube's search order (position is the rank).",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Search result URLs",
            "type": "array",
            "description": "Optional. YouTube search page URLs as copied from the browser, e.g. https://www.youtube.com/results?search_query=lofi (filters in the URL are kept). Channel, playlist and video links give a free error row.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max videos per search term",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Videos per search term or search URL, up to 10,000 (default 50). Videos outside the date range do not count."
          },
          "maxItems": {
            "title": "Max videos in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops the run after this many videos across all inputs, 1 to 1,000,000. A cost cap; leave empty for no limit."
          },
          "contentType": {
            "title": "Videos or Shorts",
            "enum": [
              "videos",
              "shorts"
            ],
            "type": "string",
            "description": "Values: videos (default), shorts. With shorts, every search returns Shorts only."
          },
          "sortingOrder": {
            "title": "Search sort order",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Values: relevance (default), rating, date (upload date), views."
          },
          "searchCountry": {
            "title": "Search country",
            "type": "string",
            "description": "Two-letter country code YouTube ranks search results for, e.g. DE or IN (default US). Titles and dates stay as published."
          },
          "dateFilter": {
            "title": "Search upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Values: hour, today, week, month, year. YouTube's own upload-date filter for searches; it is loose, so combine it with publishedAfter for an exact range."
          },
          "lengthFilter": {
            "title": "Search video length",
            "enum": [
              "under4",
              "between420",
              "plus20"
            ],
            "type": "string",
            "description": "Values: under4 (under 4 minutes), between420 (4 to 20 minutes), plus20 (over 20 minutes)."
          },
          "isHD": {
            "title": "Search: HD only",
            "type": "boolean",
            "description": "Search results in HD only (YouTube's HD feature filter)."
          },
          "hasSubtitles": {
            "title": "Search: with subtitles only",
            "type": "boolean",
            "description": "Search results that have subtitles or closed captions only."
          },
          "hasCC": {
            "title": "Search: Creative Commons only",
            "type": "boolean",
            "description": "Search results under a Creative Commons licence only."
          },
          "isLive": {
            "title": "Search: live now only",
            "type": "boolean",
            "description": "Search results that are live streams only."
          },
          "is4K": {
            "title": "Search: 4K only",
            "type": "boolean",
            "description": "Search results in 4K only (YouTube's 4K feature filter)."
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Date as YYYY-MM-DD (e.g. 2026-01-01) or a relative age such as \"30 days\". Older videos are skipped for free. In fast mode the listing date is approximate, so videos near the edge get one details request to check."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Date as YYYY-MM-DD (e.g. 2026-06-30) or a relative age such as \"7 days\". Newer videos are skipped for free."
          },
          "videoDetails": {
            "title": "Full video details",
            "type": "boolean",
            "description": "Off (default): fast mode, each result as the search page shows it (title, channel, rounded views, duration, approximate date, live/Shorts flags), charged at the video-listing price. On: one details request per video adds the exact publish date, exact views, likes, category, description, keywords and caption languages, charged at the video price.",
            "default": false
          },
          "includeCaptionLanguages": {
            "title": "Include caption languages",
            "type": "boolean",
            "description": "With full video details: adds captionLanguages and hasCaptions (one more small request per video). On by default.",
            "default": true
          },
          "includeCommentCount": {
            "title": "Include comment count for regular videos",
            "type": "boolean",
            "description": "With full video details: adds commentCount to regular videos (one more small request each). Shorts always get it. Off by default.",
            "default": false
          },
          "description": {
            "title": "Video description",
            "enum": [
              "full",
              "short",
              "none"
            ],
            "type": "string",
            "description": "With full video details. Values: full (default), short (about 300 characters), none. Emails and phone numbers are removed.",
            "default": "full"
          },
          "includeErrorRows": {
            "title": "Add a row for inputs and videos without data",
            "type": "boolean",
            "description": "Adds a free row (rowType error, with a code and message) for every search or URL that gave no data. On by default.",
            "default": true
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Advanced. How often a request is retried after a temporary error, 0 to 10.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy (advanced)",
            "type": "object",
            "description": "Advanced. Leave empty: the actor starts on datacenter proxies and moves to residential when YouTube asks to confirm you are not a bot."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}