{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper | $0.25 per 1k | Up to 900 per Query",
    "description": "Scrape YouTube search results: videos, Shorts, channels and playlists for any keyword. Deep search returns up to ~900 unique videos per query. Views, duration, thumbnails, optional likes, comments, tags. All YouTube filters. No API key. Never a silent empty run.",
    "version": "0.1",
    "x-build-id": "dknGsJ4e2QDyo3NO2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidrows~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidrows-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/solidrows~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidrows-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/solidrows~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidrows-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",
        "required": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search on YouTube, one per line - exactly as you would type them in YouTube's search bar. Search operators work too (e.g. \"exact phrase\", intitle:word, -exclude). You can also paste a hashtag page URL (https://www.youtube.com/hashtag/sourdough) to get the videos from that hashtag page. Every query gets its own rows: a video that ranks for two queries is saved once per query, each row with its own <code>query</code> and <code>position</code>.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many results for each query. <b>How many results you can get depends on Search depth:</b> Standard = one results page, 10-45 results per query (usually about 20) · Deep ≈ 250 · Deeper ≈ 550 · Maximum ≈ 900 unique videos per query. The default of 50 takes the whole page at Standard depth - for a deep search raise this number too (e.g. 300, 600, 1000). The scraper only opens as many pages as it needs to reach this number.",
            "default": 50
          },
          "searchDepth": {
            "title": "Search depth (more results per query)",
            "enum": [
              "standard",
              "deep",
              "deeper",
              "max"
            ],
            "type": "string",
            "description": "YouTube shows a logged-out visitor one page of results per search (10-45 results). Deep search repeats your query with the combinations of YouTube's own filters (upload date × duration × type × sort × features), merges the pages and removes duplicates. Filters you set yourself below are kept in every request; with Prioritize = Popularity every page is sorted by popularity. If the first page is empty, no further pages are opened. <b>Remember to raise Max results per query</b> - it caps the result regardless of depth. You pay only per saved video, not per page. Numbers are averages measured on popular queries; narrow queries return fewer.",
            "default": "standard"
          },
          "dedupeAcrossQueries": {
            "title": "Remove duplicates across queries",
            "type": "boolean",
            "description": "Off (default): each query is independent - a video that ranks for several of your queries is saved (and charged) once per query, each row with its own <code>query</code> and <code>position</code>. That is what rank tracking and per-keyword analysis need. On: a video is saved only once per run, under the first query that found it - cheaper when you just want a list of unique videos.",
            "default": false
          },
          "includeVideoDetails": {
            "title": "Open every video page for full details",
            "type": "boolean",
            "description": "Adds exact view count, exact like count, comment count, publish date, full description, hashtags, chapters and channel subscribers to every video - and, when YouTube serves it, tags, category, exact publish time and caption languages. One extra request per video, so runs are slower. Charged as a separate event per video with details.",
            "default": false
          },
          "sortBy": {
            "title": "Prioritize",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Order of results, as in YouTube's filter panel.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded within this period (YouTube's own filter). YouTube sometimes mixes in older videos; those that are clearly outside the period are removed. For a custom range use Published after / Published before.",
            "default": "any"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only videos published on or after this date. Use a date (<code>2026-10-01</code>) or a period back from now (<code>7 days</code>, <code>2 weeks</code>, <code>6 months</code>, <code>1 year</code>). <b>Precision:</b> search pages show only relative time (\"3 weeks ago\"), so the filter works on the approximate date computed from it - accurate to the day for videos up to a week old, to about a week for videos up to a month old, to about a month for videos up to a year old, and only to the year beyond that. Results with no date on the search page (Shorts from the Shorts shelf, live streams) are skipped. Turn on <b>Open every video page for full details</b> to filter by the exact publish date instead."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep only videos published on or before this date: a date (<code>2026-10-31</code>) or a period back from now (<code>30 days</code> = at least 30 days old). Same precision as <b>Published after</b>. Combine both for a date range."
          },
          "type": {
            "title": "Type",
            "enum": [
              "all",
              "videos",
              "shorts",
              "channels",
              "playlists"
            ],
            "type": "string",
            "description": "Restrict results to regular videos or Shorts - or search for channels or playlists instead of videos (about 20 per page; with deep search also sorted by popularity).",
            "default": "all"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "under3",
              "3to20",
              "over20"
            ],
            "type": "string",
            "description": "Video length filter: any, under3 (shorter than 3 minutes), 3to20 (3 to 20 minutes) or over20 (longer than 20 minutes).",
            "default": "any"
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "Only videos with all of the selected features.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "hdr",
                "subtitles",
                "creativeCommons",
                "360",
                "vr180",
                "3d"
              ],
              "enumTitles": [
                "Live now",
                "4K",
                "HD",
                "HDR",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D"
              ]
            },
            "default": []
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code (e.g. US, GB, DE, BR, IN). YouTube ranks results differently per country. Used for search pages and for video detail pages.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter) is used by default and is enough for YouTube search.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}