{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper — Videos by Keyword, Exact Stats",
    "description": "YouTube search results for any keyword, in ranked order: videos and Shorts with unrounded views, likes, publish date and the channel's subscribers — plus chapters and YouTube's AI summary where a result has them. YouTube's own filters, deep paging, only-new mode. No login, no API key.",
    "version": "0.1",
    "x-build-id": "Tg7Dy4k5ZltFhghvi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~youtube-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-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/foxlabs~youtube-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-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/foxlabs~youtube-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-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": [
          "searchKeywords"
        ],
        "properties": {
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "One search per line, the way you would type it into YouTube: \"drone review\", \"budget mechanical keyboards\", a brand or product name. Each keyword is searched on its own.",
            "items": {
              "type": "string"
            }
          },
          "resultTypes": {
            "title": "Kinds of result",
            "type": "array",
            "description": "Videos, Shorts, or both. Each kind is searched separately, up to the per-keyword maximum. YouTube answers a Shorts search in several shapes: some results carry the channel, the unrounded views and the length, others only a title and a rounded view count — for those the channel comes from two small extra requests.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts"
              ],
              "enumTitles": [
                "Videos",
                "Shorts"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "maxVideosPerKeyword": {
            "title": "Maximum results per keyword and kind",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many results to deliver for each keyword. A keyword followed to the end of YouTube's results, and again while that brought new videos, gave 515 to 664 different videos (four keywords, seven measurements).",
            "default": 50
          },
          "maxVideos": {
            "title": "Maximum results in total",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops when this many rows have been delivered. You are charged only for delivered rows.",
            "default": 1000
          },
          "sort": {
            "title": "Order",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "YouTube's own orders. Relevance is what the search page shows; Popularity brings the most viewed first (YouTube's ordering, not a strict sort by view count). YouTube no longer offers an order by upload date: use \"Uploaded within\" for recent videos.",
            "default": "relevance"
          },
          "uploadedWithin": {
            "title": "Uploaded within",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload-date filter. With a short period YouTube has few matching videos; what it adds from older periods is left out. Shorts searches under a filter are erratic on YouTube's side: the same search can return 25 Shorts once and none the next time (an empty answer is asked for three times before the run says so).",
            "default": "any"
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "YouTube's duration filter (videos only).",
            "default": "any"
          },
          "features": {
            "title": "Features (optional)",
            "type": "array",
            "description": "YouTube's feature filters; YouTube applies all the ones you pick.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creative-commons",
                "360",
                "vr180",
                "3d",
                "hdr",
                "location"
              ],
              "enumTitles": [
                "Live",
                "4K",
                "HD",
                "Subtitles / CC",
                "Creative Commons",
                "360°",
                "VR180",
                "3D",
                "HDR",
                "Location"
              ]
            }
          },
          "exactSpelling": {
            "title": "Search exactly as typed",
            "type": "boolean",
            "description": "YouTube corrects what it takes for a typo (\"mechancial keybaord\" → \"mechanical keyboard\") and shows results for its own spelling; the run's status message says when it did. Turn this on to search your keywords as they are — for brand and product names YouTube does not know.",
            "default": false
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code the search is made for (US, GB, DE, TR, …). For some searches the country changes the results a lot (\"football highlights\"), for others hardly at all (\"drone review\").",
            "default": "US"
          },
          "details": {
            "title": "What to read for each video",
            "enum": [
              "figures",
              "full",
              "list"
            ],
            "type": "string",
            "description": "A search result already carries the title, the channel, the unrounded view count and the duration — and, where YouTube shows them, chapters, its AI summary, collaborators and tagged products. \"Exact figures\" adds the publish date and the like count. \"Everything\" reads each video's own page as well; YouTube limits how many pages one address may read (it refused addresses after a few hundred to a thousand pages, and some from the first), after which the Actor moves to other addresses and, if none is left, delivers the remaining videos with exact figures only. Shorts with \"Search results only\" come as YouTube's answer has them: many with only a title and a rounded view count, without a channel.",
            "default": "figures"
          },
          "channelStats": {
            "title": "Add the channel's figures",
            "type": "boolean",
            "description": "Subscribers, country, lifetime views and number of videos of each result's channel (one request per channel, however many of its videos the run finds), and views per subscriber for the video.",
            "default": true
          },
          "minViews": {
            "title": "Minimum views (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at least this many views. Leave empty (or 0) for no minimum."
          },
          "minViewsPerSubscriber": {
            "title": "Minimum views per subscriber (optional)",
            "type": "string",
            "description": "Only videos whose views are at least this many times the channel's subscribers: 1 keeps videos that out-grew their channel, 5 the breakouts from small channels. Decimals allowed (0.5). Needs the channel's subscriber count: leave \"Add the channel's figures\" on, or read each video's page (\"Everything\"); otherwise the input is refused."
          },
          "onlyNewVideos": {
            "title": "Only videos not delivered before",
            "type": "boolean",
            "description": "Remember delivered videos under the list name below and skip them in later runs. Schedule the same keywords daily and each run brings only videos that are new in the results. With this on, \"Maximum results per keyword\" is how far down the results the Actor looks; it does not go deeper to fill the number.",
            "default": false
          },
          "listName": {
            "title": "List name",
            "type": "string",
            "description": "Name of the memory used by \"Only videos not delivered before\". Use a different name for each project. Letters, digits and hyphens (a hyphen not first or last), up to 40 characters; capitals are read as lower case.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Nothing to change for normal use: requests go out directly, and a kind of request YouTube refuses (or keeps leaving unanswered) is moved to Apify Proxy by the Actor itself. Turn a proxy on here only if you want every request to use it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}