Skip to main content
POST
/
api
/
youtube
/
video
/youtube/video
curl --request POST \
  --url https://api.anysite.io/api/youtube/video \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "video": "<string>",
  "timeout": 300
}
'
[
  {
    "id": "<string>",
    "url": "<string>",
    "@type": "@youtube_video",
    "title": "<string>",
    "description": "<string>",
    "author": {
      "id": "<string>",
      "alias": "<string>",
      "@type": "@youtube_video_author",
      "name": "<string>",
      "url": "<string>"
    },
    "duration_seconds": 123,
    "view_count": 123,
    "subtitles": {
      "text": "<string>",
      "subtitle_count": 123,
      "language": "<string>",
      "@type": "@youtube_subtitle",
      "subtitles": []
    }
  }
]

Authorizations

access-token
string
header
required

Headers

access-token
string
required

Body

application/json
video
string
required

YouTube video ID or URL (e.g., 'dQw4w9WgXcQ' or 'https://www.youtube.com/watch?v=dQw4w9WgXcQ')

Examples:

"dQw4w9WgXcQ"

"https://www.youtube.com/watch?v=dQw4w9WgXcQ"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

id
string
required
url
string
required
@type
string
default:@youtube_video
title
string | null
description
string | null
author
YoutubeVideoAuthor · object
duration_seconds
integer | null
view_count
integer | null
subtitles
YoutubeSubtitle · object