{
  "openapi": "3.0.1",
  "info": {
    "title": "ytscrape",
    "description": null,
    "version": "0.0",
    "x-build-id": "WVvR9oC0vSbksE0i7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nestled_echo~ytscrape/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nestled_echo-ytscrape",
        "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/nestled_echo~ytscrape/runs": {
      "post": {
        "operationId": "runs-sync-nestled_echo-ytscrape",
        "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/nestled_echo~ytscrape/run-sync": {
      "post": {
        "operationId": "run-sync-nestled_echo-ytscrape",
        "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": [
          "proxyConfiguration"
        ],
        "properties": {
          "channelInfoOnly": {
            "title": "Channel info only",
            "type": "boolean",
            "description": "Only scrape channel About information for the provided URLs (channels or videos). Ignores search/video extraction.",
            "default": false
          },
          "startUrls": {
            "title": "Start URLs (video, channel, playlist, or search results)",
            "type": "array",
            "description": "Paste YouTube URLs: channel (/@handle or /channel/ID), video (/watch?v=...), playlist, or even search results.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Search terms for YouTube search results. If Channel info only is enabled and you provide a single item like '@theleaderstalk', it will be treated as a channel.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerTerm": {
            "title": "Maximum videos per search term (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of regular video results to collect per search term.",
            "default": 10
          },
          "maxShortsPerTerm": {
            "title": "Maximum shorts per search term (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of Shorts results to collect per search term.",
            "default": 0
          },
          "maxStreamsPerTerm": {
            "title": "Maximum streams per search term (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of live stream results to collect per search term.",
            "default": 0
          },
          "directUrls": {
            "title": "Direct URLs",
            "type": "array",
            "description": "Direct YouTube URLs to include (video, channel, playlist).",
            "items": {
              "type": "string"
            }
          },
          "downloadSubtitles": {
            "title": "Download YouTube transcript",
            "type": "boolean",
            "description": "Open the transcript panel and scrape subtitles (no external APIs).",
            "default": false
          },
          "saveSubsToKVS": {
            "title": "Save subtitles to key-value store",
            "type": "boolean",
            "description": "When enabled, saves the transcript into the default Apify Key-Value Store.",
            "default": false
          },
          "subtitlesLanguage": {
            "title": "Subtitle language",
            "enum": [
              "",
              "en",
              "es",
              "de",
              "fr",
              "it",
              "pt",
              "ru",
              "hi",
              "ar",
              "ja",
              "ko",
              "zh"
            ],
            "type": "string",
            "description": "Preferred subtitle language. Leave blank for auto/any.",
            "default": ""
          },
          "preferAutoGeneratedSubtitles": {
            "title": "Prefer automatically generated subtitles",
            "type": "boolean",
            "description": "Best-effort preference in the YouTube UI when multiple transcripts exist.",
            "default": false
          },
          "subtitlesFormat": {
            "title": "Subtitle format",
            "enum": [
              "srt",
              "json",
              "txt"
            ],
            "type": "string",
            "description": "Format to save transcripts when saving to KVS.",
            "default": "srt"
          },
          "searchSortOrder": {
            "title": "Sorting order",
            "enum": [
              "relevance",
              "upload_date",
              "view_count",
              "rating"
            ],
            "type": "string",
            "description": "Sorting applied to search results.",
            "default": "relevance"
          },
          "searchDateFilter": {
            "title": "Date filter",
            "enum": [
              "",
              "last_hour",
              "today",
              "this_week",
              "this_month",
              "this_year"
            ],
            "type": "string",
            "description": "Limit results by upload date using YouTube's filter panel.",
            "default": ""
          },
          "searchVideoType": {
            "title": "Video type",
            "enum": [
              "any",
              "video",
              "channel",
              "playlist",
              "movie",
              "short",
              "live"
            ],
            "type": "string",
            "description": "Filter results by type.",
            "default": "any"
          },
          "searchDuration": {
            "title": "Length of video",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Filter videos by duration.",
            "default": "any"
          },
          "hd": {
            "title": "HD",
            "type": "boolean",
            "description": "Show only HD results (where available).",
            "default": false
          },
          "subtitles_cc": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Require videos with subtitles/closed captions.",
            "default": false
          },
          "creative_commons": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Show only videos with Creative Commons license.",
            "default": false
          },
          "three_d": {
            "title": "3D",
            "type": "boolean",
            "description": "Show only 3D videos.",
            "default": false
          },
          "purchased": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Show only purchased content.",
            "default": false
          },
          "four_k": {
            "title": "4K",
            "type": "boolean",
            "description": "Show only 4K (Ultra HD) videos.",
            "default": false
          },
          "three_sixty": {
            "title": "360°",
            "type": "boolean",
            "description": "Show only 360-degree videos.",
            "default": false
          },
          "location": {
            "title": "Location",
            "type": "boolean",
            "description": "Show only videos with a specified location.",
            "default": false
          },
          "fetchFullVideoDetails": {
            "title": "Open each discovered result and extract full video details",
            "type": "boolean",
            "description": "When enabled, each discovered result is opened for full details (likes, comments count, description text, subtitles, etc.).",
            "default": false
          },
          "maxResults": {
            "title": "Max results (overall cap)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of results per URL or per search term overall (upper cap).",
            "default": 50
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments to extract per video. 0 disables comment extraction.",
            "default": 20
          },
          "dateFilter": {
            "title": "Post-filter by exact date or relative range",
            "type": "string",
            "description": "Limit videos by published date after extraction. Use YYYY-MM-DD or 'last N days' (e.g., 'last 7 days')."
          },
          "videoRegex": {
            "title": "Video URL Regex Filter",
            "type": "string",
            "description": "Only include videos whose URLs match this regular expression."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Configure proxy usage for reliable scraping.",
            "default": {
              "useApifyProxy": true
            }
          },
          "verboseLog": {
            "title": "Verbose logging?",
            "type": "boolean",
            "description": "Enable to see detailed logs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}