{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper: Videos, Channels, Comments & Transcripts",
    "description": "Scrape YouTube search (videos, Shorts, channels, playlists), video details, related videos, comments and replies, transcripts, channel tabs, playlists, hashtags, community posts and live chat. Real-time, no API quota, clean JSON. Pay only for results.",
    "version": "1.0",
    "x-build-id": "bi1nNBgTDIVDnnfKZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapysocial~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapysocial-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/scrapysocial~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapysocial-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/scrapysocial~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapysocial-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",
        "required": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "What to scrape",
            "enum": [
              "search-all",
              "search-videos",
              "search-shorts",
              "search-channels",
              "search-playlists",
              "video-info",
              "video-related",
              "video-comments",
              "video-comment-replies",
              "video-transcript",
              "channel-info",
              "channel-about",
              "channel-videos",
              "channel-shorts",
              "channel-streams",
              "channel-playlists",
              "channel-podcasts",
              "channel-posts",
              "channel-search",
              "playlist-videos",
              "hashtag-videos",
              "post-detail",
              "post-comments",
              "post-comment-replies",
              "live-chat",
              "search-filters",
              "utility-resolve-url",
              "utility-channel-id"
            ],
            "type": "string",
            "description": "Pick the YouTube data you want. Then fill only the fields that endpoint uses (each field says which endpoints use it). Full list with descriptions: see the README tab.",
            "default": "search-videos"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search query, as typed in the YouTube search box.<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Channel Search +1 more. <b>Required by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Channel Search …. <b>Example:</b> <code>new york</code>"
          },
          "type": {
            "title": "Type",
            "enum": [
              "video",
              "channel",
              "playlist",
              "movie",
              "shorts"
            ],
            "type": "string",
            "description": "Result type. Allowed: `video`, `shorts`, `channel`, `playlist`, `movie`. Omit = everything (mixed results).<br><br><b>Used by:</b> Search All."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "popularity",
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Comment order. Allowed: `top` (most relevant first), `newest` (newest first). Omit = `top`. Ignored when `cursor` is sent (the cursor keeps the order of the first page).<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Video Comments."
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Upload date filter. Allowed: `hour` (last hour), `today`, `week` (this week), `month` (this month), `year` (this year). Omit = any time.<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts."
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Video length filter. Allowed: `short` (under 3 minutes), `medium` (3–20 minutes), `long` (over 20 minutes). Omit = any length.<br><br><b>Used by:</b> Search All, Search Videos."
          },
          "feature": {
            "title": "Feature",
            "enum": [
              "live",
              "4k",
              "hd",
              "subtitles",
              "creative_commons",
              "360",
              "vr180",
              "3d",
              "hdr",
              "location",
              "purchased"
            ],
            "type": "string",
            "description": "One feature filter. Allowed: `live` (live now), `4k`, `hd`, `subtitles` (subtitles/CC), `creative_commons`, `360` (360°), `vr180`, `3d`, `hdr`, `location` (has location), `purchased`. Omit = no feature filter. To combine several features use `sp` from `the \"Search Filters\" endpoint`.<br><br><b>Used by:</b> Search All, Search Videos."
          },
          "sp": {
            "title": "Sp",
            "type": "string",
            "description": "Advanced: raw YouTube filter code (the `sp=` value of a youtube.com search URL, or `options[].sp` from `the \"Search Filters\" endpoint`). It is applied after the friendly filters above, so it can add more filters (for example two features). Example `EgQQAUAB` = videos that are live now.<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Search Filters."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for texts such as \"3 days ago\" or \"1.2M views\" (YouTube `hl`), e.g. `en`, `id`, `es`, `pt-BR`. Omit = `en`.<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Video Info +22 more."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Content region (YouTube `gl`, ISO 3166-1 alpha-2 upper-case), e.g. `US`, `ID`, `GB`. Affects ranking and availability. Omit = `US`.<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Video Info +22 more."
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Pagination token. Omit for the first page; pass `cursor` from the previous response to get the next page (keep the other params the same).<br><br><b>Used by:</b> Search All, Search Videos, Search Shorts, Search Channels, Search Playlists, Related Videos +14 more. <b>Required by:</b> Comment Replies, Post Comment Replies."
          },
          "videoId": {
            "title": "Video ID",
            "type": "string",
            "description": "YouTube video id (11 characters, the `v=` value of a watch URL or the id in `/shorts/{id}`), e.g. `dQw4w9WgXcQ`.<br><br><b>Used by:</b> Video Info, Related Videos, Video Comments, Video Transcript, Live Chat. <b>Required by:</b> Video Info, Related Videos, Video Comments, Video Transcript, Live Chat. <b>Example:</b> <code>dQw4w9WgXcQ</code>"
          },
          "channelId": {
            "title": "Channel ID",
            "type": "string",
            "description": "Channel id (`UC…`, 24 characters), e.g. `UCX6OQ3DkcsbYNE6H8uQQuVA`. Send this **or** `handle`.<br><br><b>Used by:</b> Channel Info, Channel About, Channel Videos, Channel Shorts, Channel Live Streams, Channel Playlists +3 more."
          },
          "handle": {
            "title": "Handle",
            "type": "string",
            "description": "Channel handle with or without `@`, e.g. `@MrBeast` or `MrBeast`. Resolved to `channelId` automatically. Send this **or** `channelId`.<br><br><b>Used by:</b> Channel Info, Channel About, Channel Videos, Channel Shorts, Channel Live Streams, Channel Playlists +4 more. <b>Required by:</b> Channel ID From Handle. <b>Example:</b> <code>@MrBeast</code>"
          },
          "playlistId": {
            "title": "Playlist ID",
            "type": "string",
            "description": "Playlist id (the `list=` value of a playlist URL), e.g. `PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI`.<br><br><b>Used by:</b> Playlist Videos. <b>Required by:</b> Playlist Videos. <b>Example:</b> <code>PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI</code>"
          },
          "hashtag": {
            "title": "Hashtag",
            "type": "string",
            "description": "Hashtag with or without `#` (URL-encode `#` as `%23`), e.g. `travel`.<br><br><b>Used by:</b> Hashtag Videos. <b>Required by:</b> Hashtag Videos. <b>Example:</b> <code>travel</code>"
          },
          "hashtagParams": {
            "title": "Hashtag params",
            "type": "string",
            "description": "Internal — leave empty. Filled automatically from `hashtag`.<br><br><b>Used by:</b> Hashtag Videos."
          },
          "postId": {
            "title": "Post ID",
            "type": "string",
            "description": "Community post id (from `the \"Channel Posts\" endpoint` → `posts[].id`, or the id in a youtube.com/post/{id} URL), e.g. `UgkxIkDHJ9iW7XmjtMbke3Ud7rEiV5jSHDnR`.<br><br><b>Used by:</b> Post Detail, Post Comments. <b>Required by:</b> Post Detail, Post Comments. <b>Example:</b> <code>UgkxIkDHJ9iW7XmjtMbke3Ud7rEiV5jSHDnR</code>"
          },
          "postParams": {
            "title": "Post params",
            "type": "string",
            "description": "Internal — leave empty. Filled automatically from `postId`.<br><br><b>Used by:</b> Post Detail, Post Comments."
          },
          "url": {
            "title": "URL",
            "type": "string",
            "description": "Full youtube.com URL, e.g. `https://www.youtube.com/@MrBeast`, `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `https://www.youtube.com/hashtag/travel`.<br><br><b>Used by:</b> Resolve URL. <b>Required by:</b> Resolve URL. <b>Example:</b> <code>https://www.youtube.com/@MrBeast</code>"
          },
          "maxItems": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop paginating a query after this many results. Each saved result is one billable \"result-item\" event.",
            "default": 100
          },
          "maxPages": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on API pages fetched per query (a page is usually 10–50 results).",
            "default": 10
          },
          "batch": {
            "title": "Batch (many queries in one run)",
            "type": "array",
            "description": "Optional JSON array. Each object is one query for the selected endpoint; its keys override the form fields above. Example: <code>[{\"handle\":\"@MrBeast\"},{\"handle\":\"@NASA\"}]</code>"
          },
          "splitItems": {
            "title": "One row per result",
            "type": "boolean",
            "description": "On (recommended): every post/user/comment is its own dataset row. Off: one row per API page (the list stays nested). Billing is per result either way.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many batch queries run at the same time.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}