{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Channel Scraper",
    "description": "Scrape YouTube channels or keyword searches for video URLs, titles, metrics, descriptions, channel profiles, social links, and transcripts when captions are available. Fast, low-cost YouTube data extraction for monitoring, influencer research, SEO, and LLM workflows.",
    "version": "0.0",
    "x-build-id": "4dGyHyfX7RWnLKmif"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/newbs~Youtube-Channel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-newbs-Youtube-Channel",
        "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/newbs~Youtube-Channel/runs": {
      "post": {
        "operationId": "runs-sync-newbs-Youtube-Channel",
        "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/newbs~Youtube-Channel/run-sync": {
      "post": {
        "operationId": "run-sync-newbs-Youtube-Channel",
        "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",
        "required": [
          "channel",
          "numberOfResults"
        ],
        "properties": {
          "channel": {
            "title": "Channels, URLs, or search terms",
            "type": "array",
            "description": "Enter YouTube handles, channel URLs, /videos URLs, or search terms. Use channel inputs when keywords is false. Use search terms when keywords is true.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search by keyword",
            "type": "boolean",
            "description": "Enable this when the channel field contains YouTube search keywords instead of channel handles or URLs.",
            "default": false
          },
          "needVideoDetails": {
            "title": "Scrape full video details",
            "type": "boolean",
            "description": "Enable for descriptions, metrics, channel profile data, publish dates, durations, and transcripts. Disable for faster basic video URL collection.",
            "default": true
          },
          "numberOfResults": {
            "title": "Results per channel or keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Number of videos to collect for each item in the channel list. If keywords is false, this means per channel. If keywords is true, this means per search keyword, before optional duplicate/channel limits are applied."
          },
          "uniqueChannels": {
            "title": "Unique channels in keyword results",
            "type": "boolean",
            "description": "Only applies when keywords is true. Keep at most one result from each YouTube channel per keyword, and deduplicate repeated video URLs across the run.",
            "default": false
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only applies when keywords is true. Limits how many videos from the same YouTube channel are returned for each keyword. Leave empty for no per-channel limit. Set 1 for creator discovery use cases."
          },
          "localeHl": {
            "title": "YouTube language hint",
            "type": "string",
            "description": "YouTube hl parameter. Examples: en, fr, de, es, ja."
          },
          "localeGl": {
            "title": "YouTube country hint",
            "type": "string",
            "description": "YouTube gl parameter. Examples: US, GB, FR, DE, JP."
          },
          "acceptLanguage": {
            "title": "Accept-Language header",
            "type": "string",
            "description": "Browser language preferences sent with each request, for example en-US,en;q=0.9. This nudges YouTube localization but does not guarantee localized results."
          },
          "maxChannelConcurrency": {
            "title": "Parallel channels",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many channel or search pages to process at the same time. Recommended: 2. Higher values can be faster but may increase YouTube throttling risk."
          },
          "maxVideoDetailConcurrency": {
            "title": "Parallel video details",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many video detail pages to scrape in parallel per channel. Recommended: 2. Increase carefully for large runs."
          },
          "checkpointEveryVideos": {
            "title": "Checkpoint every N videos",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Save progress after this many processed videos. Larger values reduce storage writes and improve speed for small runs."
          },
          "transcriptUiFallback": {
            "title": "Use slower transcript UI fallback",
            "type": "boolean",
            "description": "When enabled, the actor clicks YouTube's transcript UI if direct caption extraction fails. Keep disabled for speed; enable when transcript recovery is more important than runtime.",
            "default": false
          },
          "interVideoDelayMs": {
            "title": "Delay between videos (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional delay after each video detail scrape. Keep 0 for speed. Increase only if YouTube throttles your runs."
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Auto is recommended: normal browser pages run fast without proxy, while residential proxy is used only for failed retries and blocked transcript/metadata fallback calls. Always uses proxy for the full run. Never disables proxy usage.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy settings. Leave empty with Auto mode unless you need custom proxy groups or country settings."
          },
          "resetCheckpoint": {
            "title": "Reset saved progress",
            "type": "boolean",
            "description": "Start fresh and ignore any previously saved checkpoint for the same channel or keyword. Useful for testing or forcing a full refresh.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}