{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper · Videos, Shorts, channels · $1/1K",
    "description": "Search YouTube by keyword for video research, trend monitoring and competitor analysis. Finds videos, Shorts, channels, playlists and movies with duration, upload date and feature filters; returns titles, views and links. $1/1K results.",
    "version": "0.1",
    "x-build-id": "A0bK76Z1xe4K62c9n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mlg14~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mlg14-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/mlg14~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mlg14-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/mlg14~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mlg14-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",
        "properties": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keywords to search on YouTube. Example: python tutorial. Use the phrase you would type into the YouTube search box.",
            "default": "python tutorial"
          },
          "type": {
            "title": "Result type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "Kind of result to return. Allowed values: video, shorts, channel, playlist, movie. Example: channel. Use video (default) for regular videos.",
            "default": "video"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum unique results saved when scrapeAllResults is off. Example: 50. Use a small value for quick runs.",
            "default": 100
          },
          "scrapeAllResults": {
            "title": "Scrape all available",
            "type": "boolean",
            "description": "Follow continuation pages until the source ends, the run budget is reached or the 200-page limit is hit. Example: true. Leave false (default) and use maxResults for bounded runs.",
            "default": false
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Result order. Allowed values: relevance, popularity. Example: popularity. Use relevance (default) for best match; Shorts search uses its own ordering.",
            "default": "relevance"
          },
          "duration": {
            "title": "Video duration",
            "enum": [
              "under3min",
              "3to20min",
              "over20min"
            ],
            "type": "string",
            "description": "Optional length filter for video results. Allowed values: under3min, 3to20min, over20min. Example: over20min. Leave empty for any length."
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Optional recent-upload filter. Allowed values: today, week, month, year. Example: week. Use it for trend monitoring; leave empty for all time."
          },
          "geo": {
            "title": "Country",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter uppercase country code for localized search. Example: GB. Keep US (default) unless you need another market.",
            "default": "US"
          },
          "lang": {
            "title": "Language",
            "pattern": "^[a-z]{2}$",
            "type": "string",
            "description": "Two-letter lowercase interface language code. Example: es. Keep en (default) for English.",
            "default": "en"
          },
          "features": {
            "title": "Video features",
            "type": "object",
            "description": "Optional video feature filters as an object of true/false flags; selected features are combined. Keys: HD, subtitles, CCommons, 3D, Live, Purchased, 4K, 360, Location, HDR, VR180. Example: {\"4K\": true, \"subtitles\": true}. Leave empty for no feature filter.",
            "properties": {
              "360": {
                "title": "360 degrees",
                "type": "boolean",
                "description": "Show only results matching 360 degrees.",
                "editor": "checkbox",
                "default": false
              },
              "HD": {
                "title": "HD",
                "type": "boolean",
                "description": "Show only results matching HD.",
                "editor": "checkbox",
                "default": false
              },
              "subtitles": {
                "title": "Subtitles or captions",
                "type": "boolean",
                "description": "Show only results matching Subtitles or captions.",
                "editor": "checkbox",
                "default": false
              },
              "CCommons": {
                "title": "Creative Commons",
                "type": "boolean",
                "description": "Show only results matching Creative Commons.",
                "editor": "checkbox",
                "default": false
              },
              "3D": {
                "title": "3D",
                "type": "boolean",
                "description": "Show only results matching 3D.",
                "editor": "checkbox",
                "default": false
              },
              "Live": {
                "title": "Live",
                "type": "boolean",
                "description": "Show only results matching Live.",
                "editor": "checkbox",
                "default": false
              },
              "Purchased": {
                "title": "Purchased",
                "type": "boolean",
                "description": "Show only results matching Purchased.",
                "editor": "checkbox",
                "default": false
              },
              "4K": {
                "title": "4K",
                "type": "boolean",
                "description": "Show only results matching 4K.",
                "editor": "checkbox",
                "default": false
              },
              "Location": {
                "title": "Location metadata",
                "type": "boolean",
                "description": "Show only results matching Location metadata.",
                "editor": "checkbox",
                "default": false
              },
              "HDR": {
                "title": "HDR",
                "type": "boolean",
                "description": "Show only results matching HDR.",
                "editor": "checkbox",
                "default": false
              },
              "VR180": {
                "title": "VR180",
                "type": "boolean",
                "description": "Show only results matching VR180.",
                "editor": "checkbox",
                "default": false
              }
            },
            "additionalProperties": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings for public YouTube search requests. Keep the default Apify Proxy unless you have your own proxies.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}