{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Shorts Scraper — Views, Likes & Viral Score",
    "description": "Scrape YouTube Shorts by keyword, channel, or hashtag. Returns video URL, title, views, likes, comments, hashtags, and a viral score. MCP-ready. $0.02/result.",
    "version": "1.1",
    "x-build-id": "Ljiw01ihs1NDeVbdm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~youtube-shorts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~youtube-shorts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~youtube-shorts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": {
          "searchQuery": {
            "title": "Search keyword (quick start)",
            "type": "string",
            "description": "Single keyword or phrase to search YouTube Shorts for (e.g. 'gym motivation', 'cooking hacks 2025'). For multiple keywords in one run, use the Search keywords list below."
          },
          "searchQueries": {
            "title": "Search keywords (multiple)",
            "type": "array",
            "description": "List of keywords or topics to search YouTube Shorts for. Each query runs separately and up to maxResults Shorts are scraped per query. Use this for batch keyword research.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs (Shorts tab)",
            "type": "array",
            "description": "YouTube channel /shorts tab URLs to scrape all Shorts from a specific creator. Example: https://www.youtube.com/@MrBeast/shorts — paste the full URL including /shorts. Use for competitor analysis or creator research.",
            "items": {
              "type": "string"
            }
          },
          "hashtagUrls": {
            "title": "Hashtag URLs",
            "type": "array",
            "description": "YouTube hashtag page URLs to scrape all Shorts tagged with a specific hashtag. Example: https://www.youtube.com/hashtag/gymtok — paste the full URL. Best for trend and niche research.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Direct Short URLs",
            "type": "array",
            "description": "Specific YouTube Short URLs to fetch full metadata for. Example: https://www.youtube.com/shorts/VIDEO_ID. Use when you already have a list of Shorts you want to enrich with engagement data.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "Short URL",
                  "description": "URL of a YouTube Short (e.g. https://www.youtube.com/shorts/VIDEO_ID)"
                }
              }
            },
            "default": []
          },
          "maxResults": {
            "title": "Max Shorts per input",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of Shorts to scrape per search keyword, channel, or hashtag URL. Direct Short URLs are always fully scraped. For best results keep under 100; use 500+ only with residential proxies.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Max concurrent browser pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of browser tabs open simultaneously. Lower values (1-3) reduce bot detection risk and memory usage. Higher values (5-10) speed up large runs but may trigger rate limits.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. No proxy is needed for keyword searches and basic metadata. Switch to Apify residential proxies if individual Short pages are blocked or if you need view counts from private/unlisted videos."
          },
          "includeTranscripts": {
            "title": "Include video transcripts",
            "type": "boolean",
            "description": "When true, fetches the closed-caption transcript for each Short and returns transcript_text, transcript_segments (with timestamps), transcript_language, is_auto_generated, and transcript_word_count. Shorts with voiceover or narration (storytime, motivational, how-to) usually have transcripts; dance/music/visual-only Shorts typically do not. IMPORTANT: YouTube rate-limits the transcript endpoint from datacenter IPs — enable Apify residential proxy (proxyConfiguration: {\"useApifyProxy\": true, \"apifyProxyGroups\": [\"RESIDENTIAL\"]}) for reliable transcript fetches. Adds $0.005 per Short where a transcript was actually fetched (Shorts without captions cost nothing extra). Default: false. NOT a separate scraper — use `khadinakbar/youtube-transcript-extractor` if you need transcripts from full-length YouTube videos.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Preferred transcript language",
            "type": "string",
            "description": "ISO 639-1 two-letter language code for the transcript (e.g., 'en' for English, 'es' for Spanish, 'pt' for Portuguese, 'hi' for Hindi, 'fr' for French). If the requested language is unavailable, falls back to English, then to the first available caption track. Only used when includeTranscripts is true. Default: 'en'.",
            "default": "en"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}