{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Metadata Scraper | $0.80/1K",
    "description": "YouTube video metadata from channels, search, playlists or video URLs: title, exact publish time, duration, views, likes, comment count, description, tags and thumbnails. Only-new-videos mode for schedules. Free 10-video preview, then pay per result. No login.",
    "version": "0.1",
    "x-build-id": "K1GdOASNNForMl6AB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/architekture~youtube-metadata-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-architekture-youtube-metadata-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/architekture~youtube-metadata-scraper/runs": {
      "post": {
        "operationId": "runs-sync-architekture-youtube-metadata-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/architekture~youtube-metadata-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-architekture-youtube-metadata-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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "What to collect",
            "enum": [
              "channel-videos",
              "video-details",
              "search",
              "playlist"
            ],
            "type": "string",
            "description": "channel-videos: a channel's uploads, newest first. video-details: the videos you list. search: videos for search terms. playlist: a playlist's videos in order.",
            "default": "channel-videos"
          },
          "channels": {
            "title": "Channels (channel-videos)",
            "type": "array",
            "description": "@handle, channel URL or channel ID (UC...). Up to 100 per run.",
            "items": {
              "type": "string"
            }
          },
          "channelTabs": {
            "title": "Channel tabs (channel-videos)",
            "type": "array",
            "description": "Which channel tabs to read. Each tab counts as its own target for maxResults.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "videos": {
            "title": "Videos (video-details)",
            "type": "array",
            "description": "Video URLs (watch, youtu.be, shorts, live) or 11-character IDs. Up to 5,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms (search)",
            "type": "array",
            "description": "One YouTube search per line. Up to 100 per run.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search sort (search)",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "YouTube's own result order.",
            "default": "relevance"
          },
          "searchUploadDate": {
            "title": "Search upload date (search)",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload-date filter.",
            "default": "any"
          },
          "playlists": {
            "title": "Playlists (playlist)",
            "type": "array",
            "description": "Playlist URLs (with list=...) or playlist IDs. Up to 100 per run.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum videos per target",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Per channel tab, search term or playlist (video-details: across the list). Preview caps the run at 10.",
            "default": 50
          },
          "publishedAfter": {
            "title": "Published on or after",
            "type": "string",
            "description": "Only videos published on or after this date (UTC). Channel tabs stop reading once they pass it."
          },
          "publishedBefore": {
            "title": "Published on or before",
            "type": "string",
            "description": "Only videos published on or before this date (UTC)."
          },
          "preview": {
            "title": "Free preview (10 videos, never charged)",
            "type": "boolean",
            "description": "On: up to 10 videos, free, nothing is charged. The form starts on preview; API calls without this field run paid. See the listing pricing table for the current primary and optional event rates.",
            "default": false
          },
          "incrementalMode": {
            "title": "Only new videos since the last run",
            "type": "boolean",
            "description": "Needs a watchId. Videos delivered by earlier runs with the same watchId are skipped and not charged.",
            "default": false
          },
          "feedback": {
            "title": "Feedback",
            "maxLength": 2000,
            "type": "string",
            "description": "Optional note for the maintainers. Logged and read by a human; never changes output.",
            "default": ""
          },
          "watchId": {
            "title": "Watch identifier",
            "maxLength": 100,
            "type": "string",
            "description": "Any name for this collection (e.g. nasa-uploads). Remembers seen videos for incremental mode and lets a stopped run continue without re-charging.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}