{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Shorts Scraper - Growth & Audience Insights",
    "description": "Scrape YouTube Shorts from channels and keyword searches. Get video metrics, available transcripts, comments, replies and optional author avatars. Track growth across runs and discover audience questions, product requests and content ideas backed by real comments.",
    "version": "0.4",
    "x-build-id": "pXcqfAmdVhGS4PmYa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~youtube-shorts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-youtube-shorts-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/trakk~youtube-shorts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-youtube-shorts-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/trakk~youtube-shorts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-youtube-shorts-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "fast",
              "full"
            ],
            "type": "string",
            "description": "Fast collects metrics, history and topic analysis. Full additionally retrieves available public captions.",
            "default": "fast"
          },
          "scrapeType": {
            "title": "Sources to use",
            "enum": [
              "auto",
              "channels",
              "search"
            ],
            "type": "string",
            "description": "Auto processes supplied channels and searchQueries together.",
            "default": "auto"
          },
          "channels": {
            "title": "YouTube channels",
            "type": "array",
            "description": "YouTube channel handles, IDs or URLs. Up to 20 combined channel and search inputs per run.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search phrases",
            "type": "array",
            "description": "One literal search phrase per entry. Only YouTube Shorts are selected. Limit applies independently to each phrase.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsShorts": {
            "title": "Shorts per channel",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum saved Shorts per channel or search phrase. The run time and resource limits can stop collection earlier; OUTPUT explains the stop reason.",
            "default": 50
          },
          "sortChannelShortsBy": {
            "title": "Sort channel Shorts",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Use the channel Shorts tab sorting order.",
            "default": "NEWEST"
          },
          "oldestPostDate": {
            "title": "Published on or after",
            "type": "string",
            "description": "ISO date, Unix seconds/milliseconds or relative time such as 30 days. Inclusive cutoff. Month = 30 days, year = 365 days."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "standard",
              "compact"
            ],
            "type": "string",
            "description": "Standard returns the full record. Compact returns a smaller core record with alternate field names. Both include analytics and requested transcript fields.",
            "default": "standard"
          },
          "deduplicate": {
            "title": "Remove duplicates across channels",
            "type": "boolean",
            "description": "Save each Short ID once across the run.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Maximum simultaneous source requests.",
            "default": 10
          },
          "maxPages": {
            "title": "Pages per channel",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum discovery pages per channel.",
            "default": 100
          },
          "maxRunSeconds": {
            "title": "Collection time limit",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Collection time limit, up to 120 seconds. Saved records are retained. Independent owner resource limits can stop the run sooner.",
            "default": 60
          },
          "maxRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Retries after transient source failures.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy or custom proxy configuration.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "trackHistory": {
            "title": "Remember observations",
            "type": "boolean",
            "description": "Compare metrics across runs and build age-matched channel baselines.",
            "default": true
          },
          "historyKey": {
            "title": "History workspace",
            "pattern": "^[A-Za-z0-9_-]{1,40}$",
            "type": "string",
            "description": "Reuse this name across runs to compare observations. Use distinct names for separate monitoring lists.",
            "default": "default"
          },
          "minObservationIntervalSeconds": {
            "title": "Minimum interval between observations",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "Minimum spacing used to calculate growth. Fifteen minutes by default. The Actor does not wait or schedule another run.",
            "default": 900
          },
          "comparisonAgeHours": {
            "title": "Compare Shorts at this age (hours)",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "Use actual observations within ±25% of this age. No historical values are invented or extrapolated.",
            "default": 24
          },
          "baselineMinSamples": {
            "title": "Minimum baseline Shorts",
            "minimum": 3,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum other Shorts from the same channel with observations near the chosen age.",
            "default": 5
          },
          "historySnapshots": {
            "title": "History snapshots to read",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Use up to this many recent run snapshots, capped at 20,000 observations.",
            "default": 48
          },
          "analyzeTopics": {
            "title": "Find shared topics",
            "type": "boolean",
            "description": "Group saved Shorts by search phrase, hashtag or adjacent title phrase. Results are in the TOPICS output.",
            "default": true
          },
          "topicMinChannels": {
            "title": "Minimum independent channels per topic",
            "minimum": 2,
            "maximum": 100,
            "type": "integer",
            "description": "Require this many different channel IDs for a shared topic.",
            "default": 2
          },
          "transcriptLanguage": {
            "title": "Transcript language (Full)",
            "enum": [
              "auto",
              "en",
              "ru",
              "es",
              "pt",
              "de",
              "fr",
              "it",
              "hi",
              "ja",
              "ko",
              "ar",
              "id",
              "tr",
              "uk"
            ],
            "type": "string",
            "description": "Auto selects an available caption language, preferring manual tracks and English. A requested missing language is reported explicitly.",
            "default": "auto"
          },
          "maxTotalResults": {
            "title": "Total result limit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on all saved Shorts across the run, in addition to each source limit.",
            "default": 10000
          },
          "includeComments": {
            "title": "Collect comment texts",
            "type": "boolean",
            "description": "Save comments in a separate table. The total numeric commentsCount is collected even when this is off.",
            "default": false
          },
          "maxCommentsPerShort": {
            "title": "Comments per Short",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum saved comment records per Short, including replies when enabled.",
            "default": 20
          },
          "maxCommentsTotal": {
            "title": "Comments across the run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard limit across all Shorts. Duplicate comment IDs are saved once.",
            "default": 10000
          },
          "commentsSort": {
            "title": "Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Use the source comment order.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Replies share the per-Short and total comment limits.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Replies per parent comment",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum replies to one parent. Also constrained by the overall comment limits.",
            "default": 5
          },
          "analyzeAudience": {
            "title": "Find audience questions and requests",
            "type": "boolean",
            "description": "Find explicit purchase, price, product, tutorial, follow-up, alternative and problem phrases with original comment evidence. Requires comments.",
            "default": true
          },
          "downloadAvatars": {
            "title": "Save commenter avatars",
            "type": "boolean",
            "description": "Download and store an avatar once per author per run. Files are not fetched when this is off. A successful file save is eligible for the avatar_saved event if that event is configured.",
            "default": false
          },
          "maxAvatarDownloads": {
            "title": "Avatar limit per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum distinct author avatars to save.",
            "default": 1000
          },
          "maxCommentPages": {
            "title": "Comment pages per Short",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum total source pages, including reply pages.",
            "default": 20
          },
          "commentsTimeoutSeconds": {
            "title": "Comment collection time per Short",
            "minimum": 5,
            "maximum": 45,
            "type": "integer",
            "description": "Bounded time for fetching each Short comment sample.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}