{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Search Api",
    "description": "Search YouTube videos, channels, and playlists using the YouTube Data API. Features comprehensive filtering options, automatic authentication, and detailed results including thumbnails and metadata. Perfect for content research, marketing analysis, and finding targeted videos.",
    "version": "0.2",
    "x-build-id": "dhQllRg7j9t5oqGIF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grow_media~youtube-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grow_media-youtube-search-api",
        "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/grow_media~youtube-search-api/runs": {
      "post": {
        "operationId": "runs-sync-grow_media-youtube-search-api",
        "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/grow_media~youtube-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-grow_media-youtube-search-api",
        "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": [
          "q",
          "maxResults"
        ],
        "properties": {
          "q": {
            "title": "Search Query",
            "type": "string",
            "description": "Enter keywords to search for on YouTube",
            "default": "surfing"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The maximum number of items to return (up to 1000)",
            "default": 100
          },
          "useFilters": {
            "title": "Add filters",
            "type": "boolean",
            "description": "Enable to use advanced filtering options",
            "default": false
          },
          "channelType": {
            "title": "Channel Type",
            "enum": [
              "any",
              "show"
            ],
            "type": "string",
            "description": "The type of channel to search for",
            "default": "any"
          },
          "eventType": {
            "title": "Event Type",
            "enum": [
              "completed",
              "live",
              "upcoming"
            ],
            "type": "string",
            "description": "The event type to search for"
          },
          "order": {
            "title": "Sort By",
            "enum": [
              "date",
              "rating",
              "relevance",
              "title",
              "videoCount",
              "viewCount"
            ],
            "type": "string",
            "description": "How to sort the search results",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published After",
            "type": "string",
            "description": "Only show content published after this date (RFC 3339 format, e.g. 2022-01-01T00:00:00Z)"
          },
          "publishedBefore": {
            "title": "Published Before",
            "type": "string",
            "description": "Only show content published before this date (RFC 3339 format, e.g. 2022-12-31T23:59:59Z)"
          },
          "regionCode": {
            "title": "Region Code",
            "type": "string",
            "description": "The region code for search results (ISO 3166-1 alpha-2 country code, e.g. US)"
          },
          "relevanceLanguage": {
            "title": "Relevance Language",
            "type": "string",
            "description": "The language to search in (ISO 639-1 two-letter language code, e.g. en)"
          },
          "safeSearch": {
            "title": "Safe Search",
            "enum": [
              "moderate",
              "none",
              "strict"
            ],
            "type": "string",
            "description": "Whether to include restricted content",
            "default": "moderate"
          },
          "videoDefinition": {
            "title": "Video Definition",
            "enum": [
              "any",
              "high",
              "standard"
            ],
            "type": "string",
            "description": "Whether to search for HD or standard videos",
            "default": "any"
          },
          "videoDuration": {
            "title": "Video Duration",
            "enum": [
              "any",
              "long",
              "medium",
              "short"
            ],
            "type": "string",
            "description": "The duration of videos to search for",
            "default": "any"
          },
          "videoLicense": {
            "title": "Video License",
            "enum": [
              "any",
              "creativeCommon",
              "youtube"
            ],
            "type": "string",
            "description": "The license of videos to search for",
            "default": "any"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}