{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper - Videos, Shorts & Channels",
    "description": "Scrape public YouTube videos, Shorts, channels, playlists and search results. Export titles, descriptions, published dates, view and engagement counts, and channel metadata to structured JSON or CSV. Use direct links, handles or keyword searches with clear coverage and error reporting.",
    "version": "0.0",
    "x-build-id": "jLhcwyPhfFWD3jR4Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/overbifrost~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-overbifrost-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/overbifrost~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-overbifrost-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/overbifrost~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-overbifrost-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": {
          "videoUrls": {
            "title": "YouTube video links",
            "maxItems": 500,
            "type": "array",
            "description": "Paste YouTube watch, youtu.be, Shorts, live, or embed links, or bare 11-character IDs. Direct videos request watch-page details, which may be blocked.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "channelUrls": {
            "title": "YouTube channel links or handles",
            "maxItems": 200,
            "type": "array",
            "description": "Channel URLs or @handles. The prefilled Rick Astley URL is an example for Apify's daily health check; replace it with your own channel.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "playlistUrls": {
            "title": "YouTube playlist links",
            "maxItems": 100,
            "type": "array",
            "description": "Playlist URLs (youtube.com/playlist?list=…) or bare playlist IDs. Items become VIDEO records with playlist position provenance.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "searchQueries": {
            "title": "YouTube search queries",
            "maxItems": 100,
            "type": "array",
            "description": "Keyword search or YouTube results URL. The prefilled search is a small backup example for the daily Store health check; replace or clear it.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "channelTabs": {
            "title": "Channel content tabs",
            "type": "array",
            "description": "Which channel tabs to collect. VIDEOS = uploads; SHORTS = Shorts. The prefilled daily-test example selects VIDEOS only.",
            "items": {
              "type": "string",
              "enum": [
                "VIDEOS",
                "SHORTS"
              ]
            },
            "default": [
              "VIDEOS",
              "SHORTS"
            ]
          },
          "maxVideosPerChannel": {
            "title": "Videos per channel tab",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum items per selected channel tab; 0 collects channel metadata only. The example uses 4 to keep the first run small.",
            "default": 25
          },
          "maxPlaylistItems": {
            "title": "Playlist items",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum items read per playlist.",
            "default": 100
          },
          "maxResultsPerSearchQuery": {
            "title": "Search results per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum video results from each keyword search. The example uses 3 to keep the first run small.",
            "default": 50
          },
          "videoDetails": {
            "title": "Full details for discovered videos",
            "type": "boolean",
            "description": "Optional extra detail fetch for videos found via channels, playlists or search. Watch pages may trigger bot checks; existing listing results remain saved. Each attempted detail fetch adds one HTTP request.",
            "default": false
          },
          "searchSort": {
            "title": "Search sort",
            "enum": [
              "RELEVANCE",
              "UPLOAD_DATE",
              "VIEW_COUNT",
              "RATING"
            ],
            "type": "string",
            "description": "Order YouTube keyword search results by relevance, upload date, view count or rating where supported. Applies only to search queries.",
            "default": "RELEVANCE"
          },
          "searchUploadDate": {
            "title": "Search upload date filter",
            "enum": [
              "ANY",
              "HOUR",
              "TODAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "type": "string",
            "description": "Limit keyword search results by YouTube's upload-date buckets. Applies only to search queries, not directly supplied URLs.",
            "default": "ANY"
          },
          "searchDuration": {
            "title": "Search duration filter",
            "enum": [
              "ANY",
              "SHORT",
              "MEDIUM",
              "LONG"
            ],
            "type": "string",
            "description": "YouTube's duration buckets (<4min / 4-20min / >20min). This is NOT the same as Shorts classification.",
            "default": "ANY"
          },
          "searchRegion": {
            "title": "Search region (optional)",
            "pattern": "^[A-Za-z]{2}$",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter country code, for example US, GB or NO. Applies as a hint to YouTube search; results are not guaranteed to be country-exclusive."
          },
          "searchLanguage": {
            "title": "Search language (optional)",
            "pattern": "^[A-Za-z-]{2,10}$",
            "minLength": 2,
            "maxLength": 10,
            "type": "string",
            "description": "Language hint for YouTube search, e.g. en or en-US. Does not translate video metadata or guarantee language-only results."
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep videos published on or after this ISO timestamp. Videos without an observable date are kept unless keepUnknownDates is off."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep videos published on or before this ISO timestamp."
          },
          "minViewCount": {
            "title": "Minimum views",
            "minimum": 0,
            "maximum": 10000000000,
            "type": "integer",
            "description": "Keep videos whose observed view count meets this minimum. Videos without an available count cannot be verified against the threshold."
          },
          "minLikeCount": {
            "title": "Minimum likes",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep videos whose observed like count meets this minimum. Missing like counts are unknown, not zero."
          },
          "minCommentCount": {
            "title": "Minimum comments",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep videos whose observed comment count meets this minimum. Missing comment counts are unknown, not zero."
          },
          "mediaTypes": {
            "title": "Media types",
            "type": "array",
            "description": "Keep only these media kinds. UNKNOWN-kind videos are excluded when this filter is set.",
            "items": {
              "type": "string",
              "enum": [
                "STANDARD_VIDEO",
                "SHORT",
                "LIVE_STREAM"
              ]
            }
          },
          "titleContains": {
            "title": "Title contains",
            "maxLength": 200,
            "type": "string",
            "description": "Optional case-insensitive keyword filter on observed video titles."
          },
          "descriptionContains": {
            "title": "Description contains",
            "maxLength": 500,
            "type": "string",
            "description": "Optional case-insensitive keyword filter on observed video descriptions; unavailable descriptions cannot be matched."
          },
          "keepUnknownDates": {
            "title": "Keep videos without dates",
            "type": "boolean",
            "description": "When a date filter is set, keep videos whose publish date could not be determined.",
            "default": true
          },
          "resultsLimit": {
            "title": "Maximum video results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum VIDEO results saved per run (channel and playlist metadata rows are separate).",
            "default": 200
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "FULL",
              "FLAT",
              "COMPACT"
            ],
            "type": "string",
            "description": "Choose FULL (structured metadata), FLAT (spreadsheet-oriented fields) or COMPACT (key metadata) for saved results.",
            "default": "FULL"
          },
          "writeCsv": {
            "title": "Write videos.csv",
            "type": "boolean",
            "description": "Also save a formula-safe CSV of video rows to the key-value store.",
            "default": false
          },
          "saveDiagnostics": {
            "title": "Save diagnostics",
            "type": "boolean",
            "description": "Save bounded DIAGNOSTICS JSON in Key-value store: per-record source evidence, missing video fields and run warnings (up to 500 evidence rows). No raw HTML.",
            "default": false
          },
          "maxTotalRequests": {
            "title": "Maximum HTTP requests",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on source HTTP requests. For a small first run, keep this at 8; raise it only when you need more pages.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Concurrent video fetches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel video detail requests. The example uses 1; higher values may increase rate limits and usage.",
            "default": 4
          },
          "minDelayMs": {
            "title": "Minimum delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum pause in milliseconds between YouTube requests. Use a conservative value to reduce request pressure.",
            "default": 250
          },
          "maxDelayMs": {
            "title": "Maximum delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum pause in milliseconds between YouTube requests. Must be at least the minimum delay.",
            "default": 1000
          },
          "proxyStrategy": {
            "title": "Proxy strategy",
            "enum": [
              "NONE",
              "APIFY_DATACENTER",
              "APIFY_RESIDENTIAL"
            ],
            "type": "string",
            "description": "NONE makes direct requests without paid Apify proxies. Residential/datacenter proxies may incur additional usage costs and do not guarantee access.",
            "default": "NONE"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}