{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper",
    "description": "Extract structured YouTube search results with advanced filtering. Search videos, channels, playlists, shorts, movies, and shows using YouTube API. Fastest YouTube scraper on the market",
    "version": "0.0",
    "x-build-id": "KCbSVyWATAdSmfgWP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-ninja~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-ninja-youtube-search-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/api-ninja~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-ninja-youtube-search-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/api-ninja~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-ninja-youtube-search-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": [
          "query"
        ],
        "properties": {
          "query": {
            "title": "🔍 Search Query",
            "type": "string",
            "description": "The YouTube keywords to search for."
          },
          "type": {
            "title": "📦 Result Type",
            "enum": [
              "video",
              "channel",
              "playlist",
              "movie",
              "show",
              "shorts"
            ],
            "type": "string",
            "description": "Filter by YouTube entity type. Video filter return all video types including videos, movie, shorts, shows.",
            "default": "video"
          },
          "videoDepthDetails": {
            "title": "🤿 Video depth details",
            "enum": [
              "basic",
              "standard",
              "detailed",
              "complete"
            ],
            "type": "string",
            "description": "Level of detail for video information retrieval. Deeper levels require more processing time:\n• Basic: Search results with video ID, title, view count, thumbnail (fastest)\n• Standard: Full video details with transcript, summary, key moments, channel info, engagement metrics (moderate)\n• Detailed: Technical metadata including privacy settings, restrictions, captions availability, geographic availability (slower)\n• Complete: All available data combining standard + detailed + additional metadata (slowest)",
            "default": "basic"
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 20,
            "type": "integer",
            "description": "Total number of results to fetch (ignored if \"Scrape all\" is enabled).",
            "default": 100
          },
          "scrapeAllResults": {
            "title": "Scrape all available results",
            "type": "boolean",
            "description": "Keep paginating until the API stops returning a continuation token. The number of results can be very large.",
            "default": false
          },
          "sortBy": {
            "title": "↕️ Sort By",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Sort order for the results. Relevance by default. Note: sorting is not available for Shorts."
          },
          "duration": {
            "title": "⏱️ Video Duration",
            "enum": [
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Filter by video length."
          },
          "uploadDate": {
            "title": "📅 Upload Date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Restrict results to a recent time range."
          },
          "geo": {
            "title": "🌍 Country",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "ISO 3166-2 country code (e.g., US, GB, IN)."
          },
          "lang": {
            "title": "🗣️ Language",
            "pattern": "^[a-z]{2}$",
            "type": "string",
            "description": "Language code (e.g., en, es, fr)."
          },
          "features": {
            "title": "⚙️ Video Features",
            "type": "object",
            "description": "Toggle any YouTube feature filters. Selected values are sent to YouTube API as a comma-separated \"features\" query param (e.g. HD,subtitles). The parametrs are AND (Intersection of filters)",
            "properties": {
              "360": {
                "title": "360 degrees",
                "type": "boolean",
                "description": "Show 360° videos (JSON field: is360).",
                "default": false,
                "editor": "checkbox"
              },
              "HD": {
                "title": "HD",
                "type": "boolean",
                "description": "Apply the HD filter (JSON field: isHD).",
                "default": false,
                "editor": "checkbox"
              },
              "subtitles": {
                "title": "Subtitles/CC",
                "type": "boolean",
                "description": "Require subtitles or closed captions (JSON field: hasSubtitles).",
                "default": false,
                "editor": "checkbox"
              },
              "CCommons": {
                "title": "Creative Commons",
                "type": "boolean",
                "description": "Only Creative Commons videos (JSON field: hasCC).",
                "default": false,
                "editor": "checkbox"
              },
              "3D": {
                "title": "3D",
                "type": "boolean",
                "description": "Apply the 3D filter (JSON field: is3D).",
                "default": false,
                "editor": "checkbox"
              },
              "Live": {
                "title": "Live",
                "type": "boolean",
                "description": "Live videos only (JSON field: isLive).",
                "default": false,
                "editor": "checkbox"
              },
              "Purchased": {
                "title": "Purchased",
                "type": "boolean",
                "description": "Show purchased content (JSON field: isBought).",
                "default": false,
                "editor": "checkbox"
              },
              "4K": {
                "title": "4K",
                "type": "boolean",
                "description": "Apply the 4K filter (JSON field: is4K).",
                "default": false,
                "editor": "checkbox"
              },
              "Location": {
                "title": "Location",
                "type": "boolean",
                "description": "Require location metadata (JSON field: hasLocation).",
                "default": false,
                "editor": "checkbox"
              },
              "HDR": {
                "title": "HDR",
                "type": "boolean",
                "description": "Apply the HDR filter (JSON field: isHDR).",
                "default": false,
                "editor": "checkbox"
              },
              "VR180": {
                "title": "VR180",
                "type": "boolean",
                "description": "Show VR180 content (JSON field: isVR180).",
                "default": false,
                "editor": "checkbox"
              }
            },
            "additionalProperties": false
          },
          "local": {
            "title": "📍 Localized Results",
            "type": "boolean",
            "description": "If true, request localized data."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}