{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper $0.08/1K Videos: Search, Channels, Shorts",
    "description": "Search public videos, Shorts, channels and playlists. Get channel profiles, video details, comments and optional captions with timed segments. Filter searches and list channel uploads newest first. Pay only for delivered data. No login or API key. $0.08 per 1,000 videos.",
    "version": "0.1",
    "x-build-id": "ItTIQBZqdpasNOx5s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zaiq~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zaiq-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/zaiq~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zaiq-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/zaiq~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zaiq-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One query per line. Leave empty when using channel, playlist or video links.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist"
            ],
            "type": "string",
            "description": "Videos, Shorts, channel profiles or playlist cards. Playlist search returns free cards; playlist links list their videos.",
            "default": "video"
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "Use YouTube's relevance, newest upload, views or rating order.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Filter video searches by the upload window. YouTube may ignore this for channel or playlist searches.",
            "default": "any"
          },
          "duration": {
            "title": "Video duration",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Short: under 4 minutes; medium: 4–20 minutes; long: over 20 minutes. Separate from the Shorts content type.",
            "default": "any"
          },
          "maxSearchResults": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum unique matching results per query, before run-wide deduplication.",
            "default": 5
          },
          "channelUrls": {
            "title": "Channels",
            "type": "array",
            "description": "Public channel links, IDs or @handles. A /shorts or /streams suffix selects that tab for that channel.",
            "items": {
              "type": "string"
            }
          },
          "channelTabs": {
            "title": "Channel tabs",
            "type": "array",
            "description": "Use videos, shorts and/or streams. Each tab is newest first; the maximum applies per channel per tab.",
            "items": {
              "type": "string"
            },
            "default": [
              "videos"
            ]
          },
          "maxVideosPerChannel": {
            "title": "Videos per channel tab",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum videos from each requested tab of each channel. Videos are deduplicated across all inputs.",
            "default": 5
          },
          "playlistUrls": {
            "title": "Playlists",
            "type": "array",
            "description": "Public playlist links or IDs. Videos retain playlist order; unavailable entries are skipped with a note.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerPlaylist": {
            "title": "Videos per playlist",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum listed videos per playlist, in playlist order.",
            "default": 10
          },
          "videoUrls": {
            "title": "Video links",
            "type": "array",
            "description": "Public watch, Shorts, live, youtu.be links, or 11-character video IDs.",
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "Maximum videos in this run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Run-wide cap across all searches, channels, playlists and direct links. Direct links are processed first.",
            "default": 100
          },
          "fullDetails": {
            "title": "Full video details",
            "type": "boolean",
            "description": "Get exact public counts, description, tags, category, publication date and chapters where shown. If details fail, an available listing row is kept with a note.",
            "default": true
          },
          "transcripts": {
            "title": "Include transcripts",
            "type": "boolean",
            "description": "Fetch existing public captions and timed segments. $0.005 only for a delivered, nonempty transcript. No AI transcription or translation.",
            "default": false
          },
          "preferredLanguage": {
            "title": "Preferred caption language",
            "type": "string",
            "description": "Language code such as en or es. Prefer it when available, otherwise return the original or another available track and state the language.",
            "default": "en"
          },
          "commentsPerVideo": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum comments including replies per delivered video. Zero skips comments. $0.0005 per delivered comment.",
            "default": 0
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Top follows YouTube's ranking; newest follows the comment sort menu.",
            "default": "top"
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum replies under each top-level comment. Replies count toward Comments per video. Zero skips replies.",
            "default": 0
          },
          "includeChannelRows": {
            "title": "Include channel profiles",
            "type": "boolean",
            "description": "Add one paid profile per unique channel named in delivered videos or channel inputs. Channel searches always return profiles.",
            "default": true
          },
          "country": {
            "title": "Search country",
            "type": "string",
            "description": "Two-letter region code for search ranking. This does not change the network location or bypass regional restrictions.",
            "default": "US"
          },
          "language": {
            "title": "Search language",
            "type": "string",
            "description": "Language code for search results. Public dates remain source text when an exact date is not supplied.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}