{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Suggestions Scraper",
    "description": "Get public YouTube autocomplete suggestions for keyword research, content discovery, and SEO planning.",
    "version": "1.0",
    "x-build-id": "Fuf8WidkcEKo6eqVe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~youtube-search-suggestions-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-youtube-search-suggestions-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/dataspryva~youtube-search-suggestions-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-youtube-search-suggestions-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/dataspryva~youtube-search-suggestions-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-youtube-search-suggestions-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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Seed queries",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Keywords or phrases to expand with YouTube autocomplete. Short 1-3 word seeds work best.",
            "items": {
              "type": "string"
            },
            "default": [
              "web scraping"
            ]
          },
          "mode": {
            "title": "Expansion mode",
            "enum": [
              "all",
              "exact",
              "alphabet",
              "questions",
              "modifiers",
              "prepositions",
              "comparisons",
              "related"
            ],
            "type": "string",
            "description": "How far to expand each seed. Exact is one request; All runs every working expansion axis.",
            "default": "exact"
          },
          "source": {
            "title": "Suggestion source",
            "enum": [
              "youtube",
              "youtubeMusic",
              "both"
            ],
            "type": "string",
            "description": "YouTube search, YouTube Music, or both. YouTube Music is a separate music-biased source.",
            "default": "youtube"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "pl",
              "sv",
              "no",
              "da",
              "fi",
              "cs",
              "el",
              "hu",
              "ro",
              "bg",
              "hr",
              "sk",
              "sl",
              "et",
              "lv",
              "lt",
              "ga",
              "is",
              "mt",
              "ru",
              "uk",
              "be",
              "sr",
              "bs",
              "mk",
              "sq",
              "ar",
              "tr",
              "he",
              "fa",
              "ur",
              "ku",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW",
              "hi",
              "bn",
              "ta",
              "te",
              "ml",
              "mr",
              "gu",
              "kn",
              "pa",
              "ne",
              "si",
              "my",
              "id",
              "th",
              "vi",
              "ms",
              "tl",
              "km",
              "lo",
              "sw",
              "am",
              "ha",
              "yo",
              "ig",
              "zu",
              "xh",
              "af",
              "az",
              "kk",
              "uz",
              "ky",
              "tg",
              "mn",
              "ka",
              "hy"
            ],
            "type": "string",
            "description": "Language used to localize suggestions.",
            "default": "en"
          },
          "market": {
            "title": "Country or region",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "BE",
              "AT",
              "CH",
              "PT",
              "GR",
              "CZ",
              "PL",
              "SE",
              "NO",
              "DK",
              "FI",
              "HU",
              "RO",
              "BG",
              "HR",
              "SK",
              "SI",
              "EE",
              "LV",
              "LT",
              "LU",
              "MT",
              "CY",
              "IS",
              "LI",
              "MC",
              "AD",
              "SM",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "MO",
              "IN",
              "PK",
              "BD",
              "LK",
              "NP",
              "AF",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "SG",
              "BN",
              "MM",
              "KH",
              "LA",
              "TL",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE",
              "VE",
              "EC",
              "BO",
              "PY",
              "UY",
              "GT",
              "CR",
              "PA",
              "DO",
              "PR",
              "CU",
              "SV",
              "HN",
              "NI",
              "JM",
              "TT",
              "BB",
              "RU",
              "TR",
              "UA",
              "BY",
              "KZ",
              "UZ",
              "AZ",
              "AM",
              "GE",
              "MD",
              "RS",
              "BA",
              "MK",
              "AL",
              "ME",
              "XK",
              "ZA",
              "NG",
              "EG",
              "MA",
              "DZ",
              "TN",
              "KE",
              "GH",
              "ET",
              "UG",
              "TZ",
              "RW",
              "ZW",
              "SN",
              "CI",
              "CM",
              "MZ",
              "AO",
              "ZM",
              "AE",
              "SA",
              "IL",
              "QA",
              "KW",
              "BH",
              "OM",
              "JO",
              "LB",
              "SY",
              "IQ",
              "IR",
              "YE",
              "PS"
            ],
            "type": "string",
            "description": "Country or region used to localize suggestions.",
            "default": "US"
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Global cap on suggestion rows across all seeds and sources.",
            "default": 5000
          },
          "maxSuggestionsPerSeed": {
            "title": "Maximum suggestions per seed",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on rows kept for each seed after the expansion plan runs.",
            "default": 2000
          },
          "maxQueriesPerSeed": {
            "title": "Maximum queries per seed",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on autocomplete requests per seed and source. Exact stays one request.",
            "default": 300
          },
          "expansionDepth": {
            "title": "Recursion depth",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "0 = selected mode only. 1-2 re-query the best suggestions for deeper long-tail coverage.",
            "default": 0
          },
          "dedupeAcrossSeeds": {
            "title": "Remove duplicates across seeds",
            "type": "boolean",
            "description": "Keep one row when the same suggestion appears for more than one seed. Per-seed duplicates are always removed.",
            "default": false
          },
          "minLength": {
            "title": "Minimum length",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Drop suggestions shorter than this many characters."
          },
          "maxLength": {
            "title": "Maximum length",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Drop suggestions longer than this many characters."
          },
          "containsKeyword": {
            "title": "Contains keyword",
            "type": "string",
            "description": "Keep suggestions containing this text. Prefix with ! to exclude it instead."
          },
          "excludeTerms": {
            "title": "Exclude terms",
            "type": "array",
            "description": "Drop suggestions containing any of these terms.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minWordCount": {
            "title": "Minimum word count",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Drop suggestions with fewer words than this.",
            "default": 0
          },
          "onlyQuestions": {
            "title": "Only questions",
            "type": "boolean",
            "description": "Keep only suggestions that look like questions.",
            "default": false
          },
          "mustContainSeed": {
            "title": "Must contain seed",
            "type": "boolean",
            "description": "Keep only suggestions that contain the seed keyword.",
            "default": false
          },
          "includeEntityCards": {
            "title": "Include channel and topic cards",
            "type": "boolean",
            "description": "Keep channel and topic suggestions, with their entity metadata, when YouTube returns them.",
            "default": true
          },
          "includeSearchUrl": {
            "title": "Include search links",
            "type": "boolean",
            "description": "Add a ready-to-open YouTube or YouTube Music search URL to every row.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}