Youtube Expert

Youtube Expert · Actions GPT

YouTube Search API

API to interact with YouTube for searching videos.

  • GET /searchSearch YouTube videos
Schéma original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "YouTube Search API",
    "version": "1.0.0",
    "description": "API to interact with YouTube for searching videos."
  },
  "servers": [
    {
      "url": "https://www.googleapis.com/youtube/v3"
    }
  ],
  "paths": {
    "/search": {
      "get": {
        "summary": "Search YouTube videos",
        "operationId": "searchYouTube",
        "tags": [
          "YouTube Search"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "part",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include."
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The q parameter specifies the query term to search for."
          },
          {
            "in": "query",
            "name": "key",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Your API key."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchResponse": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "etag": {
            "type": "string"
          },
          "nextPageToken": {
            "type": "string"
          },
          "regionCode": {
            "type": "string"
          },
          "pageInfo": {
            "type": "object",
            "properties": {
              "totalResults": {
                "type": "integer"
              },
              "resultsPerPage": {
                "type": "integer"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoItem"
            }
          }
        }
      },
      "VideoItem": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "etag": {
            "type": "string"
          },
          "id": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "videoId": {
                "type": "string"
              }
            }
          },
          "snippet": {
            "type": "object",
            "properties": {
              "publishedAt": {
                "type": "string"
              },
              "channelId": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "thumbnails": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    }
                  }
                }
              },
              "channelTitle": {
                "type": "string"
              },
              "liveBroadcastContent": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}