{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Videos Scraper: Channels, Playlists, Search",
    "description": "YouTube videos and Shorts (title, channel, exact date, duration, views, likes, description) from channels, playlists, searches or links; $3.60 per 1,000 videos. Fast listing mode $1.17 per 1,000. No date-filter surcharge, free error rows.",
    "version": "0.1",
    "x-build-id": "LvYqzm6SRpfCHOcce"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arcadium~youtube-videos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arcadium-youtube-videos",
        "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-videos/runs": {
      "post": {
        "operationId": "runs-sync-arcadium-youtube-videos",
        "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-videos/run-sync": {
      "post": {
        "operationId": "run-sync-arcadium-youtube-videos",
        "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": {
          "urls": {
            "title": "Channel, playlist, video or hashtag URLs",
            "type": "array",
            "description": "Example: https://www.youtube.com/@kurzgesagt (add /shorts or /streams for those tabs), @handle, a channel id (UC...), a playlist URL (https://www.youtube.com/playlist?list=...), a video or Shorts URL, a hashtag page (https://www.youtube.com/hashtag/cooking, add /shorts for Shorts only), a bare video id (dQw4w9WgXcQ) or a search page URL (https://www.youtube.com/results?search_query=lofi). Channels give up to maxResults videos each, newest first by default.",
            "items": {
              "type": "string"
            }
          },
          "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). Can be combined with urls.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "YouTube hashtags, e.g. [\"#cooking\", \"dancechallenge\"] (letters, digits and _ only). Each gives up to maxResults videos from the hashtag page; with contentType shorts only its Shorts. Can be combined with urls and searchQueries.",
            "items": {
              "type": "string"
            }
          },
          "contentType": {
            "title": "Videos or Shorts",
            "enum": [
              "videos",
              "shorts"
            ],
            "type": "string",
            "description": "Values: videos (default), shorts. With shorts, search terms return Shorts only and hashtags read their Shorts tab. Channels: use maxResultsShorts or a /shorts channel URL. Full Shorts rows add commentCount, soundTitle and soundArtist and are charged as the short event."
          },
          "maxResults": {
            "title": "Max videos per channel, playlist or search term",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Videos per channel videos tab, playlist or search term, up to 10,000 (default 50). Videos outside the date range, private or members-only videos do not count. Direct video URLs are not limited by this."
          },
          "maxResultsShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Also read the channel's Shorts tab, up to this many Shorts per channel (0 = skip the tab, default). A /shorts channel URL reads only that tab.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Also read the channel's Live tab (past, running and scheduled streams), up to this many per channel (0 = skip the tab, default).",
            "default": 0
          },
          "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."
          },
          "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\", \"2 weeks\", \"1 year\". Older videos are skipped for free; a channel listed newest first stops at the first older videos."
          },
          "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."
          },
          "sortVideosBy": {
            "title": "Channel sort order",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Values: NEWEST (default), POPULAR (most viewed first), OLDEST. Applies to channel tabs. The date-range early stop works with NEWEST and OLDEST."
          },
          "listingOnly": {
            "title": "Fast mode: listing data only",
            "type": "boolean",
            "description": "Skips the per-video details request and returns what the channel, playlist or search listing shows: title, rounded views, duration, approximate date (publishDateIsApprox true), channel. No likes, category, description or caption languages. Charged at the lower video-listing price. Off by default."
          },
          "includeCaptionLanguages": {
            "title": "Include caption languages",
            "type": "boolean",
            "description": "Adds captionLanguages (every caption track: code, name, auto-generated flag) and hasCaptions. One more small request per video. On by default; ignored in fast mode.",
            "default": true
          },
          "includeCommentCount": {
            "title": "Include comment count for regular videos",
            "type": "boolean",
            "description": "Adds commentCount to regular videos (one more small request each). Shorts always get it. Ignored in fast mode. Off by default.",
            "default": false
          },
          "description": {
            "title": "Video description",
            "enum": [
              "full",
              "short",
              "none"
            ],
            "type": "string",
            "description": "Values: full (default), short (about 300 characters), none. Emails and phone numbers are removed.",
            "default": "full"
          },
          "sortingOrder": {
            "title": "Search sort order",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Values: relevance (default), rating, date (upload date), views. Applies to searchQueries and search URLs."
          },
          "searchCountry": {
            "title": "Search country",
            "type": "string",
            "description": "Two-letter country code YouTube ranks search results for, e.g. DE or IN (default US). Applies to searchQueries and search URLs; 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)."
          },
          "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 URL, private, age-restricted, members-only or missing video 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}