{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search API",
    "description": "Search YouTube for videos, channels and playlists. Get views, likes, comments, engagement rate, subscribers, contact email and a transcript snippet for each result. No login. Bulk queries, date filter, auto proxy fallback. Export JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "PGooVjhSYEMZT2RGX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_minds~youtube-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_minds-youtube-search-api",
        "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/data_minds~youtube-search-api/runs": {
      "post": {
        "operationId": "runs-sync-data_minds-youtube-search-api",
        "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/data_minds~youtube-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-data_minds-youtube-search-api",
        "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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "🔎 Search queries",
            "minItems": 1,
            "type": "array",
            "description": "What to search for on YouTube. Add as many searches as you like - each one is collected on its own up to the limit below.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max results per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum results collected for each search (3 searches x 50 = up to 150 results). YouTube serves about 1,000 results per search at most.",
            "default": 10
          },
          "searchType": {
            "title": "🔧 What to search for",
            "enum": [
              "videos",
              "shorts",
              "channels",
              "playlists"
            ],
            "type": "string",
            "description": "The kind of result to return.",
            "default": "videos"
          },
          "sortBy": {
            "title": "🔃 Sort by",
            "enum": [
              "relevance",
              "viewCount",
              "date"
            ],
            "type": "string",
            "description": "Relevance and view count are sorted by YouTube. Newest first sorts the matched videos by publish date.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "📅 Uploaded",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only results uploaded within this period.",
            "default": "any"
          },
          "duration": {
            "title": "🎯 Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Short = under 4 minutes, medium = 4 to 20 minutes, long = over 20 minutes. Videos only.",
            "default": "any"
          },
          "features": {
            "title": "🎯 Video features",
            "type": "array",
            "description": "Keep only videos that have all the selected features.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "hd",
                "four_k",
                "subtitles",
                "creative_commons",
                "hdr",
                "vr180",
                "vr360",
                "three_d",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "Live now",
                "HD",
                "4K",
                "Subtitles / CC",
                "Creative Commons",
                "HDR",
                "VR180",
                "360°",
                "3D",
                "Has location",
                "Purchased (rental / paid)"
              ]
            }
          },
          "eventType": {
            "title": "🎯 Live stream status",
            "enum": [
              "any",
              "live",
              "upcoming",
              "completed"
            ],
            "type": "string",
            "description": "Filter live streams by state. Videos only.",
            "default": "any"
          },
          "publishedAfter": {
            "title": "📅 Published on or after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Keep only videos published on or after this date. Pick a day, or type how far back to look. Examples: 2025-01-31 or 30 days. Leave empty for no limit."
          },
          "publishedBefore": {
            "title": "📅 Published on or before",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Keep only videos published on or before this date. Pick a day, or type how far back. Examples: 2025-06-30 or 6 months. Leave empty for no limit."
          },
          "region": {
            "title": "📍 Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IN",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "BR",
              "MX",
              "AR",
              "JP",
              "KR",
              "ID",
              "PH",
              "TH",
              "VN",
              "TR",
              "SA",
              "AE",
              "EG",
              "ZA",
              "NG",
              "PL",
              "SE",
              "RU",
              "PK",
              "BD"
            ],
            "type": "string",
            "description": "The country whose YouTube results you want to see.",
            "default": "US"
          },
          "language": {
            "title": "🌍 Language",
            "enum": [
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "ru",
              "ja",
              "ko",
              "zh",
              "hi",
              "bn",
              "ar",
              "tr",
              "id",
              "th",
              "vi",
              "pl",
              "sv",
              "ur"
            ],
            "type": "string",
            "description": "Language of YouTube's interface and results.",
            "default": "en"
          },
          "safeSearch": {
            "title": "🎯 Safe search",
            "enum": [
              "moderate",
              "strict"
            ],
            "type": "string",
            "description": "Strict hides content YouTube marks as mature.",
            "default": "moderate"
          },
          "enrich": {
            "title": "✅ Add full video details",
            "type": "boolean",
            "description": "Add description, likes, comments, keywords, hashtags, chapters and channel data to every result. Turn off for a much faster run with basic data only.",
            "default": true
          },
          "enrichChannel": {
            "title": "✅ Add channel details",
            "type": "boolean",
            "description": "Add the channel's country, join date, totals, description, social links and public contact email. Needs full video details.",
            "default": true
          },
          "enrichTranscript": {
            "title": "✅ Add transcript snippet",
            "type": "boolean",
            "description": "Add the first part of the video's captions when it has them. Needs full video details.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. The default settings work for most runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}