{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper · SERP Rank Tracker & Keywords",
    "description": "YouTube search scraper and rank tracker for keyword research and SEO monitoring: search results with their exact position, the rank change since your last run and an only-new mode. Track your own channels or videos per keyword. No login, no API key.",
    "version": "0.1",
    "x-build-id": "ZLfOYWmQEORId1cH5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thequietstack~youtube-search-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thequietstack-youtube-search-tracker",
        "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/thequietstack~youtube-search-tracker/runs": {
      "post": {
        "operationId": "runs-sync-thequietstack-youtube-search-tracker",
        "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/thequietstack~youtube-search-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-thequietstack-youtube-search-tracker",
        "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",
            "type": "array",
            "description": "What you would type into YouTube's search box, one per line - or a youtube.com/results?search_query=... link (its filters, the sp= part, are used as they are). Up to 200 queries per run.",
            "items": {
              "type": "string"
            }
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "videos",
              "shorts",
              "channels",
              "playlists",
              "all"
            ],
            "type": "string",
            "description": "YouTube's own type filter. 'All' returns the mixed page as a visitor sees it: videos, the Shorts shelf, playlists and channels, each with its position.",
            "default": "videos"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "The two orders YouTube's filter menu offers (checked 01 Oct 2026; the old 'Upload date' sort is no longer offered - use 'Upload date' below plus onlyNewResults for fresh uploads).",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload-date filter.",
            "default": "any"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "under3",
              "3to20",
              "over20"
            ],
            "type": "string",
            "description": "YouTube's duration filter.",
            "default": "any"
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "YouTube's feature filters (all selected must apply).",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creativeCommons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "Live",
                "4K",
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D",
                "HDR",
                "Location",
                "Purchased"
              ]
            },
            "default": []
          },
          "region": {
            "title": "Region (country)",
            "type": "string",
            "description": "Two-letter country code of the searching visitor (US, GB, DE, IN, BR ...). Ranks differ by country. The interface language is always English, so numbers and dates are read exactly; queries can be in any language.",
            "default": "US"
          },
          "maxResultsPerQuery": {
            "title": "Scan depth per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many results of each query are read, in YouTube's order (the first page has ~20, later pages up to 100). Ranks are positions within this depth.",
            "default": 50
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Hard cap on result pages per query.",
            "default": 20
          },
          "maxResults": {
            "title": "Max result rows per run",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on result rows written (and charged) in this run. Keyword reports are not counted here.",
            "default": 1000
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "trackedOnly",
              "reportsOnly"
            ],
            "type": "string",
            "description": "'Only tracked' scans every query to the full depth but writes (and charges) only the rows of your tracked channels or videos, plus one keyword report per query that says where they rank - or that they are not in the top N. 'Only keyword reports' writes one report row per query and no result rows.",
            "default": "all"
          },
          "trackChannels": {
            "title": "Track channels",
            "type": "array",
            "description": "Your channel or competitors: @handle, youtube.com/@handle or a UC... channel ID. Their results are marked isTracked and their best position per query goes into the keyword report. Note: Shorts in a mixed results page show no channel - add enrichVideoDetails to match them.",
            "items": {
              "type": "string"
            }
          },
          "trackVideos": {
            "title": "Track videos",
            "type": "array",
            "description": "Video links or IDs whose position you want per query.",
            "items": {
              "type": "string"
            }
          },
          "rankSamples": {
            "title": "Samples per query (rank smoothing)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "YouTube's results order for logged-out visitors changes between identical searches (measured 01 Oct 2026: in the top 10 only 1-8 of 10 videos kept their exact position from one request to the next). With 3, each query is searched three times and every result gets its median position, best and worst position and in how many samples it appeared. Costs no extra events, only time.",
            "default": 1
          },
          "compareWithPreviousRun": {
            "title": "Compare with the previous run",
            "type": "boolean",
            "description": "Remembers each query's ranks in a named key-value store. Every row then carries previousRank, rankChange (+3 = moved up three places) and isNew; the keyword report counts new and vanished results.",
            "default": false
          },
          "onlyNewResults": {
            "title": "Only new results since the last run",
            "type": "boolean",
            "description": "For scheduled keyword monitoring: results already delivered by an earlier run of the same query (same filters and region) are skipped and not charged. Implies 'Compare with the previous run'.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory store name",
            "type": "string",
            "description": "Named key-value store for the comparison memory. Use one name per project or schedule.",
            "default": "youtube-search-tracker-state"
          },
          "keywordReport": {
            "title": "Keyword report per query",
            "type": "boolean",
            "description": "Adds one row per query (recordType 'keyword-report'): YouTube's result estimate, view distribution of the top results (exact), share of fresh uploads, how many titles contain the keyword, top channels, positions of tracked channels/videos. Always on in 'Only tracked' mode.",
            "default": false
          },
          "enrichVideoDetails": {
            "title": "Add likes, comment count, exact date and description",
            "type": "boolean",
            "description": "One extra request per written video or Short (the public watch-page data): likes (exact where YouTube shows them exactly), comment count, publish date, description, hashtags, and channel and views for Shorts. Charged as an extra event per row; slower.",
            "default": false
          },
          "titleIncludes": {
            "title": "Title must contain (any)",
            "type": "array",
            "description": "Write only results whose title contains at least one of these words or phrases (case-insensitive). Ranks still count every result.",
            "items": {
              "type": "string"
            }
          },
          "titleExcludes": {
            "title": "Title must not contain",
            "type": "array",
            "description": "Skip results whose title contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "requireQueryWordsInTitle": {
            "title": "All query words in the title",
            "type": "boolean",
            "description": "Skip results whose title does not contain every word of the query. YouTube fills thin queries with loosely related videos; this keeps only exact topical matches.",
            "default": false
          },
          "minViews": {
            "title": "Min views",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos with fewer views. Rounded counts (Shorts: '550K') are compared by their highest possible value, so nothing that could qualify is dropped."
          },
          "maxAgeDays": {
            "title": "Max age (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Skip videos that are certainly older (by YouTube's '3 weeks ago' or, with details, by the exact date). Items without a shown age are kept."
          },
          "dedupeAcrossQueries": {
            "title": "One row per video across all queries",
            "type": "boolean",
            "description": "By default a video that ranks for two queries appears (and is charged) once per query, with each rank. Turn on to keep only its first appearance.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Pause between requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "One request at a time with this pause. Raise it for very large runs.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}