{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper API – Videos, Channels & Search, No Login",
    "description": "Get YouTube video stats and metadata by link, search, channel or playlist, with no login or API key: exact views and likes, comment count, length, publish date, description, subscribers. Videos and Shorts. From $1 per 1,000 full videos, $0.40 for lists. 500 results free monthly.",
    "version": "0.2",
    "x-build-id": "N1s9Ccf3HAcOa54yN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/k-data-lab~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-k-data-lab-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/k-data-lab~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-k-data-lab-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/k-data-lab~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-k-data-lab-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 terms",
            "type": "array",
            "description": "Words to search on YouTube, one per line, as in YouTube's search bar. Use this to find videos or channels on a topic. Fill this field, YouTube links, or both. Example: coffee review",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube links, handles or IDs",
            "type": "array",
            "description": "Use this for known videos, channels or playlists: video, Shorts, live, channel, @handle, playlist or search-results links, or bare 11-character video IDs, one per line. To get stats for a list of videos, paste them here. Examples: https://www.youtube.com/watch?v=dQw4w9WgXcQ, @veritasium, https://www.youtube.com/playlist?list=PLBCF2DAC6FFB574DE",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per search, channel tab or playlist",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops each search, channel tab or playlist at this many rows. Pasted video links always return one row each. YouTube ends a search list on its own, usually after a few hundred results. Channels and playlists go to the end.",
            "default": 50
          },
          "videoDetails": {
            "title": "Add video details (exact likes, exact date, full description)",
            "type": "boolean",
            "description": "Opens each video's page for exact likes, exact views, exact publish date, full description, hashtags, chapters, comment count and subscribers. Keep on for video stats and metadata. Turn off for fast, cheaper lists with the fields shown on result cards. Pasted video links always use details.",
            "default": true
          },
          "channelDetails": {
            "title": "Add one channel or playlist summary row",
            "type": "boolean",
            "description": "For each channel link: one row with subscribers, total views, video count, country, join date and external links. For each playlist link: one row with title, owner and totals.",
            "default": true
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "videos",
              "shorts",
              "channels",
              "playlists",
              "all"
            ],
            "type": "string",
            "description": "What kind of results a search returns: videos, shorts, channels, playlists or all.",
            "default": "videos"
          },
          "sortBy": {
            "title": "Sort search by",
            "enum": [
              "relevance",
              "popular"
            ],
            "type": "string",
            "description": "relevance or popular. YouTube now offers these two. For the newest videos, use 'Uploaded' or 'Published after', or a channel with 'Latest'.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Uploaded",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload date filter: any, today, week, month or year.",
            "default": "any"
          },
          "duration": {
            "title": "Length",
            "enum": [
              "any",
              "under3",
              "between3and20",
              "over20"
            ],
            "type": "string",
            "description": "YouTube's length filter: any, under3, between3and20 or over20 minutes.",
            "default": "any"
          },
          "features": {
            "title": "Features",
            "uniqueItems": true,
            "type": "array",
            "description": "Only videos with all of these features, such as live, 4k or subtitles.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creative_commons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "Live",
                "4K",
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D",
                "HDR",
                "Location",
                "Purchased"
              ]
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code for YouTube's results, such as US, KR, JP or DE.",
            "default": "US"
          },
          "channelContent": {
            "title": "Channel tabs to read",
            "uniqueItems": true,
            "type": "array",
            "description": "Which tabs to read for each channel link: videos, shorts, streams. Max results applies to each tab.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "channelSort": {
            "title": "Channel order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "latest, popular or oldest. Same as the buttons at the top of a channel's Videos tab.",
            "default": "latest"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos from this date on, as 2026-10-01 or an age such as 7 days. Free to use. Exact when video details are on; without them it relies on YouTube's rounded text, such as '2 weeks ago'."
          },
          "monitorName": {
            "title": "Monitor name (only new videos)",
            "type": "string",
            "description": "Give a schedule a name, such as my-competitors, and each run returns only videos that runs under that name have not returned yet. Remembers up to 50,000 videos per name."
          },
          "dedupe": {
            "title": "Skip duplicates within a run",
            "type": "boolean",
            "description": "A video found by two searches is returned, and charged, once.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}