> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get related videos

> Get recommended related content for a YouTube video (recommended video list).
Similar to the related videos shown on the right side of the video playback page.
Returns all recommended videos at once (typically 20-30 videos).

Notes:
Each video's recommendations are generated by the YouTube algorithm and may vary
The recommended list typically contains 20-30 videos
This endpoint does not support pagination; all recommended videos are returned at once

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">3 credits</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/youtube/get_related_videos.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/youtube/get_related_videos

Description: Get recommended related content for a YouTube video (recommended video list).
Similar to the related videos shown on the right side of the video playback page.
Returns all recommended videos at once (typically 20-30 videos).

Notes:
Each video's recommendations are generated by the YouTube algorithm and may vary
The recommended list typically contains 20-30 videos
This endpoint does not support pagination; all recommended videos are returned at once

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- video_id (Optional): Video ID (recommended; choose one: video_id or video_url). Example: UCeu6U67OzJhV1KwBansH3Dg
- video_url (Optional): Full video URL (choose one: video_url or video_id). Example: 4qmFsgJgEhhVQ2V1NlU2N096SmhWMUt3QmFuc0gzRGcaRDhnWXJHaW1hQVNZS0pEWmlNREprTkRJd0xUQXdNREF0TWpGbFpDMWlaR1kzTFdRMFpqVTBOMlkzWlRGaU9BJTNEJTNE
- need_format (Optional): Whether to format the data. Default: true
true: returns structured data in a formatted layout (recommended)
false: returns the raw YouTube API structure, useful for debugging or custom processing. Example: true

Example Response:
{
"code": 0,
"message": "success",
"data": {
"video_id": "UCeu6U67OzJhV1KwBansH3Dg",
"related_videos": [],
"total_count": 0
},
"requestId": "045f3471-54ab-4400-add2-b1345ae9a518"
}`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/youtube.openapi.json GET /v1/youtube/get_related_videos
openapi: 3.0.1
info:
  title: YouTube API english document
  description: >-
    The english reference documentation of the YouTube API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security: []
tags: []
paths:
  /v1/youtube/get_related_videos:
    get:
      tags: []
      summary: Get related videos
      description: >-
        Get recommended related content for a YouTube video (recommended video
        list).

        Similar to the related videos shown on the right side of the video
        playback page.

        Returns all recommended videos at once (typically 20-30 videos).


        Notes:

        Each video's recommendations are generated by the YouTube algorithm and
        may vary

        The recommended list typically contains 20-30 videos

        This endpoint does not support pagination; all recommended videos are
        returned at once
      parameters:
        - name: video_id
          in: query
          description: 'Video ID (recommended; choose one: video_id or video_url)'
          required: false
          example: dQw4w9WgXcQ
          schema:
            type: string
            example: dQw4w9WgXcQ
        - name: video_url
          in: query
          description: 'Full video URL (choose one: video_url or video_id)'
          required: false
          example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
          schema:
            type: string
            example: https://www.youtube.com/watch?v=dQw4w9WgXcQ
        - name: need_format
          in: query
          description: >-
            Whether to format the data. Default: true

            true: returns structured data in a formatted layout (recommended)

            false: returns the raw YouTube API structure, useful for debugging
            or custom processing
          required: false
          example: 'true'
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  video_id: 9bZkp7q19f0
                  related_videos:
                    - video_id: JkBQns0sm5U
                      title: 80s playlist 📻
                      author: ava★
                      author_id: UCMkQ1c05iHs9GrGKWXZkU2Q
                      author_url: https://www.youtube.com/channel/UCMkQ1c05iHs9GrGKWXZkU2Q
                      length_text: null
                      length_seconds: null
                      view_count_text: 4.1M views
                      published_time_text: 3 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/JkBQns0sm5U/hqdefault.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AHwB4AC0AWKAgwIABABGHIgRyg-MA8=&rs=AOn4CLAZjibOVaA2xwleLkxfIjUdXcGs2g
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/JkBQns0sm5U/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB8AeAAtAFigIMCAAQARhyIEcoPjAP&rs=AOn4CLC-pMJT3iehui9XtUcpGNqcd-M4Dg
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=JkBQns0sm5U
                    - video_id: 0QVOc1aagSE
                      title: >-
                        Daft Punk ft. Pharell Williams Get lucky Extended
                        Version Original Video Full HD
                      author: pfigueroah
                      author_id: UCbKnT31fS9wKDa1UtuCWLOQ
                      author_url: https://www.youtube.com/channel/UCbKnT31fS9wKDa1UtuCWLOQ
                      length_text: null
                      length_seconds: null
                      view_count_text: 20M views
                      published_time_text: 12 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/0QVOc1aagSE/hqdefault.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AH-CYAC0AWKAgwIABABGDUgTyhyMA8=&rs=AOn4CLBu95WWg7cqGkP9KXGXWwLGazczJw
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/0QVOc1aagSE/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB_gmAAtAFigIMCAAQARg1IE8ocjAP&rs=AOn4CLDAtW1beovXcLStj07mcFQqrJcWSQ
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=0QVOc1aagSE
                    - video_id: XfIGAi4iphk
                      title: >-
                        LO MEJOR DE RICK ASTLEY - Las mejores canciones de Rick
                        Astley
                      author: ZABREMO.
                      author_id: UCN97lWDwATDDRxLl5QZuNGQ
                      author_url: https://www.youtube.com/channel/UCN97lWDwATDDRxLl5QZuNGQ
                      length_text: null
                      length_seconds: null
                      view_count_text: 43K views
                      published_time_text: 1 month ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/XfIGAi4iphk/hqdefault.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AH-CYAC0AWKAgwIABABGGQgZChkMA8=&rs=AOn4CLD9KVxXFSuRPmQoq_qZk3xvyag61w
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/XfIGAi4iphk/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB_gmAAtAFigIMCAAQARhkIGQoZDAP&rs=AOn4CLA1qpc5ISZjQ77U50Fuk9dLsO1vXQ
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=XfIGAi4iphk
                    - video_id: 8-igJy9prac
                      title: Why there will NEVER be another Robin Williams!
                      author: Nexus Comedy
                      author_id: UChhiX_g2T9bqZjDmdDuRluA
                      author_url: https://www.youtube.com/channel/UChhiX_g2T9bqZjDmdDuRluA
                      length_text: null
                      length_seconds: null
                      view_count_text: 840K views
                      published_time_text: 2 weeks ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/8-igJy9prac/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBfDojqGL8bnFh0dKDSsl3NZaKBuQ
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/8-igJy9prac/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCQOAWBYeOnT9w5hL9_M316Y5MW1g
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=8-igJy9prac
                    - video_id: Zi_XLOBDo_Y
                      title: Michael Jackson - Billie Jean (Official Video)
                      author: Michael Jackson
                      author_id: UC5OrDvL9DscpcAstz7JnQGA
                      author_url: https://www.youtube.com/channel/UC5OrDvL9DscpcAstz7JnQGA
                      length_text: null
                      length_seconds: null
                      view_count_text: 2B views
                      published_time_text: 16 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/Zi_XLOBDo_Y/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBtB8zQEtMwm_gqX-XLMITmqSMRsA
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/Zi_XLOBDo_Y/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAYUOFhA8mpvRsefUwdWQDNtEoBsg
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=Zi_XLOBDo_Y
                    - video_id: E9de-cmycx8
                      title: Rick Astley - Together Forever (Official HD Video)
                      author: Rick Astley
                      author_id: UCuAXFkgsw1L7xaCfnd5JJOw
                      author_url: https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw
                      length_text: null
                      length_seconds: null
                      view_count_text: 26M views
                      published_time_text: 6 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/E9de-cmycx8/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBLvNQ1W44jBqrM9VYTFZXKSd_QGQ
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/E9de-cmycx8/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDtYAlV-ZNeq926Q3abwtd6F9Ax9Q
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=E9de-cmycx8
                    - video_id: avWbTJb1-go
                      title: 70's greatest hits songs mix ~nostalgia playlist
                      author: Yoya91
                      author_id: UCvqoXHHGX_2y53y007H2ZzA
                      author_url: https://www.youtube.com/channel/UCvqoXHHGX_2y53y007H2ZzA
                      length_text: null
                      length_seconds: null
                      view_count_text: 12M views
                      published_time_text: 2 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/avWbTJb1-go/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCljQFVY08-nZGKCcjgmUxNbqcCUA
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/avWbTJb1-go/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLByxRR5-aw3RnGfEfeWELNjhM0VJQ
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=avWbTJb1-go
                    - video_id: aGCdLKXNF3w
                      title: >-
                        Tears For Fears - Everybody Wants To Rule The World
                        (Official Music Video)
                      author: Tears For Fears
                      author_id: UCyH3IAelkUFM0u6Iacx22lA
                      author_url: https://www.youtube.com/channel/UCyH3IAelkUFM0u6Iacx22lA
                      length_text: null
                      length_seconds: null
                      view_count_text: 569M views
                      published_time_text: 12 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/aGCdLKXNF3w/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDWMtGhP23PIbaoWnTfRS2rx0038Q
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/aGCdLKXNF3w/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDhqM5QCpgN9H-ObUtDSIRoTIa7hw
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=aGCdLKXNF3w
                    - video_id: 4fndeDfaWCg
                      title: Backstreet Boys - I Want It That Way (Official HD Video)
                      author: Backstreet Boys
                      author_id: UC1OR2YNQLZJYFdQjFrPWvVw
                      author_url: https://www.youtube.com/channel/UC1OR2YNQLZJYFdQjFrPWvVw
                      length_text: null
                      length_seconds: null
                      view_count_text: 1.7B views
                      published_time_text: 16 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/4fndeDfaWCg/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCzu8HegWIxsm-9KkRm4sdVcREVmw
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/4fndeDfaWCg/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBQdMxHivMaL0EQIGa0ufFm5cZiiA
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=4fndeDfaWCg
                    - video_id: cp2ad8rx1lI
                      title: 'Michael Jackson: The Man Behind the Music'
                      author: Michael soul
                      author_id: UCwnkNeQbp7EuD5NXlPWX6GA
                      author_url: https://www.youtube.com/channel/UCwnkNeQbp7EuD5NXlPWX6GA
                      length_text: null
                      length_seconds: null
                      view_count_text: 1.1M views
                      published_time_text: 4 months ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/cp2ad8rx1lI/hqdefault.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AH-CYAC0AWKAgwIABABGGUgZShlMA8=&rs=AOn4CLAWKvL0SqE9ohHqhWpljQob4DsgGA
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/cp2ad8rx1lI/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB_gmAAtAFigIMCAAQARhlIGUoZTAP&rs=AOn4CLAnZBIYjzBDndoTFMQ8xHB7xjJ90w
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=cp2ad8rx1lI
                    - video_id: WdhwU_JCINw
                      title: >-
                        80s Mix I - Pop Rock | 🎵 Queen, Baltimora, Rick Astley,
                        Michael Jackson, Pet Shop Boys, etc
                      author: Alejandro Barrera Dj
                      author_id: UCvEKQayDOFiKgqSG3YvGHlQ
                      author_url: https://www.youtube.com/channel/UCvEKQayDOFiKgqSG3YvGHlQ
                      length_text: null
                      length_seconds: null
                      view_count_text: 71M views
                      published_time_text: 2 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/WdhwU_JCINw/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDCgiA13b8-P-pVT3HQnHDRu7EhVA
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/WdhwU_JCINw/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDWcbDYMiSPwLvJRPEOTQxfDQD7yg
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=WdhwU_JCINw
                    - video_id: yPYZpwSpKmA
                      title: >-
                        Rick Astley - Together Forever (Official Video) [4K
                        Remaster]
                      author: Rick Astley
                      author_id: UCuAXFkgsw1L7xaCfnd5JJOw
                      author_url: https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw
                      length_text: null
                      length_seconds: null
                      view_count_text: 198M views
                      published_time_text: 16 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/yPYZpwSpKmA/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDRDsSEKZn3TU4EegqmncpnkZ9Oyg
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/yPYZpwSpKmA/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD6igKYt99JwlgbMCpf5I2GwXNVow
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=yPYZpwSpKmA
                    - video_id: ZnH9WjE7x8c
                      title: Ultimate 80s Classics – Timeless Icons in One Playlist
                      author: Flashback Grooves
                      author_id: UC2OVENVJuluxCf5OhMC3z0w
                      author_url: https://www.youtube.com/channel/UC2OVENVJuluxCf5OhMC3z0w
                      length_text: null
                      length_seconds: null
                      view_count_text: 8.6M views
                      published_time_text: 10 months ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/ZnH9WjE7x8c/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBdABAlyqNW1iKvDNpCKwQPRb8k3w
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/ZnH9WjE7x8c/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD8p2sdJWT-1qMbvfnlSn3ESP-zpA
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=ZnH9WjE7x8c
                    - video_id: u2GCZGITTDw
                      title: >-
                        Guardians of the Galaxy: Remix (Vol. 1 & Vol. 2) (Full
                        Sound track) #guardiansofthegalaxy #awesome
                      author: Wacky Woodz
                      author_id: UCqLNATiMK0sHRAn2xNmcHaw
                      author_url: https://www.youtube.com/channel/UCqLNATiMK0sHRAn2xNmcHaw
                      length_text: null
                      length_seconds: null
                      view_count_text: 680K views
                      published_time_text: 3 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/u2GCZGITTDw/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLCstvzQUm0PbMcWfBtGLAneaCmNtA
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/u2GCZGITTDw/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCRIOEeISsymGJFKvK9t1TkknRyqQ
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=u2GCZGITTDw
                    - video_id: snYvp-KHW9Q
                      title: 12 Minutes of Jim Carrey at His ABSOLUTELY Funniest!
                      author: Televize
                      author_id: UCpJxo09nN7N8WSAWfVXIFhQ
                      author_url: https://www.youtube.com/channel/UCpJxo09nN7N8WSAWfVXIFhQ
                      length_text: null
                      length_seconds: null
                      view_count_text: 618K views
                      published_time_text: 3 weeks ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/snYvp-KHW9Q/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDzxlljf6ZMyUFxafHLSC0Aol-kTg
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/snYvp-KHW9Q/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDIHAWPhML37Y-reyWgAW7uNTZdyQ
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=snYvp-KHW9Q
                    - video_id: fNFzfwLM72c
                      title: Bee Gees - Stayin' Alive (Official Music Video)
                      author: beegees
                      author_id: UCD9sCcKXnFxMeuFoNayVxeQ
                      author_url: https://www.youtube.com/channel/UCD9sCcKXnFxMeuFoNayVxeQ
                      length_text: null
                      length_seconds: null
                      view_count_text: 478M views
                      published_time_text: 9 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/fNFzfwLM72c/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLD3tub5tA7yLzokq5mj66fzUS1czg
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/fNFzfwLM72c/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBgjhXdYepD1YKdm-qqh7O4kCmEhg
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=fNFzfwLM72c
                    - video_id: 1jhhb1DJjUQ
                      title: >-
                        Best of 80s Mega Hits – Timeless Songs That Shaped Pop
                        Culture
                      author: Flashback Grooves
                      author_id: UC2OVENVJuluxCf5OhMC3z0w
                      author_url: https://www.youtube.com/channel/UC2OVENVJuluxCf5OhMC3z0w
                      length_text: null
                      length_seconds: null
                      view_count_text: 1.4M views
                      published_time_text: 1 month ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/1jhhb1DJjUQ/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDoPmGAkgc0JK2W_Y7CA9-8hzdY7g
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/1jhhb1DJjUQ/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAnccD7hzMC28teL8-47LhmsIOC2w
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=1jhhb1DJjUQ
                    - video_id: VegzlNRGSvI
                      title: Rick Astley megamix
                      author: Gary Douglas
                      author_id: UCQWt05fNgL1uCvufSqXG3OQ
                      author_url: https://www.youtube.com/channel/UCQWt05fNgL1uCvufSqXG3OQ
                      length_text: null
                      length_seconds: null
                      view_count_text: 4.8M views
                      published_time_text: 8 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/VegzlNRGSvI/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLACCeBqWaeetbqZZij65BCXa14NJQ
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/VegzlNRGSvI/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDdfMfW7R1VTO8V0NLOuP7yCeq6bA
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=VegzlNRGSvI
                    - video_id: 8UVNT4wvIGY
                      title: >-
                        Gotye - Somebody That I Used To Know (feat. Kimbra)
                        [Official Music Video]
                      author: Gotye
                      author_id: UCFC9LamNMmLioW643VZ40OA
                      author_url: https://www.youtube.com/channel/UCFC9LamNMmLioW643VZ40OA
                      length_text: null
                      length_seconds: null
                      view_count_text: 2.6B views
                      published_time_text: 14 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/8UVNT4wvIGY/hqdefault.jpg?sqp=-oaymwE1CKgBEF5IVfKriqkDKAgBFQAAiEIYAXABwAEG8AEB-AH-CYAC0AWKAgwIABABGGUgRyhCMA8=&rs=AOn4CLDsPaBslPgpBEhbXnx57M5EXZxe3w
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/8UVNT4wvIGY/hqdefault.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGAFwAcABBvABAfgB_gmAAtAFigIMCAAQARhlIEcoQjAP&rs=AOn4CLC8J_Tr6qdePNyXJj2xSxZx_trhbQ
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=8UVNT4wvIGY
                    - video_id: 9bZkp7q19f0
                      title: PSY - GANGNAM STYLE(강남스타일) M/V
                      author: officialpsy
                      author_id: UCrDkAvwZum-UTjHmzDI2iIw
                      author_url: https://www.youtube.com/channel/UCrDkAvwZum-UTjHmzDI2iIw
                      length_text: null
                      length_seconds: null
                      view_count_text: 5.8B views
                      published_time_text: 13 years ago
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLByyiJvge8s49FIDVIJYTriX-FEkw
                          width: 168
                          height: 94
                        - url: >-
                            https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAwlIZLORAJKNb7smWcuzGrzFDNPw
                          width: 336
                          height: 188
                      video_url: https://www.youtube.com/watch?v=9bZkp7q19f0
                  total_count: 20
                requestId: 045f3471-54ab-4400-add2-b1345ae9a518
          headers: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/youtube/get_related_videos?video_id=UCeu6U67OzJhV1KwBansH3Dg&video_url=4qmFsgJgEhhVQ2V1NlU2N096SmhWMUt3QmFuc0gzRGcaRDhnWXJHaW1hQVNZS0pEWmlNREprTkRJd0xUQXdNREF0TWpGbFpDMWlaR1kzTFdRMFpqVTBOMlkzWlRGaU9BJTNEJTNE&need_format=true' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/youtube/get_related_videos',
                params={"video_id": "UCeu6U67OzJhV1KwBansH3Dg", "video_url": "4qmFsgJgEhhVQ2V1NlU2N096SmhWMUt3QmFuc0gzRGcaRDhnWXJHaW1hQVNZS0pEWmlNREprTkRJd0xUQXdNREF0TWpGbFpDMWlaR1kzTFdRMFpqVTBOMlkzWlRGaU9BJTNEJTNE", "need_format": "true"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"video_id":
            "UCeu6U67OzJhV1KwBansH3Dg", "video_url":
            "4qmFsgJgEhhVQ2V1NlU2N096SmhWMUt3QmFuc0gzRGcaRDhnWXJHaW1hQVNZS0pEWmlNREprTkRJd0xUQXdNREF0TWpGbFpDMWlaR1kzTFdRMFpqVTBOMlkzWlRGaU9BJTNEJTNE",
            "need_format": "true"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/youtube/get_related_videos?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````