{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper (search, channels, Shorts, playlists, stats)",
    "description": "Need YouTube search, channel uploads, Shorts, live streams or playlists as JSON, with no Data API quota? ScrapeMole returns title, views, date, duration, channel and subscribers, plus optional likes, comments, description and tags. Pay per video. ScrapeMole is the maker.",
    "version": "0.1",
    "x-build-id": "EqhqbxsBPcTFGTYDx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemole~youtube-video-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemole-youtube-video-channel-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/scrapemole~youtube-video-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapemole-youtube-video-channel-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/scrapemole~youtube-video-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemole-youtube-video-channel-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Get YouTube search results as JSON (title, URL, views, duration, channel), in result order, with no Data API key or quota. Use the filters below for sort, upload date and length.",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Get uploads from these channels as JSON. Accepts @handles, channel URLs or channel IDs. Choose which tabs in Channel content. Each row includes subscriber count.",
            "items": {
              "type": "string"
            }
          },
          "channelContent": {
            "title": "Channel content",
            "type": "array",
            "description": "Which channel tabs to scrape: videos, Shorts and/or live streams. The result limit applies to each tab separately.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "playlists": {
            "title": "Playlists",
            "type": "array",
            "description": "Playlist URLs (youtube.com/playlist?list=PL...) or playlist IDs. Returns videos in playlist order with the playlist title and size.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Individual videos",
            "type": "array",
            "description": "Get full details for these specific videos or Shorts: views, likes, comment count, publish date, category, description and tags. Accepts watch, youtu.be, Shorts, embed or live URLs or IDs.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Any YouTube URLs",
            "type": "array",
            "description": "Mixed list of channel, playlist and video links. Each is detected automatically. Handy when pasting from a spreadsheet.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResultsPerSource": {
            "title": "Max videos per search, playlist or channel tab",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many videos for each search keyword, playlist and channel tab. Searches usually stop around 500-600 results because YouTube stops returning more.",
            "default": 50
          },
          "scrapeVideoDetails": {
            "title": "Full video details",
            "type": "boolean",
            "description": "Also open each video to add likes, comments count, exact publish date, category, full description and tags. Charged as a 'video with details' instead of a 'video'.",
            "default": false
          },
          "newerThanDays": {
            "title": "Only videos newer than (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Skip videos published more than this many days ago. For channels, scraping stops at the first older video (tabs are newest first), so it is also a cheap way to monitor channels."
          },
          "sortBy": {
            "title": "Search: sort by",
            "enum": [
              "relevance",
              "uploadDate",
              "viewCount",
              "rating"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Search: upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only search results uploaded in this period. Results are also checked against the shown upload time, so older videos never slip in.",
            "default": "any"
          },
          "duration": {
            "title": "Search: video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Short = under 4 minutes, medium = 4-20 minutes, long = over 20 minutes.",
            "default": "any"
          },
          "searchType": {
            "title": "Search: result type",
            "enum": [
              "video",
              "shorts"
            ],
            "type": "string",
            "description": "Regular videos, or YouTube Shorts only (uses YouTube's own Shorts search filter).",
            "default": "video"
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language code for YouTube texts such as '3 days ago' (e.g. en, de, es). Keep 'en' if you use the parsed numbers and dates.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code. Affects search ranking and which videos are available.",
            "default": "US"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many sources or videos to scrape at once.",
            "default": 4
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Retries for rate limits, timeouts and server errors, each with a fresh proxy IP.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) works well. If YouTube rate-limits, the Actor switches to residential IPs automatically.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}