{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel & Video Scraper · $0.30/1K",
    "description": "Get YouTube videos, Shorts and live streams from channels, playlists, links or keyword searches, with exact views and dates. Add comments, channel records, likes and transcripts. No YouTube API key or login. From $0.30 per 1,000 rows. Export JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "KcJtQcKzzObs6JKU2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sones~youtube-scraper-lowcost/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sones-youtube-scraper-lowcost",
        "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/sones~youtube-scraper-lowcost/runs": {
      "post": {
        "operationId": "runs-sync-sones-youtube-scraper-lowcost",
        "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/sones~youtube-scraper-lowcost/run-sync": {
      "post": {
        "operationId": "run-sync-sones-youtube-scraper-lowcost",
        "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": {
          "urls": {
            "title": "Channels, playlists or videos",
            "maxItems": 1000,
            "type": "array",
            "description": "Channel handles or links, playlist links or ids, and video links or 11-character ids. A channel gives the selected tabs; a tab URL fixes its tab; a playlist keeps its owner's order. Optional when searchQueries is set.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "contentTypes": {
            "title": "Channel content",
            "uniqueItems": true,
            "type": "array",
            "description": "Which of each channel's tabs to scrape: Videos, Shorts, Live (past and current live streams). Channel links that name a tab (https://www.youtube.com/@mkbhd/shorts), playlists and video links are not affected.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave on automatic. To send every request through your own proxies instead, choose 'Own proxies' and enter their URLs."
          },
          "searchQueries": {
            "title": "Search queries",
            "maxItems": 1000,
            "type": "array",
            "description": "Keywords to search on YouTube, one query per entry. Each distinct query has its own maxResults limit. Can be used without urls. Results are public videos and Shorts, not channel or playlist search records.",
            "items": {
              "type": "string"
            }
          },
          "uploadDate": {
            "title": "Search upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube narrows discovery with this filter. The Actor also enforces the window locally from tile or player dates. hour, today, week, month and year mean the last hour, 24 hours, 7 days, 30 days and 365 days. Videos without a usable date are excluded. Omit for any time."
          },
          "searchType": {
            "title": "Search result type",
            "enum": [
              "videos",
              "shorts"
            ],
            "type": "string",
            "description": "Limit search results to videos or Shorts. Omit to keep both. Use the live feature to search for live streams."
          },
          "duration": {
            "title": "Search video duration",
            "enum": [
              "under3",
              "under4",
              "3to20",
              "4to20",
              "over20"
            ],
            "type": "string",
            "description": "YouTube's duration filter. Under 3 and 3 to 20 minutes match the current filter dialog; the older 4-minute options are also accepted."
          },
          "features": {
            "title": "Search features",
            "uniqueItems": true,
            "type": "array",
            "description": "YouTube feature filters, combined together. Location means a video with location metadata, not an uploader-country filter. Purchased content requires login and is not supported.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creativeCommons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location"
              ],
              "enumTitles": [
                "Live now",
                "4K",
                "HD",
                "Subtitles",
                "Creative Commons",
                "360 degrees",
                "VR180",
                "3D",
                "HDR",
                "Has location"
              ]
            },
            "default": []
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Relevance or YouTube's popularity ranking. Popularity is not a guaranteed numeric descending sort. YouTube ignored upload-date and rating sorts in the checked requests, so they are not offered.",
            "default": "relevance"
          },
          "searchCountry": {
            "title": "Search country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "YouTube gl locale, a two-letter country code such as US or DE. Changes search context. Does not restrict the uploader's country."
          },
          "searchLanguage": {
            "title": "Search language",
            "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,4})?$",
            "type": "string",
            "description": "YouTube hl language for search titles and interface text, such as en, de or pt-BR. Captions use transcriptLanguage separately."
          },
          "sortBy": {
            "title": "Channel tab order",
            "enum": [
              "newest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Newest, most popular or oldest first, using the chips YouTube offers on each channel tab. A tab without the requested chip is reported plainly. The Live tab can place active streams first. Playlists keep their owner's order.",
            "default": "newest"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep videos strictly after this boundary. Accepts an ISO date or time, a Unix timestamp, or a time before the run starts such as 7 days. Date filtering has no add-on fee. Leave empty for no boundary."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep videos strictly before this boundary. Accepts an ISO date or time, a Unix timestamp, or a time before the run starts such as 7 days. Date filtering has no add-on fee. Leave empty for no boundary."
          },
          "newerThan": {
            "title": "Published after, legacy alias",
            "type": "string",
            "description": "Saved inputs can keep using newerThan. It means publishedAfter and is used when publishedAfter is absent or empty."
          },
          "exactDetails": {
            "title": "Exact dates and view counts",
            "type": "boolean",
            "description": "Included in the base price. Fetch the player data for exact publish dates, views, duration, description, tags, category and available flags. If disabled, tile counts can be rounded and publishedAt is null unless a date boundary requires it.",
            "default": true
          },
          "includeVideoDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "Add exact comment count, likes where available, chapters, hashtags and outside description links to each video row. Charged as video-details only when read. Free during the launch period shown in the README.",
            "default": false
          },
          "includeChannelInfo": {
            "title": "Channel records",
            "type": "boolean",
            "description": "Add one type=channel row per channel explicitly named in urls. Includes total views, joined date, country, links, avatar, banner and business-email availability. The email address is not retrieved. The row incurs the base item price plus channel-details after launch.",
            "default": false
          },
          "includeTranscript": {
            "title": "Transcript in each video",
            "type": "boolean",
            "description": "Nest available caption text and timestamped segments in the video row. Charged as transcript only when a transcript is returned. A video without readable captions still exports with transcript=null and no transcript charge.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Preferred transcript language",
            "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
            "type": "string",
            "description": "Preferred caption language, such as en, af or pt-BR. Reuses the transcript source's language selection. If the requested language is absent, it falls back to an available track and reports the actual language. Does not translate or transcribe audio.",
            "default": "en"
          },
          "commentsSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Top or newest comments as YouTube serves them. Only used when maxComments is greater than zero. Pinned comments may appear first in either order.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "Follow reply continuations when maxComments is greater than zero. Replies count toward the same per-video cap as top-level comments, and each is one base-priced dataset item.",
            "default": false
          },
          "maxResults": {
            "title": "Videos per source",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most video rows to export per channel tab, playlist or keyword query, from 1 to 5000. Defaults to 50. A video URL gives at most one video. Channel and comment rows do not consume this video limit. Search may end before the limit when YouTube stops returning continuations. With onlyNewVideos enabled, already delivered tiles count toward this cap.",
            "default": 50
          },
          "maxComments": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "The most comment and reply rows combined to export for each video. Default 0 disables comment requests. Values from 1 to 10000 enable them. Each returned comment or reply is charged once at the base dataset-item price, with no add-on. YouTube may return fewer comments than its displayed count.",
            "default": 0
          },
          "onlyNewVideos": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos already delivered by earlier runs of this watchlist. Default false. The first run exports matching videos and records each one after its row is exported. Use schedules without overlapping runs. Overlap or a crash between export and recording can repeat a video.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist store name",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$",
            "type": "string",
            "description": "Optional persistent key-value store name in your Apify account. Use 3 to 63 letters, digits or hyphens, starting and ending with a letter or digit. With Only new videos on, an omitted field uses a hash of sources and output choices. Changing output choices selects a new default watchlist. An explicit name keeps the same history across input changes. Separate names also keep the two Actors independent."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}