{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper 🔎 (videos, views, rank tracking)",
    "description": "Every video YouTube ranks for your keywords, with rank position, exact views, upload date, length, channel and badges. Filters for upload date, length and popularity, any country. Turn on rank tracking to see each video's rank change since the last run. No API key, no login.",
    "version": "0.1",
    "x-build-id": "Hyw5YLNrX6De9c7Wa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tagadanar~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tagadanar-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/tagadanar~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tagadanar-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/tagadanar~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tagadanar-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": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search keywords",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "One keyword or phrase per line, typed exactly as a viewer would type it into YouTube's search box. Each keyword is searched separately and every row says which keyword it ranks for and at which position. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max videos per keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop each keyword after this many videos. YouTube itself usually stops a search somewhere between 300 and 500 videos; when it ends earlier than this number, the run says so. You only pay for videos delivered.",
            "default": 50
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Same as YouTube's 'Upload date' filter. 'Last hour' is still honoured by YouTube even though it left the filter menu.",
            "default": "any"
          },
          "duration": {
            "title": "Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "under3",
              "between3and20"
            ],
            "type": "string",
            "description": "Same as YouTube's length filter. YouTube's menu now shows 'Under 3 minutes' and '3 - 20 minutes'; the classic 'Under 4 minutes' and '4 - 20 minutes' buckets still work too.",
            "default": "any"
          },
          "sortBy": {
            "title": "Prioritize",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Same as YouTube's 'Prioritize' choice. Popularity is YouTube's own view-weighted order. YouTube no longer sorts search results by upload date or rating; use 'Upload date' above to get recent videos.",
            "default": "relevance"
          },
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IE",
              "NZ",
              "IN",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "BE",
              "CH",
              "AT",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "PT",
              "CZ",
              "RO",
              "GR",
              "TR",
              "UA",
              "IL",
              "AE",
              "SA",
              "EG",
              "ZA",
              "NG",
              "KE",
              "BR",
              "MX",
              "AR",
              "CO",
              "CL",
              "PE",
              "JP",
              "KR",
              "TW",
              "HK",
              "SG",
              "MY",
              "ID",
              "PH",
              "TH",
              "VN",
              "PK",
              "BD"
            ],
            "type": "string",
            "description": "The country YouTube ranks results for (its 'Location' setting).",
            "default": "US"
          },
          "language": {
            "title": "Interface language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "sv",
              "no",
              "da",
              "fi",
              "pl",
              "cs",
              "ro",
              "el",
              "tr",
              "uk",
              "ru",
              "he",
              "ar",
              "hi",
              "bn",
              "ur",
              "id",
              "ms",
              "th",
              "vi",
              "fil",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW"
            ],
            "type": "string",
            "description": "YouTube's display language. It nudges the ranking and sets the language of texts such as '2 days ago'. Upload-date estimates are computed for English, French, German, Spanish, Portuguese and Italian.",
            "default": "en"
          },
          "trackRankChanges": {
            "title": "Track rank changes between runs",
            "type": "boolean",
            "description": "Remember where each video ranked last time this exact set of keywords and filters was run, and add previousRank and rankChange to every row. Schedule the same input daily or weekly to watch rankings move. New videos get null. Nothing extra is charged.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}