{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Thumbnail Downloader — All Sizes + WebP",
    "description": "Every thumbnail size of a YouTube video in one row — default to maxresdefault, WebP variants, 1080p original-aspect frames for Shorts — with real availability flags, title and channel from YouTube's public oEmbed, and files saved to your key-value store. No API key, no browser, no proxy.",
    "version": "0.1",
    "x-build-id": "5pwvhTFriBbStNFw3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/acotr_moonie~youtube-thumbnail-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-acotr_moonie-youtube-thumbnail-downloader",
        "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/acotr_moonie~youtube-thumbnail-downloader/runs": {
      "post": {
        "operationId": "runs-sync-acotr_moonie-youtube-thumbnail-downloader",
        "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/acotr_moonie~youtube-thumbnail-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-acotr_moonie-youtube-thumbnail-downloader",
        "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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Video URLs or IDs",
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "description": "One per line. Accepted: watch?v=, youtu.be/, /shorts/, /embed/, /live/, /v/, m.youtube.com, music.youtube.com, youtube-nocookie.com, attribution_link, i.ytimg.com thumbnail URLs, or a bare 11-character video ID. Extra parameters (?t=, &list=, ?si=) are ignored. Playlist and channel URLs are not expanded; they produce a free error row. Repeated videos produce a free duplicate row.",
            "items": {
              "type": "string"
            }
          },
          "sizes": {
            "title": "Sizes to download",
            "type": "array",
            "description": "best = the largest size that exists for that video, found with a HEAD probe, never guessed. all = every size that exists. oar = the 1920x1080 (or 1080x1920 for Shorts) original-aspect auto frames oar1-oar3; these are auto-generated frames, not the creator's custom thumbnail. Availability of every size is reported on the row regardless of this setting.",
            "items": {
              "type": "string",
              "enum": [
                "best",
                "all",
                "maxresdefault",
                "sddefault",
                "hqdefault",
                "mqdefault",
                "default",
                "oar"
              ],
              "enumTitles": [
                "Best available",
                "All sizes",
                "maxresdefault 1280x720",
                "sddefault 640x480",
                "hqdefault 480x360",
                "mqdefault 320x180",
                "default 120x90",
                "Original-aspect frames oar1-3 (1080p)"
              ]
            },
            "default": [
              "best"
            ]
          },
          "format": {
            "title": "Image format",
            "enum": [
              "jpg",
              "webp",
              "both"
            ],
            "type": "string",
            "description": "jpg = /vi/ JPEG. webp = /vi_webp/ WebP, 30-55% smaller, same image. both = save both files. URLs for both formats are always on the row.",
            "default": "jpg"
          },
          "includeMetadata": {
            "title": "Title and channel (oEmbed)",
            "type": "boolean",
            "description": "Fetch title, channel name and channel URL from YouTube's public oEmbed endpoint (no key, one extra request per video). If it fails the fields are null and the row is still delivered.",
            "default": true
          },
          "saveImages": {
            "title": "Save files to key-value store",
            "type": "boolean",
            "description": "Store the selected sizes in this run's key-value store (your account only) under {videoId}_{size}.{jpg|webp}. Turn off to get URLs and metadata only — same price.",
            "default": true
          },
          "maxVideos": {
            "title": "Max videos (charged rows)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard stop after this many charged rows. Your main cost control. Videos not reached are never charged. 0 = no limit.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}