{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper + AI Transcript & Summary",
    "description": "Fast, low-cost YouTube scraper for videos, search results, channels, Shorts, live streams, playlists, comments, replies, subtitles, and transcripts. Extract structured data, engagement metrics, and filtered search results at scale.",
    "version": "0.1",
    "x-build-id": "XJQFiXrR4gbB2vhWP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apigeek~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apigeek-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/apigeek~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apigeek-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/apigeek~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apigeek-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 Queries",
            "type": "array",
            "description": "List of YouTube search keywords or phrases to scrape.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "YouTube URLs to scrape (Video, Short, Channel, Playlist, Search, or Hashtag).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of video/playlist results to collect per query or channel feed.",
            "default": 20
          },
          "sortingOrder": {
            "title": "Search Sorting Order",
            "enum": [
              "relevance",
              "date",
              "viewCount",
              "rating",
              "RELEVANCE",
              "UPLOAD_DATE",
              "VIEW_COUNT",
              "RATING"
            ],
            "type": "string",
            "description": "Sorting order for YouTube search queries.",
            "default": "relevance"
          },
          "dateFilter": {
            "title": "Search Upload Date Filter",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year",
              "HOUR",
              "TODAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "type": "string",
            "description": "Filter search results by upload date window."
          },
          "lengthFilter": {
            "title": "Search Video Duration Filter",
            "enum": [
              "short",
              "medium",
              "long",
              "SHORT",
              "MEDIUM",
              "LONG"
            ],
            "type": "string",
            "description": "Filter search results by video duration."
          },
          "videoType": {
            "title": "Search Result Category",
            "enum": [
              "video",
              "channel",
              "playlist",
              "movie",
              "VIDEO",
              "CHANNEL",
              "PLAYLIST",
              "MOVIE"
            ],
            "type": "string",
            "description": "Filter search results by content category.",
            "default": "video"
          },
          "isHD": {
            "title": "HD Videos Only",
            "type": "boolean",
            "description": "Filter search results to high-definition (HD) videos.",
            "default": false
          },
          "hasSubtitles": {
            "title": "Subtitles / Closed Captions Only",
            "type": "boolean",
            "description": "Filter search results to videos with subtitles/CC.",
            "default": false
          },
          "isLive": {
            "title": "Live Streams Only",
            "type": "boolean",
            "description": "Filter search results to active live streams.",
            "default": false
          },
          "is4K": {
            "title": "4K Ultra HD Only",
            "type": "boolean",
            "description": "Filter search results to 4K resolution videos.",
            "default": false
          },
          "oldestPostDate": {
            "title": "Oldest Post Date Boundary",
            "type": "string",
            "description": "Stop crawling search results when videos become older than this ISO date (e.g. '2026-01-01')."
          },
          "maxResultsShorts": {
            "title": "Max Shorts (Channel)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of Shorts items to collect when scraping a channel.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max Streams / Live (Channel)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of Live / Stream items to collect when scraping a channel.",
            "default": 0
          },
          "sortVideosBy": {
            "title": "Channel Videos Sort Order",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Sorting order for channel videos tab.",
            "default": "NEWEST"
          },
          "maxComments": {
            "title": "Max Comments (Per Video)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum top-level comments to scrape per video (0 = disabled).",
            "default": 0
          },
          "maxRepliesPerComment": {
            "title": "Max Replies (Per Top-Level Comment)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum reply comments to scrape per top-level comment.",
            "default": 0
          },
          "commentSort": {
            "title": "Comment Sort Order",
            "enum": [
              "TOP",
              "NEWEST"
            ],
            "type": "string",
            "description": "Sort order for comments (Top comments vs Newest first).",
            "default": "TOP"
          },
          "proxyConfiguration": {
            "title": "Network Configuration",
            "type": "object",
            "description": "Optional network settings for advanced users."
          },
          "enrichVideoMetadata": {
            "title": "Enrich Video Engagement Metadata",
            "type": "boolean",
            "description": "Fetch additional video engagement metadata such as likes, comment count, views, and channel subscriber count when available.",
            "default": false
          },
          "maxEnrichedVideos": {
            "title": "Max Enriched Videos",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of videos to enrich with additional engagement metadata in this run (default: 20, max: 100).",
            "default": 20
          },
          "aiTranscript": {
            "title": "AI Transcript",
            "type": "boolean",
            "description": "Generate an AI transcript for supported YouTube videos. Optional and charged per started audio minute.",
            "default": false
          },
          "aiSummary": {
            "title": "AI Video Summary",
            "type": "boolean",
            "description": "Generate a concise AI summary of the video's transcript.",
            "default": false
          },
          "aiLanguage": {
            "title": "AI Target Language",
            "type": "string",
            "description": "Target language ISO code for AI transcription/summary (e.g. 'en', 'es', 'de')."
          },
          "maxAiVideos": {
            "title": "Max AI Processed Videos",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of videos to process with AI in this run (default: 10, max: 100).",
            "default": 10
          },
          "maxAiDurationMinutes": {
            "title": "Max AI Video Duration (Minutes)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum duration of an individual video eligible for AI processing (default: 60, max: 120).",
            "default": 60
          },
          "maxAiMinutesPerRun": {
            "title": "Max Combined AI Minutes Per Run",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Maximum total combined duration of videos processed by AI during this run (default: 60, max: 600).",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}