{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper - Search Results, Channels & Playlists",
    "description": "YouTube scraper for search results or a channel's newest uploads. Each row has the videoId, title, watch URL, channel, thumbnail, and the views, age and runtime exactly as YouTube prints them (\"4 years ago\", \"34,811,276 views\"). $0.135 per 1,000 videos.",
    "version": "0.1",
    "x-build-id": "detsAwRvjC4ptgoxt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-youtube-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/dami_studio~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-youtube-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/dami_studio~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-youtube-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": "Keywords to search YouTube for, one per line, for example \"lofi hip hop\" or \"python tutorial\". Each query returns up to Max videos. Leave empty if you only want channel videos. An empty result usually means the query genuinely has no matches.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs / handles",
            "type": "array",
            "description": "YouTube channels to pull videos from, one per line. Accepts full channel URLs (e.g. https://www.youtube.com/@LofiGirl, https://www.youtube.com/c/ChannelName, https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow), @handles (e.g. @LofiGirl), or raw UC channel ids (e.g. UCSJ4gkVC6NrvII8umztf0Ow). Each channel returns up to Max of its newest videos.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube links",
            "type": "array",
            "description": "Optional. Paste YouTube links, or upload a text file or a Google Sheet of them. A search results link runs that search with the filters in the link. A playlist link gives its videos, up to Max. A channel link works like the channel field. Single video links are not read.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max videos per query / channel",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum videos per search query, per channel and per playlist. A few hundred is realistic. Very large values take much longer and are likelier to come back short. 0 skips searches, playlists and the channels' Videos tab, for runs that only want Shorts, past streams or channel profiles.",
            "default": 50
          },
          "includeChannelFacts": {
            "title": "Add channel facts to search rows",
            "type": "boolean",
            "description": "Adds each channel's subscriber count, video count, banner and handle to search and playlist rows. It reads each channel's page once, so a run with many channels takes longer. Channel rows always carry these. Off by default.",
            "default": false
          },
          "includeCommentCount": {
            "title": "Comment count (optional add-on)",
            "type": "boolean",
            "description": "Optional add-on. Adds each video's comment count as YouTube shows it (rounded, like 4.1K) and whether comments are turned off.",
            "default": false
          },
          "channelProfilesOnly": {
            "title": "Channel profiles only (optional add-on)",
            "type": "boolean",
            "description": "Optional add-on. Each channel gives one row about the channel, with no videos: subscribers, video count, total views, joined date, country, description, links, avatar and banner.",
            "default": false
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only search results uploaded in this period. Applies to search queries.",
            "default": "any"
          },
          "duration": {
            "title": "Length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Only search results of this length. Short is under 3 minutes, medium 3 to 20 minutes, long over 20 minutes. Live streams have no length, so a length filter leaves them out.",
            "default": "any"
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "Only search results with all of these features. Creative Commons is the licence the uploader picked; check it yourself before reusing a video.",
            "items": {
              "type": "string",
              "enum": [
                "hd",
                "4k",
                "live",
                "subtitles",
                "creativeCommons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "HD",
                "4K",
                "Live now",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D",
                "HDR",
                "Has a location",
                "Purchased"
              ]
            },
            "default": []
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "videos",
              "channels",
              "movies"
            ],
            "type": "string",
            "description": "Videos (the default), channels, or movies. A channel search gives one row per channel; a movie search gives the films YouTube sells or rents.",
            "default": "videos"
          },
          "searchCountry": {
            "title": "Search country",
            "type": "string",
            "description": "Two-letter country code the search is made for, such as US, DE or BR. Leave empty for US."
          },
          "searchLanguage": {
            "title": "Search language",
            "type": "string",
            "description": "Language code for the search, such as en, de or pt-BR. Leave empty for English. In another language YouTube writes views and dates in that language, so viewCount and the other numbers worked out from that text come back empty."
          },
          "channelSort": {
            "title": "Channel videos order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Which of a channel's videos come first: the newest, the most viewed, or the oldest. Applies to the Videos tab.",
            "default": "latest"
          },
          "publishedAfter": {
            "title": "Only channel videos published after",
            "type": "string",
            "description": "A day like 2026-10-01, or a number of days like \"30 days\". Applies to the channels' videos and past streams. Older videos are left out and not charged."
          },
          "maxStreams": {
            "title": "Past live streams per channel",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many of each channel's past and current live streams to add, from its Live tab. 0 (the default) skips them.",
            "default": 0
          },
          "maxShorts": {
            "title": "Shorts per channel",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many of each channel's Shorts to add, from its Shorts tab. 0 (the default) skips them.",
            "default": 0
          },
          "notionConnector": {
            "title": "Notion connector (optional)",
            "type": "string",
            "description": "Optional. Write each video as a page into your Notion when the run finishes. Authorize a Notion connector once in Settings → API & Integrations → MCP connectors, then pick it here. Leave empty to skip (default), results are always saved to the dataset regardless."
          },
          "notionParentId": {
            "title": "Notion target data source ID",
            "type": "string",
            "description": "Optional. The Notion data source ID of the database to write into (only used if a Notion connector is set). Leave empty to create the pages privately in your workspace instead."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Leave this alone unless you need the run to go out through a particular network. Your own proxy servers are used exactly as given."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}