{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Keyword Rank Tracker: Videos, Channels & Share of Voice",
    "description": "Track YouTube search rankings for your videos and channels across countries and languages. Returns target positions, channel share of voice, the full ranked results, competitor stats and rank changes on repeat runs.",
    "version": "1.0",
    "x-build-id": "Hb06yJEvWbtpmh6Bj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~youtube-keyword-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-youtube-keyword-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/xyrelith-data~youtube-keyword-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-youtube-keyword-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/xyrelith-data~youtube-keyword-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-youtube-keyword-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": [
          "keywords"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "track",
              "monitor"
            ],
            "type": "string",
            "description": "Track a fresh snapshot, or monitor changes against the previous run stored under your history key.",
            "default": "track"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search phrases to check, one per line. Each keyword is searched in every selected market for every target.",
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Country codes for the YouTube search results (ISO 3166-1 alpha-2). Supported: US, GB, CA, AU, DE, FR, JP, KR, BR, IN, MX, IT, ES, NL, PL, RU, SE, NO, DK, FI, ZA, SG, HK, TW, ID, MY, TH, PH, AR, CO, CL.",
            "items": {
              "type": "string"
            },
            "default": [
              "US"
            ]
          },
          "language": {
            "title": "Interface language",
            "enum": [
              "auto",
              "ar",
              "bn",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "es",
              "fa",
              "fi",
              "fr",
              "he",
              "hi",
              "hu",
              "id",
              "it",
              "ja",
              "ko",
              "ms",
              "nl",
              "no",
              "pl",
              "pt",
              "ro",
              "ru",
              "sv",
              "th",
              "tr",
              "uk",
              "ur",
              "vi",
              "zh-Hans",
              "zh-Hant"
            ],
            "type": "string",
            "description": "Language of the YouTube search page. Auto uses the market's main language.",
            "default": "auto"
          },
          "targetVideos": {
            "title": "Target videos",
            "type": "array",
            "description": "Your video URLs or 11-character video IDs. Watch, youtu.be, Shorts, embed and live links are accepted.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "targetChannels": {
            "title": "Target channels",
            "type": "array",
            "description": "Your channel URLs, @handles or UC... channel IDs. A channel matches any of its videos in the results.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "competitorChannels": {
            "title": "Competitor channels",
            "type": "array",
            "description": "Competitor channel URLs, @handles or UC... channel IDs. Their ranks, video counts and share of voice are reported beside yours.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "videos",
              "channels",
              "both"
            ],
            "type": "string",
            "description": "Rank regular videos, channel search results, or both. Video rankings drive share of voice.",
            "default": "videos"
          },
          "includeShorts": {
            "title": "Include Shorts",
            "type": "boolean",
            "description": "Include Shorts shelf items in video rankings. When off, only regular video results take positions.",
            "default": false
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Keep only videos uploaded in this period, matching YouTube's own filter. Channel searches ignore it.",
            "default": "any"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Keep only videos of this length, matching YouTube's own filter. Channel searches ignore it.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "view_count"
            ],
            "type": "string",
            "description": "Order of the search results. Relevance matches the default YouTube page.",
            "default": "relevance"
          },
          "depth": {
            "title": "Ranking depth",
            "minimum": 20,
            "maximum": 500,
            "type": "integer",
            "description": "How many results to inspect per keyword and market. YouTube returns about 20 per page; 20 is the cheapest useful check.",
            "default": 20
          },
          "includeVideoDetails": {
            "title": "Fetch exact video details",
            "type": "boolean",
            "description": "Adds one small request per ranked video for the exact publish date, view count, like count and category. Slower and uses more requests; listings already include YouTube's displayed age and views.",
            "default": false
          },
          "stateKey": {
            "title": "History key",
            "type": "string",
            "description": "Monitor mode only. A name for this project's history, so separate clients or keyword sets keep separate baselines.",
            "default": "default"
          },
          "resetHistory": {
            "title": "Reset history",
            "type": "boolean",
            "description": "Monitor mode only. Clear the stored snapshots for this history key before checking, and start a new baseline.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}