{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Search Rank Tracker",
    "description": "YouTube Search Results Scraper (Rank Tracker) captures YouTube SERP rankings for keywords and outputs rank (1..N) with video/channel metadata. Supports pagination, region + language + device mode, optional Shorts inclusion, and stable snapshots for daily/weekly SEO + competitor tracking.",
    "version": "1.0",
    "x-build-id": "VHadijwwPZ3DD3T2b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~youtube-search-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-youtube-search-rank-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/coregent~youtube-search-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-coregent-youtube-search-rank-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/coregent~youtube-search-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-youtube-search-rank-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": "Search keywords to track rankings for. Supports phrases (e.g., 'AI automation tools').",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResultsPerQuery": {
            "title": "Max Results Per Query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of results to return per query (1–500).",
            "default": 50
          },
          "maxPages": {
            "title": "Max Pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of pages to paginate per query (1–10). Each page yields ~20 results.",
            "default": 1
          },
          "regionCode": {
            "title": "Region Code",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IN",
              "DE",
              "FR",
              "JP",
              "BR",
              "MX",
              "ES",
              "IT",
              "NL",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "RU",
              "KR",
              "TW",
              "HK",
              "SG",
              "MY",
              "PH",
              "TH",
              "ID",
              "VN",
              "ZA",
              "NG",
              "EG",
              "AE",
              "SA",
              "TR",
              "IL",
              "AR",
              "CL",
              "CO",
              "PE",
              "NZ",
              "IE",
              "AT",
              "CH",
              "BE",
              "PT",
              "CZ",
              "RO",
              "HU",
              "GR",
              "UA"
            ],
            "type": "string",
            "description": "ISO-3166-1 alpha-2 country code to influence localized results.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "pt",
              "it",
              "nl",
              "ja",
              "ko",
              "zh",
              "ru",
              "ar",
              "hi",
              "tr",
              "pl",
              "sv",
              "no",
              "da",
              "fi",
              "th",
              "vi",
              "id"
            ],
            "type": "string",
            "description": "UI language code (BCP-47 simplified). Affects search result language.",
            "default": "en"
          },
          "safeSearch": {
            "title": "Safe Search",
            "enum": [
              "none",
              "moderate",
              "strict"
            ],
            "type": "string",
            "description": "Safe search filter level.",
            "default": "moderate"
          },
          "includeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "Include YouTube Shorts results when present in search.",
            "default": true
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "upload_date",
              "view_count",
              "rating"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published After",
            "type": "string",
            "description": "Only include results published after this date (YYYY-MM-DD). Best-effort filter.",
            "default": ""
          },
          "publishedBefore": {
            "title": "Published Before",
            "type": "string",
            "description": "Only include results published before this date (YYYY-MM-DD). Best-effort filter.",
            "default": ""
          },
          "deviceMode": {
            "title": "Device Mode",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Simulate desktop or mobile device for search results.",
            "default": "desktop"
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of parallel query/page fetches (1–20).",
            "default": 5
          },
          "useProxy": {
            "title": "Use Proxy",
            "type": "boolean",
            "description": "Use Apify proxy for requests. Recommended for high-volume or frequent runs.",
            "default": false
          },
          "proxyCountryCode": {
            "title": "Proxy Country Code",
            "type": "string",
            "description": "Exit country for proxy routing (e.g., 'US', 'GB'). Leave empty for auto.",
            "default": ""
          },
          "minDelayMs": {
            "title": "Min Delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum delay between page fetches in milliseconds for rate smoothing.",
            "default": 0
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of retries for transient failures per request.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request Timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per HTTP request in seconds.",
            "default": 30
          },
          "debug": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging for debugging.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}