{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper — Channels, Videos & Creator Leads",
    "description": "Scrape YouTube: search channels & videos by keyword, full channel profiles, video details, plus creator-contact leads (emails, phones, socials from the channel's own website). Subscribers, views, links, monitoring. No login, no API key, no browser.",
    "version": "0.1",
    "x-build-id": "wlnudqUmbbknxOtAA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-youtube-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/scrapesage~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-youtube-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/scrapesage~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-youtube-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "searchChannels",
              "channelDetails",
              "searchVideos",
              "videoDetails"
            ],
            "type": "string",
            "description": "Pick a job. Search channels finds channels by keyword (with full profiles + leads). Channel details pulls full profiles for specific channels. Search videos finds videos by keyword. Video details pulls full metadata for specific videos.",
            "default": "searchChannels"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search YouTube for, e.g. `real estate coach`, `b2b marketing`, `home fitness`. One row per term. Used by the Search channels and Search videos modes.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel handles / URLs / IDs",
            "type": "array",
            "description": "Channels to pull full details for: @handles (`@MrBeast`), channel URLs (`youtube.com/@MrBeast`, `/channel/UC...`, `/c/...`, `/user/...`), or raw channel IDs (`UCX6OQ3DkcsbYNE6H8uQQuVA`). One per row. (Mode: Channel details.)",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs / IDs",
            "type": "array",
            "description": "Videos to pull full metadata for: watch URLs (`youtube.com/watch?v=...`), short URLs (`youtu.be/...`), Shorts URLs, or raw 11-character video IDs. One per row. (Mode: Video details.)",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max results per search term",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Cap the number of channels (or videos) returned per search term. Results are paginated automatically until this limit or the result set is exhausted.",
            "default": 30
          },
          "videoSort": {
            "title": "Sort videos by",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "Order for the Search videos mode.",
            "default": "relevance"
          },
          "includeVideos": {
            "title": "Include channel videos",
            "type": "boolean",
            "description": "For channel modes, also output recent video records (type `video`) from each channel — title, views, published time, duration and more. Also derives an activity signal (last upload, active/dormant). In monitoring mode this returns only NEW videos since the last run.",
            "default": false
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many recent videos to pull per channel when 'Include channel videos' is on.",
            "default": 10
          },
          "includeVideoStats": {
            "title": "Include full video stats (likes, comments)",
            "type": "boolean",
            "description": "For video modes, fetch each video's full metadata including like and comment counts, tags and exact publish date (one extra request per video). Search videos returns lightweight cards unless this is on.",
            "default": false
          },
          "enrichCreatorContacts": {
            "title": "Enrich creator contacts (crawl website for emails, phone, socials)",
            "type": "boolean",
            "description": "Opt-in lead enrichment: visit each channel's own public website (home + a contact/about page) and extract contact emails, phone numbers and social links — for influencer outreach, sponsorship and B2B prospecting. Only runs for channels that list a website.",
            "default": false
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter region code (e.g. `US`, `GB`, `DE`, `AU`) for search results and rankings.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter UI language code (e.g. `en`, `de`, `es`) for titles and labels.",
            "default": "en"
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember what was already returned and emit ONLY records not seen in previous runs (new channels for a search, new videos per channel, or new videos for a search). Pairs with Apify Schedules to track changes over time.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked target/query to keep their histories separate.",
            "default": "youtube-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum parallel requests. Lower it if you hit rate limits on very large runs.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. YouTube's public web endpoints work fine through the default Apify datacenter proxy; switch to residential for very large or high-frequency runs to avoid rate limits.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}