{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Search Scraper API - Videos, Views, $0.50/1K",
    "description": "YouTube search scraper API: up to 1,000 videos per keyword with exact views, duration, channel and date, plus Shorts and live streams. Filters: upload date, length, HD, 4K, subtitles. Optional likes, comments and subscribers. No API key. $0.50 per 1,000 videos.",
    "version": "0.1",
    "x-build-id": "pcWE268Ri9VgeZZmX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/om_kh~vigia-youtube-search-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-om_kh-vigia-youtube-search-monitor",
        "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/om_kh~vigia-youtube-search-monitor/runs": {
      "post": {
        "operationId": "runs-sync-om_kh-vigia-youtube-search-monitor",
        "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/om_kh~vigia-youtube-search-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-om_kh-vigia-youtube-search-monitor",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search on YouTube, one search per line.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube search links (optional)",
            "type": "array",
            "description": "Paste youtube.com/results links: the words and the filters of each link are used as they are.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max videos per search",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Videos per search term, in YouTube's order. YouTube itself stops after a few hundred results for one search. 0 = no regular videos (Shorts or live streams only).",
            "default": 50
          },
          "maxShorts": {
            "title": "Max Shorts per search",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Also return Shorts for the same words (YouTube's own Shorts filter).",
            "default": 0
          },
          "maxLiveStreams": {
            "title": "Max live streams per search",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Also return streams that are live now for the same words.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "views",
              "newest"
            ],
            "type": "string",
            "description": "YouTube no longer offers 'upload date' and 'rating' orders. 'Newest first' reorders the results this run read; combine it with Upload date.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded in the last hour, today, this week, this month or this year (YouTube's own filter). Empty = any time.",
            "default": ""
          },
          "videoDuration": {
            "title": "Video length",
            "enum": [
              "",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Only short (under 4 min), medium (4-20 min) or long (over 20 min) videos. Empty = any length.",
            "default": ""
          },
          "videoType": {
            "title": "Type",
            "enum": [
              "video",
              "movie"
            ],
            "type": "string",
            "description": "YouTube's type filter.",
            "default": "video"
          },
          "features": {
            "title": "Features (optional)",
            "type": "array",
            "description": "Keep only videos with every feature picked (YouTube's own filters).",
            "items": {
              "type": "string",
              "enum": [
                "hd",
                "4k",
                "hdr",
                "subtitles",
                "creative_commons",
                "live",
                "360",
                "vr180",
                "3d",
                "location",
                "purchased"
              ],
              "enumTitles": [
                "HD",
                "4K",
                "HDR",
                "Subtitles / CC",
                "Creative Commons",
                "Live",
                "360°",
                "VR180",
                "3D",
                "Location",
                "Purchased"
              ]
            }
          },
          "publishedAfter": {
            "title": "Published on or after (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Search results carry dates like '3 weeks ago', so the cut is approximate unless 'Video details' is on."
          },
          "includeVideoDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "Open each video for its likes, comment count, exact publication date and the channel's subscribers and handle. Same price; slower (about 1 second per 8 videos).",
            "default": false
          },
          "currentItems": {
            "title": "Bring your own items (optional)",
            "type": "array",
            "description": "Optional: pass records you already have instead of fetching them from YouTube.",
            "default": []
          },
          "maxTotalChargeUsd": {
            "title": "Maximum Vigia charge (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Hard maximum amount that this run may charge."
          },
          "sources": {
            "title": "Declared upstream sources and estimated costs",
            "type": "array",
            "description": "Declare every upstream source before this run. Each item needs name, authorization, and estimated_cost_usd.",
            "default": [
              {
                "name": "YouTube public endpoints (first-party)",
                "authorization": "public_structured_data",
                "estimated_cost_usd": 0
              }
            ]
          },
          "monitorEnabled": {
            "title": "Monitor only new results",
            "type": "boolean",
            "description": "The first monitored run stores a free baseline. Later runs deliver and charge only new results.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor ID (optional)",
            "type": "string",
            "description": "Pins the persistent baseline to a name of your choice, so separate targets never share state. Leave empty to derive it automatically.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}