{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Shorts Scraper (Official API) — By Keyword & Channel",
    "description": "Bring your own free YouTube API key. Get YouTube Shorts from any channel (YouTube's own Shorts list, not a guess) or by keyword, with views, likes, comments, duration, tags and publish date, via the official YouTube Data API v3. No scraping, no blocks. $1.20 per 1,000 Shorts.",
    "version": "0.1",
    "x-build-id": "zji0vvuUYX09P35ed"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actor-forge~youtube-shorts-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actor-forge-youtube-shorts-api",
        "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/actor-forge~youtube-shorts-api/runs": {
      "post": {
        "operationId": "runs-sync-actor-forge-youtube-shorts-api",
        "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/actor-forge~youtube-shorts-api/run-sync": {
      "post": {
        "operationId": "run-sync-actor-forge-youtube-shorts-api",
        "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": {
          "apiKey": {
            "title": "YouTube API key (your own, free)",
            "type": "string",
            "description": "Required. Your own free YouTube Data API v3 key (starts with AIza). Get one in about a minute: console.cloud.google.com → create a project → APIs & Services → Library → enable \"YouTube Data API v3\" → Credentials → Create credentials → API key. No billing account is needed, and the free quota is 10,000 units per day. The key is stored encrypted by Apify, used only for this run's calls to googleapis.com, and never logged or written to the output."
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Always shorts on this listing (Shorts from channels and keywords).",
            "default": "shorts"
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channel URLs (youtube.com/@handle, /@handle/shorts, /channel/UC…, /user/name), @handles or channel IDs (UC…). Each channel's Shorts come from YouTube's own Shorts playlist, so the list is exact, newest first (about 2 quota units per 50 Shorts plus 1 per channel). If a channel has no Shorts playlist, its uploads are checked by duration instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "Max Shorts per channel",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Newest Shorts per channel. Every 50 Shorts cost about 2 of your quota units.",
            "default": 100
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional date (YYYY-MM-DD): only Shorts published on or after it. For channels, paging stops at older Shorts, saving quota; for keywords, YouTube filters the search.",
            "default": ""
          },
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional search terms. Each is searched with YouTube's \"short\" length filter (under 4 minutes), and only videos of 3 minutes or less that are not live are kept. Each page of up to 50 results costs 100 of your 10,000 daily quota units.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max search results per keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Search results read per keyword (YouTube returns at most about 500). Each 50 = one search page (100 quota units). Results longer than 3 minutes are dropped and not charged, so you can get fewer Shorts than this.",
            "default": 50
          },
          "order": {
            "title": "Sort search by",
            "enum": [
              "relevance",
              "date",
              "viewCount",
              "rating",
              "title"
            ],
            "type": "string",
            "description": "Sort order for keyword search.",
            "default": "relevance"
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Optional date (YYYY-MM-DD) for keyword search.",
            "default": ""
          },
          "regionCode": {
            "title": "Region code",
            "type": "string",
            "description": "Optional 2-letter country code (US, GB, DE …): keyword results available in that country.",
            "default": ""
          },
          "relevanceLanguage": {
            "title": "Relevance language",
            "type": "string",
            "description": "Optional ISO 639-1 language code (en, es, de …): keyword results most relevant to that language.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}