{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper — Videos, Shorts, Channels & Playlists",
    "description": "Scrape YouTube search results by keyword: videos, Shorts, channels and playlists. Export views, subscribers, dates and rankings to CSV, Excel or JSON. Filter by country, language, duration or views. Add likes, descriptions and tags, or monitor unseen matches. No YouTube API key.",
    "version": "1.0",
    "x-build-id": "6R8yfeJA2DscHHOgE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/valev-lab~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-valev-lab-youtube-search-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/valev-lab~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-valev-lab-youtube-search-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/valev-lab~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-valev-lab-youtube-search-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": "Add one keyword or phrase per entry. Empty keywords use the five-video sample health check.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "resultType": {
            "title": "Result type",
            "enum": [
              "videos",
              "shorts",
              "channels",
              "playlists",
              "all"
            ],
            "type": "string",
            "description": "All interleaves four typed searches; the result limit is shared.",
            "default": "videos"
          },
          "maxResultsPerQuery": {
            "title": "Maximum results per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Matching unseen results per query, across selected types. YouTube may expose fewer. No-input health check uses five.",
            "default": 50
          },
          "filters": {
            "title": "YouTube search filters",
            "type": "object",
            "description": "Optional search filters, for example {\"uploadDate\":\"week\",\"duration\":\"long\",\"sortBy\":\"views\",\"features\":[\"subtitles\"]}. Video filters do not constrain channel/playlist results in all mode.",
            "properties": {
              "uploadDate": {
                "type": "string",
                "enum": [
                  "hour",
                  "today",
                  "week",
                  "month",
                  "year"
                ],
                "title": "Upload window",
                "description": "hour, today, week, month or year. Hour also has a local cutoff because it is no longer listed in the current YouTube menu."
              },
              "duration": {
                "type": "string",
                "enum": [
                  "short",
                  "medium",
                  "long",
                  "<4m",
                  "4–20m",
                  "4-20m",
                  ">20m"
                ],
                "title": "Video duration",
                "description": "short = under 4 minutes; medium = 4–20 minutes; long = over 20 minutes. Exact 4-minute boundaries are enforced locally."
              },
              "sortBy": {
                "type": "string",
                "enum": [
                  "relevance",
                  "date",
                  "views",
                  "rating"
                ],
                "title": "Prioritize results",
                "description": "relevance or views (YouTube popularity). date sorts up to 500 local candidates; rating is legacy and order is not guaranteed."
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "title": "Required video features",
                "description": "Choose live, 4K, HD, subtitles, CC (closed captions) or creative commons. Multiple features are combined."
              }
            },
            "default": {
              "sortBy": "relevance",
              "features": []
            }
          },
          "minViews": {
            "title": "Minimum video views",
            "minimum": 0,
            "type": "integer",
            "description": "Local filter on videos/Shorts. Counts can be rounded without video details.",
            "default": 0
          },
          "minSubscribers": {
            "title": "Minimum channel subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Local filter on channel results. Missing public counts are excluded when this is positive.",
            "default": 0
          },
          "dateFrom": {
            "title": "Published on or after (UTC)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD local video filter. Relative dates are estimates; unsupported localized dates stay null."
          },
          "gl": {
            "title": "Country (gl)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter YouTube country hint; does not change the proxy location.",
            "default": "US"
          },
          "hl": {
            "title": "Language (hl)",
            "pattern": "^[a-z]{2,3}(-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "YouTube interface language. English and Bulgarian relative dates/count units are parsed; other unavailable dates use shared player metadata.",
            "default": "en"
          },
          "includeVideoDetails": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Add available likes, full description and tags to video/Short results. Adds the video-details fee only to successfully enriched results.",
            "default": false
          },
          "monitorMode": {
            "title": "Only unseen results",
            "type": "boolean",
            "description": "Remember successfully delivered result IDs per exact keyword in a named store. First run delivers the matching backlog.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "pattern": "^[A-Za-z0-9_-]{1,63}$",
            "type": "string",
            "description": "Reuse for scheduled runs. Use separate names for independent workflows and avoid overlapping runs.",
            "default": "youtube-search-scraper-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter first with residential fallback through the shared YouTube transport. Explicit direct, custom and residential settings are respected.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}