{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper",
    "description": "[💰 $3.99 / 1K videos] YouTube videos, Shorts, live streams, comments, transcripts and creators from searches, channels, playlists or links · exact publish time, likes, comment count, channel country and links on every row · No account, no proxy. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "fetg5b70YWDL9MESW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sleepmodesystems~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sleepmodesystems-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/sleepmodesystems~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sleepmodesystems-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/sleepmodesystems~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sleepmodesystems-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 YouTube for",
            "type": "array",
            "description": "Words as you would type them in YouTube's search box, one search per line. Start with # for a hashtag's page (#cooking). Example: golang tutorial.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Videos, channels, playlists or links",
            "type": "array",
            "description": "Any YouTube link (video, Short, live, channel, channel tab, playlist, search results, hashtag), or just an @handle, a channel id (UC...), a video id or a playlist id. Channels are read to the end of their list, not just the first 200 videos. Example: https://www.youtube.com/@TechWorldwithNana",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Videos per search or link",
            "minimum": 0,
            "type": "integer",
            "description": "How many regular videos to return for each search, channel, playlist or hashtag. 0 means everything YouTube shows (a search goes as deep as YouTube's own results, often 400 to 500 videos).",
            "default": 50
          },
          "maxShorts": {
            "title": "Shorts per search or channel",
            "minimum": 0,
            "type": "integer",
            "description": "How many Shorts to return for each search or channel, on top of the videos above. 0 = none.",
            "default": 0
          },
          "maxLive": {
            "title": "Live streams per search or channel",
            "minimum": 0,
            "type": "integer",
            "description": "How many live streams (live now and past streams) to return for each search or channel. 0 = none.",
            "default": 0
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Only videos published on or after this day: a date (2025-01-01) or a span back from today (30 days, 6 months, 2 years). Works the same for searches, channels and playlists."
          },
          "dateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Only videos published on or before this day. Together with the start date, this gives a window such as all of 2025."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "relevance",
              "popular",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Searches: relevance or popularity (YouTube's own search choices). Channels: newest, popular or oldest first.",
            "default": "relevance"
          },
          "duration": {
            "title": "Length (searches)",
            "enum": [
              "any",
              "under3",
              "3to20",
              "over20"
            ],
            "type": "string",
            "description": "YouTube's length filter for searches.",
            "default": "any"
          },
          "features": {
            "title": "Features (searches)",
            "type": "array",
            "description": "Only videos with all of these, as in YouTube's search filters.",
            "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"
              ]
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Results as YouTube shows them in this country (two letters: US, GB, DE, IN, BR...). Titles stay as their creators wrote them.",
            "default": "US"
          },
          "videoDetails": {
            "title": "Complete video rows",
            "type": "boolean",
            "description": "On: every video row has the exact publish date and time, likes, comment count, category, tags and the channel's country, joined date, total views, links and business-email flag. Off: lean rows with what YouTube's lists show (title, views, length, a publish date worked out from \"3 weeks ago\"), at a lower price per row.",
            "default": true
          },
          "creatorsOnly": {
            "title": "Creators, not videos",
            "type": "boolean",
            "description": "One row per channel instead of per video: every channel that has videos for your search (with the video that matched), or each channel you link. Each row has subscribers, total views, video count, country, joined date, links and whether a business email is listed. For finding creators to contact.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per video",
            "minimum": 0,
            "type": "integer",
            "description": "Also return up to this many comments for each video, inside the video's row (author, channel id, likes, replies, pinned, hearted by the creator). 0 = no comments.",
            "default": 0
          },
          "commentsSort": {
            "title": "Comments order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Top comments as YouTube ranks them, or newest first (newest first reaches every comment).",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also return the replies under each comment (they count toward the comments per video).",
            "default": false
          },
          "commentsFrom": {
            "title": "Comments from",
            "type": "string",
            "description": "Only comments from this day on: a date (2025-01-01) or a span back from today (30 days, 6 months). YouTube shows comment dates as \"3 weeks ago\", so the day is worked out from that. With Newest first, reading stops at the first older comment."
          },
          "commentsAsRows": {
            "title": "Comments as separate rows",
            "type": "boolean",
            "description": "Return each comment as its own row instead of inside its video's row, for one flat table of comments (export the \"Comments (separate rows)\" view).",
            "default": false
          },
          "transcripts": {
            "title": "Transcripts",
            "type": "boolean",
            "description": "Add each video's transcript to its row, from the video's captions (made by the creator, or YouTube's automatic ones). Charged only for videos that have one; every row says why when there is none.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript language",
            "type": "string",
            "description": "A language code such as en, es, de or pt. Empty = the video's own language.",
            "default": ""
          },
          "transcriptFormat": {
            "title": "Transcript format",
            "enum": [
              "text",
              "timestamps",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "Plain text, text with timestamps, or subtitle files (SRT, WebVTT).",
            "default": "text"
          },
          "onlyNew": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "For scheduled runs: return only videos (or creators) that earlier runs with the same searches and links did not return.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Runs with the same name share their list of videos already returned, even when you change the searches.",
            "default": ""
          },
          "minItems": {
            "title": "Fail below this many rows",
            "minimum": 0,
            "type": "integer",
            "description": "For monitoring: mark the run as failed when it returns fewer rows than this. 0 = never.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}