{
  "openapi": "3.0.1",
  "info": {
    "title": "All-in-One YouTube Scraper",
    "description": "Collects YouTube search results, channels, videos, comments, transcripts, playlists, trending and hashtag feeds through a single Actor. The mode is selected per run; each mode accepts its own identifier and returns that dataset's fields.",
    "version": "0.1",
    "x-build-id": "zINb4YPWY1EgZWiVA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thenetaji~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thenetaji-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/thenetaji~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-thenetaji-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/thenetaji~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-thenetaji-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",
        "required": [
          "scraperType"
        ],
        "properties": {
          "scraperType": {
            "title": "What to collect",
            "enum": [
              "search",
              "hashtag",
              "trending",
              "hype",
              "home",
              "suggestions",
              "channel",
              "video",
              "comments",
              "playlist",
              "transcript"
            ],
            "type": "string",
            "description": "Choose the dataset for this run, then fill in the section for that mode below.",
            "default": "search"
          },
          "search_term": {
            "title": "Search query",
            "type": "string",
            "description": "Used by Keyword search and Search suggestions. Words or a phrase to search for; Search suggestions also accepts partial text. Ignored by the other workflows."
          },
          "result_kind": {
            "title": "Result type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "Keyword search only. Limit results to one public content type."
          },
          "length_filter": {
            "title": "Video duration",
            "enum": [
              "under_3_minutes",
              "between_3_and_20_minutes",
              "over_20_minutes"
            ],
            "type": "string",
            "description": "Keyword search only. Keep videos within one duration range."
          },
          "published_within": {
            "title": "Published within",
            "enum": [
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Keyword search only. Restrict results by upload period."
          },
          "sort_order": {
            "title": "Result order",
            "enum": [
              "relevance",
              "popularity",
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Order the returned results. The available values depend on the workflow."
          },
          "hashtag": {
            "title": "Hashtag",
            "type": "string",
            "description": "Used by the Hashtag workflow only. Hashtag text without the # symbol."
          },
          "content_kind": {
            "title": "Hashtag content",
            "enum": [
              "all",
              "shorts"
            ],
            "type": "string",
            "description": "Hashtag workflow only. Choose the hashtag's video feed or its Shorts feed.",
            "default": "all"
          },
          "trend_category": {
            "title": "Trending category",
            "enum": [
              "now",
              "music",
              "games"
            ],
            "type": "string",
            "description": "Trending workflow only. Choose which regional chart to collect.",
            "default": "now"
          },
          "channel_sources": {
            "title": "Channel URLs, handles, usernames, or IDs",
            "type": "array",
            "description": "One or more public YouTube channels. Full URLs, @handles, usernames, and UC channel IDs are accepted.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "channel_sections": {
            "title": "Channel content",
            "type": "array",
            "description": "Choose the channel sections to collect. Channel details produces one profile record per channel.",
            "items": {
              "type": "string",
              "enum": [
                "about",
                "videos",
                "shorts",
                "live_streams",
                "playlists",
                "community_posts",
                "home_sections",
                "store_products",
                "search_results"
              ],
              "enumTitles": [
                "Channel details",
                "Videos",
                "Shorts",
                "Live streams",
                "Playlists",
                "Community posts",
                "Home sections",
                "Store products",
                "Search within channel"
              ]
            },
            "default": [
              "about",
              "videos"
            ]
          },
          "channel_search_term": {
            "title": "Search within channel",
            "type": "string",
            "description": "Words or a phrase to find when Search within channel is selected."
          },
          "video_sources": {
            "title": "Video or Shorts URLs and IDs",
            "type": "array",
            "description": "One or more public YouTube video or Shorts URLs. Bare video IDs are also accepted.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "video_kind": {
            "title": "Content type",
            "enum": [
              "auto",
              "video",
              "shorts"
            ],
            "type": "string",
            "description": "Choose automatic detection, regular videos, or Shorts.",
            "default": "auto"
          },
          "includeRelatedContent": {
            "title": "Add related content",
            "type": "boolean",
            "description": "Attach related videos and playlists to every eligible result. One request per page of related items, charged only when it succeeds.",
            "default": false
          },
          "maxRelatedItems": {
            "title": "Max related results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum related or same-sound items attached to each video. Set 0 to collect all available pages.",
            "default": 20
          },
          "includeTranscript": {
            "title": "Add transcript",
            "type": "boolean",
            "description": "Attach timed transcript segments when a transcript is available. One extra request per video, charged only when a transcript is returned.",
            "default": false
          },
          "includeCaption": {
            "title": "Add caption text",
            "type": "boolean",
            "description": "Attach one caption track in the selected language when available. Two extra requests per video, charged only when the track is returned.",
            "default": false
          },
          "includeSoundShorts": {
            "title": "Add Shorts using the same sound",
            "type": "boolean",
            "description": "For Shorts inputs, attach other Shorts attributed to the same sound. One request per page, charged only when it succeeds.",
            "default": false
          },
          "comment_sources": {
            "title": "Video, Shorts, or community-post URLs and IDs",
            "type": "array",
            "description": "One or more public YouTube videos, Shorts, or community posts whose comments should be collected.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "owner_channel": {
            "title": "Community-post channel ID",
            "type": "string",
            "description": "Optional channel ID that owns a community post. Use it when providing a bare post ID."
          },
          "includeParentDetails": {
            "title": "Add parent content details",
            "type": "boolean",
            "description": "Attach video, Shorts, or community-post details to comments from the same target. One extra request per target, charged only when it succeeds.",
            "default": false
          },
          "playlist_sources": {
            "title": "Playlist URLs or IDs",
            "type": "array",
            "description": "One or more public YouTube playlist URLs or playlist IDs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "includeVideoDetails": {
            "title": "Add full video details",
            "type": "boolean",
            "description": "Attach a separate full video-detail record to every eligible playlist item. One extra request per item, charged only when it succeeds.",
            "default": false
          },
          "transcript_language": {
            "title": "Transcript language",
            "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
            "type": "string",
            "description": "Language code of the transcript to request, such as en, de, or ja. YouTube serves whichever track it has; the language actually returned is reported on every row. Leave empty for the video's default."
          },
          "includeSubtitleFile": {
            "title": "Add subtitle file",
            "type": "boolean",
            "description": "Attach the caption track as a ready-to-use WebVTT or SRT file, alongside the transcript. Two extra requests per video, charged only when the track is returned.",
            "default": false
          },
          "caption_format": {
            "title": "Subtitle format",
            "enum": [
              "vtt",
              "srt"
            ],
            "type": "string",
            "description": "File format for the attached subtitle track.",
            "default": "vtt"
          },
          "caption_language": {
            "title": "Caption language",
            "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
            "type": "string",
            "description": "Language code of the caption track to attach, such as en, es, or pt-BR.",
            "default": "en"
          },
          "region_code": {
            "title": "Country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Optional two-letter country code used to localize results, such as US, IN, or DE.",
            "default": "US"
          },
          "language_code": {
            "title": "Language",
            "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
            "type": "string",
            "description": "Optional language code used to localize result text, such as en, es, or pt-BR.",
            "default": "en"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of primary records to save across all targets. Set 0 to continue until no more pages remain.",
            "default": 100
          },
          "resume_cursor": {
            "title": "Resume from",
            "type": "string",
            "description": "Continue a previous run instead of starting again. Paste the resume token printed near the end of that run's log. Leave empty to start from the first page."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}