{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Intelligence - Metadata, Transcript, Chapters, Entities",
    "description": "Bulk YouTube video data: metadata (title, channel, views, likes, comments, thumbnails) + timestamped transcript + auto-detected chapters + extracted entities/keywords/hashtags + optional auto-translation. Pay only for what you use - 3 tiers.",
    "version": "0.1",
    "x-build-id": "t5DFpVPWkIzl0XiFe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seibs.co~youtube-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seibs.co-youtube-intelligence",
        "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/seibs.co~youtube-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-seibs.co-youtube-intelligence",
        "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/seibs.co~youtube-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-seibs.co-youtube-intelligence",
        "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": [
          "video_urls",
          "tier"
        ],
        "properties": {
          "video_urls": {
            "title": "Video URLs (or IDs)",
            "type": "array",
            "description": "YouTube video URLs or raw 11-char video IDs. Supports watch URLs, youtu.be, /shorts/, /embed/. Up to 1000 per run.",
            "items": {
              "type": "string"
            }
          },
          "tier": {
            "title": "Tier",
            "enum": [
              "metadata",
              "enriched",
              "premium"
            ],
            "type": "string",
            "description": "metadata = info only. enriched = + transcript + chapters + entities + engagement/SEO metrics. premium = + auto-translation. Comments and channel data are independent add-ons (see below).",
            "default": "enriched"
          },
          "translate_to": {
            "title": "Translate transcript to language code",
            "type": "string",
            "description": "ISO 639-1 code (e.g. 'en', 'es', 'fr'). Only applies on premium tier. Source language is auto-detected. Leave empty to skip.",
            "default": "en"
          },
          "output_format": {
            "title": "Transcript output format",
            "enum": [
              "json",
              "text",
              "text_timestamped",
              "xml",
              "xml_timestamped",
              "one_line"
            ],
            "type": "string",
            "description": "Format of the transcript's 'formatted' field. JSON-only keeps the structured segment array (default; recommended for downstream code). Other formats add a 'transcript.formatted' string suitable for direct pipe to captioning, search indexing, or LLM context.",
            "default": "json"
          },
          "fetch_comments": {
            "title": "Fetch top comments",
            "type": "boolean",
            "description": "When true, fetches the top N comments per video with author, like count, replies, and computes lexicon-based comment sentiment. Independently chargeable ($0.002 per video where comments were retrieved).",
            "default": false
          },
          "max_comments_per_video": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on how many top comments to retrieve per video. Ignored when fetch_comments is false.",
            "default": 20
          },
          "comment_sort": {
            "title": "Comment sort order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "How YouTube should sort comments before we take the first N.",
            "default": "top"
          },
          "fetch_channel_data": {
            "title": "Fetch channel data",
            "type": "boolean",
            "description": "When true, enriches each record with channel-level data: subscriber count, total views, video count, banner URL, country, etc. Cached per channel across the run. Independently chargeable ($0.003 per unique channel fetched).",
            "default": false
          },
          "use_apify_proxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Route YouTube requests through Apify Proxy. Strongly recommended for any volume - YouTube blocks datacenter IPs aggressively.",
            "default": true
          },
          "apify_proxy_groups": {
            "title": "Proxy groups",
            "type": "array",
            "description": "Apify Proxy groups. RESIDENTIAL is most reliable for YouTube. Defaults to RESIDENTIAL.",
            "default": [
              "RESIDENTIAL"
            ],
            "items": {
              "type": "string"
            }
          },
          "apify_proxy_country": {
            "title": "Proxy country (optional)",
            "type": "string",
            "description": "Two-letter country code (e.g. 'US', 'GB', 'DE'). Leave empty for any.",
            "default": ""
          },
          "retries": {
            "title": "Transcript retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retry count for transcript fetches on transient YouTube errors. Backoff doubles each attempt (1s, 2s, 4s, 8s cap). Permanent failures (transcripts disabled, video unavailable) short-circuit and don't retry.",
            "default": 3
          },
          "max_concurrency": {
            "title": "Max concurrent video fetches",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Parallelism cap. 6 is safe; raise to 12 with residential proxies.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}