{
  "openapi": "3.0.1",
  "info": {
    "title": "Cheapest YouTube Search: Small Batches | $0.25/1K Searches",
    "description": "Search YouTube by keyword. Get videos, channels, playlists and shorts with titles, views, dates and links. Many results per page. $0.25 per 1k requests, run usage included.",
    "version": "0.1",
    "x-build-id": "FShOBhi5enwjLIb9p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/litescrape~youtube-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-litescrape-youtube-search",
        "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/litescrape~youtube-search/runs": {
      "post": {
        "operationId": "runs-sync-litescrape-youtube-search",
        "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/litescrape~youtube-search/run-sync": {
      "post": {
        "operationId": "run-sync-litescrape-youtube-search",
        "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": {
          "q": {
            "title": "Q",
            "minLength": 1,
            "maxLength": 2048,
            "type": "string",
            "description": "Search query. Required for the first page; omit with page_token.\n\nRequired on the first page."
          },
          "type": {
            "title": "Type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "Result type. Omit for mixed results. Movies appear in video_results.\n\nChannels and playlists cannot use upload_date, duration or features. Shorts cannot use duration. Movies cannot use live, subtitles, creative_commons or 3d features."
          },
          "duration": {
            "title": "Duration",
            "enum": [
              "under_3_min",
              "between_3_and_20_min",
              "over_20_min"
            ],
            "type": "string",
            "description": "Video duration: under 3 minutes, 3–20 minutes, or over 20 minutes."
          },
          "features": {
            "title": "Features",
            "minLength": 1,
            "maxLength": 160,
            "type": "string",
            "description": "Comma-separated features: live, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr, location. Combined features must all match."
          },
          "gl": {
            "title": "Gl",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code. Defaults to US. Omit with page_token."
          },
          "hl": {
            "title": "Hl",
            "pattern": "^[a-zA-Z]{2,3}(?:-[a-zA-Z0-9]{2,8}){0,2}$",
            "type": "string",
            "description": "YouTube interface language, such as en or pt-BR. Defaults to en. Omit with page_token."
          },
          "page_token": {
            "title": "Page token",
            "pattern": "^ct2_[A-Za-z0-9_-]{100,}$",
            "minLength": 1,
            "maxLength": 32768,
            "type": "string",
            "description": "Opaque next_page_token from the preceding response. Send it alone to continue the same search; tokens expire after one hour.\n\nSend page_token alone, without query, locale or filter parameters. It preserves all filters. Use POST for long tokens. Pagination ends when pagination.next_page_token is absent."
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "YouTube ranking: relevance (default) or popularity. Popularity is not a strict numerical view-count sort.\n\nUses YouTube's current ranking choices. The removed upload-date/rating sorts and last-hour upload filter are not supported named values."
          },
          "sp": {
            "title": "Sp",
            "pattern": "^[a-zA-Z0-9_+/=%-]+$",
            "minLength": 1,
            "maxLength": 2048,
            "type": "string",
            "description": "Advanced YouTube filter token from a results URL. Use either sp or named filters, never both. Omit with page_token.\n\nUse either sp or named filters, never both. Raw or once-URL-encoded values from a YouTube results URL are accepted."
          },
          "timeout": {
            "title": "Timeout",
            "maximum": 90,
            "type": "number",
            "description": "Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget."
          },
          "upload_date": {
            "title": "Upload date",
            "enum": [
              "today",
              "this_week",
              "this_month",
              "this_year"
            ],
            "type": "string",
            "description": "Limit results by upload date."
          },
          "requests": {
            "title": "Batch requests",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Optional list of parameter objects. Top-level API fields are shared defaults; each object overrides them. Maximum 1,000 inputs.",
            "items": {
              "type": "object"
            }
          },
          "maxRequests": {
            "title": "Maximum paid requests",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Run-wide cap on successful API requests, including continuation pages. 1,000 requests cost $0.25.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum dataset rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap exported rows. An in-flight response can still be saved and billed in full. Complete JSON responses remain in storage.",
            "default": 1000
          },
          "maxPagesPerInput": {
            "title": "Maximum pages per input",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "1 returns the first page only. Additional pages follow source continuation links when available; every successful page is a paid request.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Upper concurrency bound. The service may apply a lower limit for capacity or trial quotas.",
            "default": 2
          },
          "includeArtifacts": {
            "title": "Include source artifacts",
            "type": "boolean",
            "description": "Copy available raw source artifacts to this run. Availability varies by endpoint; unavailable artifacts do not invalidate a saved JSON response.",
            "default": false
          },
          "datasetOutput": {
            "title": "Export dataset",
            "type": "boolean",
            "description": "Enable dataset rows and recoverable per-request storage. Leave off for the cheapest JSON output. Pagination and artifacts also enable this workflow.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}