{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper: Search, Channels, Shorts & Video Details",
    "description": "Scrape YouTube search, channels, Shorts, live streams, playlists and hashtags with likes, exact views, upload date, duration, tags, category, chapters, comments count and subscribers. No API key or quota. For influencer research, SEO, competitor tracking and datasets.",
    "version": "1.0",
    "x-build-id": "cvShqW0n8Ck764ID2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/panix~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-panix-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/panix~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-panix-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/panix~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-panix-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What you would type into YouTube's search box, one per line. Each term returns up to Max results per input. You can also paste youtube.com search links (with their filters) here.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channel @handles or links, e.g. @TED, https://www.youtube.com/@mkbhd or https://www.youtube.com/channel/UC... Reads the channel tabs chosen below (Videos by default) and adds one channel row with subscribers, total views, country and links.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube links",
            "type": "array",
            "description": "Links to videos, Shorts, live streams, playlists, channels (including /videos, /shorts or /streams tabs), search results or hashtag pages. Bare video IDs and @handles work too.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most rows to return for each search term, channel, playlist or hashtag. YouTube shows about 500 results per search; deep search (below) finds more for larger numbers.",
            "default": 50
          },
          "videoDetails": {
            "title": "Full video details",
            "type": "boolean",
            "description": "Open each video for likes, exact view count, exact upload date and time, full description, duration, tags, category, chapters, comment count and channel subscribers. Switch off for faster list-only rows (title, views, duration, relative date, channel).",
            "default": true
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "videos",
              "shorts",
              "videosAndShorts",
              "channels",
              "playlists",
              "movies"
            ],
            "type": "string",
            "description": "Which kind of search results to return.",
            "default": "videos"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Relevance or popularity (most viewed first). YouTube no longer offers upload-date or rating sorting in search; use Upload date or Published after to get recent videos.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "lastHour",
              "today",
              "thisWeek",
              "thisMonth",
              "thisYear"
            ],
            "type": "string",
            "description": "YouTube's upload-date filter.",
            "default": "any"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "under4",
              "4to20",
              "over20"
            ],
            "type": "string",
            "description": "YouTube's length filter.",
            "default": "any"
          },
          "features": {
            "title": "Features",
            "uniqueItems": true,
            "type": "array",
            "description": "Only videos with all of these features.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creativeCommons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "Live",
                "4K",
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D",
                "HDR",
                "Location",
                "Purchased"
              ]
            }
          },
          "deepSearch": {
            "title": "Deep search",
            "type": "boolean",
            "description": "When a search ends before Max results (YouTube stops at about 500), run it again with other date, length and sort filters and add the new videos. Used only when Max results is above 300.",
            "default": true
          },
          "channelTabs": {
            "title": "Channel tabs",
            "uniqueItems": true,
            "type": "array",
            "description": "Which tabs to read for each channel.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "channelSortBy": {
            "title": "Channel sort order",
            "enum": [
              "newest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Order of the channel's videos, as on the channel page.",
            "default": "newest"
          },
          "includeChannelInfo": {
            "title": "Add a channel row",
            "type": "boolean",
            "description": "For every channel input, add one row with subscribers, total views, video count, joined date, country, description and links. Charged as one channel result.",
            "default": true
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published on or after this date: YYYY-MM-DD or a relative time such as \"7 days\", \"2 weeks\" or \"3 months\". Newest-first channel lists stop once they reach older videos, so scheduled channel checks stay cheap."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only videos published on or before this date (YYYY-MM-DD or a relative time)."
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Leave out videos with fewer views."
          },
          "maxViews": {
            "title": "Maximum views",
            "minimum": 0,
            "type": "integer",
            "description": "Leave out videos with more views (e.g. to find small creators)."
          },
          "uniqueVideos": {
            "title": "Remove duplicates across inputs",
            "type": "boolean",
            "description": "Return each video, channel and playlist once per run even when several searches or channels find it.",
            "default": true
          },
          "country": {
            "title": "Country (gl)",
            "type": "string",
            "description": "Two-letter country code YouTube uses for search results and trends, e.g. US, GB, IN, DE.",
            "default": "US"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Videos opened at the same time.",
            "default": 16
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) is used by default. Small player requests that YouTube refuses on datacenter IPs move to residential IPs automatically when your account has them.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}