{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Channel Scraper",
    "description": "Discover channels by niche keywords, category, and region. Get contact information (emails, social media), engagement metrics, and partnership potential scores. Perfect for brands seeking influencer collaborations.",
    "version": "0.0",
    "x-build-id": "jzj4JuIWaCnMadMeJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/afanasenko~youtube-channel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-afanasenko-youtube-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/afanasenko~youtube-channel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-afanasenko-youtube-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/afanasenko~youtube-channel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-afanasenko-youtube-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": {
          "mode": {
            "title": "Goal",
            "enum": [
              "channel",
              "search",
              "playlist"
            ],
            "type": "string",
            "description": "Choose the main task: discover channels, search videos, or scan a playlist.",
            "default": "channel"
          },
          "searchQuery": {
            "title": "Search phrase",
            "type": "string",
            "description": "Keywords for video search (e.g., \"ai news 2025\", \"cooking recipes\"). Required in Search mode if `videoLinks` is empty."
          },
          "maxResults": {
            "title": "How many results?",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total items to return (videos/channels/playlist items). Start with 50.",
            "default": 50
          },
          "orderBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "date",
              "viewCount",
              "rating"
            ],
            "type": "string",
            "description": "Sort videos by relevance, newest, views, or rating.",
            "default": "relevance"
          },
          "includeStatistics": {
            "title": "Include per-video stats",
            "type": "boolean",
            "description": "Fetch views/likes/comments for each video (adds cost, ~1 call per video).",
            "default": false
          },
          "playlistId": {
            "title": "Playlist ID",
            "type": "string",
            "description": "Playlist ID from the URL. Required in Playlist mode if `playlistChannelHandle` is empty."
          },
          "playlistChannelHandle": {
            "title": "Channel handle (for uploads)",
            "type": "string",
            "description": "Channel handle to analyze all uploads (e.g., \"fireship\"). Required in Playlist mode if `playlistId` is empty."
          },
          "playlistDateRange": {
            "title": "Time period",
            "type": "object",
            "description": "Filter playlist videos by publish date (optional).",
            "properties": {
              "startDate": {
                "title": "From",
                "type": "string",
                "description": "Earliest publish date (YYYY-MM-DD).",
                "editor": "datepicker"
              },
              "endDate": {
                "title": "To",
                "type": "string",
                "description": "Latest publish date (YYYY-MM-DD).",
                "editor": "datepicker"
              }
            }
          },
          "includeCommentReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "Fetch replies to top comments (adds ~0.5 call per video).",
            "default": false
          },
          "videoLinks": {
            "title": "Ready-made video links",
            "type": "array",
            "description": "Paste full YouTube URLs (one per line) to analyze specific videos.",
            "items": {
              "type": "string"
            }
          },
          "channelHandles": {
            "title": "Channel handles",
            "type": "array",
            "description": "Handles or URLs (one per line), e.g., \"fireship\" or \"youtube.com/@vibecoding\". In Channel mode, provide handles/IDs here OR a niche query below.",
            "items": {
              "type": "string"
            }
          },
          "channelSearchQuery": {
            "title": "Niche keywords",
            "type": "string",
            "description": "Your niche or audience (e.g., \"SaaS startup founders\", \"fitness coach\", \"beauty makeup tutorial\"). Channel mode: required if no handles/IDs are provided.",
            "default": "programming tutorial"
          },
          "videoCategoryId": {
            "title": "YouTube category",
            "enum": [
              "0",
              "1",
              "2",
              "10",
              "15",
              "17",
              "19",
              "20",
              "22",
              "23",
              "24",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "31",
              "32",
              "33",
              "34",
              "35",
              "36",
              "37",
              "38",
              "39",
              "40",
              "41",
              "42",
              "43",
              "44"
            ],
            "type": "string",
            "description": "Optional category filter (works with video/hybrid discovery). Choose a YouTube category ID.",
            "default": "0"
          },
          "regionCode": {
            "title": "Region",
            "enum": [
              "",
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "ES",
              "IT",
              "BR",
              "IN",
              "JP",
              "KR",
              "MX",
              "NL",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "RU",
              "CN",
              "TW",
              "HK",
              "SG",
              "AE",
              "SA",
              "ZA",
              "AR",
              "CL",
              "CO",
              "PE",
              "NZ",
              "IE",
              "PT",
              "GR",
              "BE",
              "CH",
              "AT",
              "CZ"
            ],
            "type": "string",
            "description": "Target region (leave blank for global). Use codes like US, GB, CA, AU, DE.",
            "default": ""
          },
          "channelSearchStrategy": {
            "title": "Discovery strategy",
            "enum": [
              "channel",
              "video",
              "hybrid"
            ],
            "type": "string",
            "description": "Search by channel names, by video authors, or both (hybrid recommended).",
            "default": "hybrid"
          },
          "channelTags": {
            "title": "Must-have keywords",
            "type": "array",
            "description": "Keywords that must appear in the channel description (one per line). Leave empty to avoid filtering out results.",
            "items": {
              "type": "string"
            }
          },
          "includeContactData": {
            "title": "Get contact information",
            "type": "boolean",
            "description": "Fetch emails/social links for partnerships (~1 call per channel).",
            "default": true
          },
          "maxChannelsToAnalyze": {
            "title": "Max channels to analyze",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of channels to fully analyze. Start with 10–20 for speed/cost.",
            "default": 10
          },
          "maxVideos": {
            "title": "Videos per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Latest videos to analyze per channel (1–500). 15–30 gives solid averages.",
            "default": 15
          },
          "minSubscribers": {
            "title": "Min subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum subscriber count. Leave 0 to ignore. Example: 2000 (micro).",
            "default": 0
          },
          "maxSubscribers": {
            "title": "Max subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum subscriber count. Leave 0 to ignore. Example: 150000 (micro).",
            "default": 0
          },
          "minAverageViews": {
            "title": "Min average views",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum average views per video. Leave 0 to ignore. Example: 2000.",
            "default": 0
          },
          "minAverageLikes": {
            "title": "Min average likes",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum average likes per video. Leave 0 to ignore. Example: 50.",
            "default": 0
          },
          "minAverageComments": {
            "title": "Min average comments",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum average comments per video. Leave 0 to ignore. Example: 10.",
            "default": 0
          },
          "minAverageEngagementRate": {
            "title": "Min engagement rate (%)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum engagement rate percentage. Leave 0 to ignore. Example: 3.",
            "default": 0
          },
          "dateRange": {
            "title": "Publish window",
            "type": "object",
            "description": "Analyze only videos within this date range (optional).",
            "properties": {
              "startDate": {
                "title": "From",
                "type": "string",
                "description": "Earliest publish date (YYYY-MM-DD).",
                "editor": "datepicker"
              },
              "endDate": {
                "title": "To",
                "type": "string",
                "description": "Latest publish date (YYYY-MM-DD).",
                "editor": "datepicker"
              }
            }
          },
          "budget": {
            "title": "Spending limit (USD)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum spend in USD. Actor stops at this budget. Pricing: ~$0.02 per API call (~$0.50/channel analyzed). Start with $2–$5 for tests.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}