{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Viral & Trend Radar — Shorts & Videos ✅",
    "description": "Discover YouTube Shorts and videos by topic or channel. Track view growth between runs, compare videos with channel baselines and export ranked research data. No YouTube API key required.",
    "version": "0.1",
    "x-build-id": "dBMUawpCEephEUGPP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexascout~youtube-viral-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexascout-youtube-viral-radar",
        "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/nexascout~youtube-viral-radar/runs": {
      "post": {
        "operationId": "runs-sync-nexascout-youtube-viral-radar",
        "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/nexascout~youtube-viral-radar/run-sync": {
      "post": {
        "operationId": "run-sync-nexascout-youtube-viral-radar",
        "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",
        "properties": {
          "discoveryModes": {
            "title": "Discovery modes",
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "description": "Search topics or monitor channel tabs. Regional Trending is best-effort and may return no videos for anonymous sessions.",
            "items": {
              "type": "string"
            },
            "default": [
              "search"
            ]
          },
          "searchQueries": {
            "title": "Search queries or niches",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 topic phrases for search discovery. Enter a specific niche; this is a sample of matching videos.",
            "items": {
              "type": "string"
            },
            "default": [
              "skincare routine"
            ]
          },
          "channelUrls": {
            "title": "Channel URLs",
            "maxItems": 10,
            "type": "array",
            "description": "Public YouTube channel URLs or @handles, used when 'channel' is in discoveryModes.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "country": {
            "title": "YouTube localization",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter country code. Localizes trending/search results; it does NOT identify audience or creator country.",
            "default": "US"
          },
          "formats": {
            "title": "Video formats",
            "enum": [
              "short",
              "long",
              "any"
            ],
            "type": "string",
            "description": "Which video formats to include: Shorts only, long-form only, or any.",
            "default": "any"
          },
          "language": {
            "title": "Content language (soft filter)",
            "type": "string",
            "description": "Filter by detected content language (heuristic from title/description). 'any' = no filter. Examples: en, pt, es, de, fr. A known mismatch is excluded; unknown language is kept.",
            "default": "any"
          },
          "categories": {
            "title": "Content categories (optional)",
            "type": "array",
            "description": "Narrow output to auto-tagged categories. Empty = keep all categories.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Minimum exact public view counter. Filtered observations can still be saved to history.",
            "default": 0
          },
          "maxAgeHours": {
            "title": "Maximum publication age (hours; approximate for date-only data)",
            "minimum": 0,
            "maximum": 168,
            "type": "integer",
            "description": "0 disables. Exact timestamps use the requested window. Date-only data allows up to 24 extra hours of uncertainty; inspect publishedAtPrecision in the output.",
            "default": 0
          },
          "minReachMultiple": {
            "title": "Minimum reach multiple",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Minimum views/subscribers ratio when subscriber data is available. 0 disables. Rounded subscriber counts produce approximate ratios; missing ratios are kept.",
            "default": 0
          },
          "baselineWindow": {
            "title": "Creator baseline window (videos)",
            "minimum": 2,
            "maximum": 200,
            "type": "integer",
            "description": "Use the newest observations of up to this many unique tracked videos from each channel to calculate its median lifetime view rate. This is a sample of observed videos.",
            "default": 20
          },
          "maxResults": {
            "title": "Maximum output videos",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum paid dataset rows. Collection stops once this limit is reached.",
            "default": 25
          },
          "maxCandidatesPerSource": {
            "title": "Discovery candidates per source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum videos discovered per trending feed, query or channel. Does not promise full coverage.",
            "default": 30
          },
          "maxPagesPerSource": {
            "title": "Discovery pages per source",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Bounded pagination. Continuations depend on YouTube availability.",
            "default": 2
          },
          "maxDetailRequests": {
            "title": "Maximum video detail requests",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on physical detail requests, including comment enrichment, retries, failed requests and filtered videos.",
            "default": 80
          },
          "maxRunSeconds": {
            "title": "Collection budget (seconds)",
            "minimum": 30,
            "maximum": 240,
            "type": "integer",
            "description": "Stops collection early enough to write output and history.",
            "default": 180
          },
          "minIntervalMinutes": {
            "title": "Minimum measurement interval (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Do not compute view velocity from observations closer than this interval.",
            "default": 60
          },
          "maxComparisonHours": {
            "title": "Maximum comparison interval (hours)",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Older baselines are marked stale. Keep this greater than the minimum interval.",
            "default": 72
          },
          "risingViewsPerHour": {
            "title": "Rising threshold (views/hour)",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Measured velocity threshold for RISING. Configurable, not a universal viral threshold.",
            "default": 100
          },
          "accelerationFactor": {
            "title": "Acceleration ratio threshold",
            "minimum": 1.1,
            "maximum": 10,
            "type": "number",
            "description": "ACCELERATING requires at least this ratio of successive measured velocities and a current velocity above the rising threshold.",
            "default": 1.5
          },
          "saveHistory": {
            "title": "Remember observations between runs",
            "type": "boolean",
            "description": "Save only verified observations. Reuse the profile and sources for comparisons.",
            "default": true
          },
          "historyProfile": {
            "title": "History profile",
            "pattern": "^[a-zA-Z0-9-]{1,32}$",
            "type": "string",
            "description": "Separate experiments with separate names. Sources and country also form part of the history identity.",
            "default": "default"
          },
          "includeComments": {
            "title": "Enrich public comment counts",
            "type": "boolean",
            "description": "Fetch one public comments continuation when the page does not expose an exact count.",
            "default": true
          },
          "maxRequestRetries": {
            "title": "Retries per YouTube request",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retry temporary network errors and HTTP 403/429/5xx responses within existing time and request caps.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct requests by default. A proxy may improve access to YouTube metadata but adds cost and does not guarantee exact timestamps or access to personalized feeds.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}