YouTube Scraper - Videos by Search, Channel & URL
Pricing
from $1.99 / 1,000 videos
Go to Apify Store
YouTube Scraper - Videos by Search, Channel & URL
Public YouTube video data from search terms, channels and video links.
YouTube Scraper - Videos by Search, Channel & URL
Pricing
from $1.99 / 1,000 videos
Public YouTube video data from search terms, channels and video links.
You can access the YouTube Scraper - Videos by Search, Channel & URL programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in API & Integrations in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "0.0", "x-build-id": "TgoCXDVWKoAgdC0mV" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/lanternlab318~youtube-scraper/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-lanternlab318-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/lanternlab318~youtube-scraper/runs": { "post": { "operationId": "runs-sync-lanternlab318-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/lanternlab318~youtube-scraper/run-sync": { "post": { "operationId": "run-sync-lanternlab318-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": "What you would type into YouTube search, one per line. Each term returns up to \"Max results\" videos in YouTube's own result order (Shorts included). A term YouTube finds nothing for is reported with partialReason \"no_results\" and is not charged.", "items": { "type": "string" } }, "channelUrls": { "title": "Channels", "type": "array", "description": "One channel per line: youtube.com/@handle, youtube.com/channel/UC..., /c/Name, /user/Name, a bare @handle or a bare UC... channel ID. Each channel returns up to \"Max results\" of its most recent videos from the Videos tab, newest first. A handle that does not exist is reported with partialReason \"not_found\" and is not charged.", "items": { "type": "string" } }, "videoUrls": { "title": "Video links", "type": "array", "description": "One video per line: a watch link (youtube.com/watch?v=...), youtu.be/..., a Shorts, embed or live link, or a bare 11-character video ID. The whole list is one input: at most \"Max results\" of these videos are collected, in the order given. A line that is not a YouTube video is reported with partialReason \"invalid_input\" and is not charged.", "items": { "type": "string" } }, "maxResults": { "title": "Max results", "minimum": 1, "maximum": 5000, "type": "integer", "description": "The most videos to take from each search term, from each channel, and from the video-link list as a whole. Never exceeded. A video already collected earlier in the same run is skipped and counted, not written or charged again.", "default": 30 }, "maxUpstreamRequests": { "title": "Max YouTube requests", "minimum": 10, "type": "integer", "description": "Hard ceiling on the HTTP requests this run sends to YouTube, retries included. At the ceiling collection stops, a status row with partialReason \"upstream_request_cap\" says where, and the run ends. Leave empty and the Actor derives a ceiling from the input (at most 4 requests per video plus the listing pages), so a run is never unbounded." }, "proxyConfiguration": { "title": "Proxy", "type": "object", "description": "The proxy used for search, channel and watch-page requests. The video-details request always goes through a residential IP, because YouTube answers datacenter IPs with its \"confirm you are not a bot\" check; that part is not affected by this setting.", "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 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for YouTube Scraper - Videos by Search, Channel & URL from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: