Skip to main content
POST
/
api
/
youtube
/
search
/
videos
/youtube/search/videos
curl --request POST \
  --url https://api.anysite.io/api/youtube/search/videos \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 300,
  "timeout": 300
}
'
[
  {
    "id": "<string>",
    "title": "<string>",
    "url": "<string>",
    "@type": "@youtube_search_video",
    "author": {
      "id": "<string>",
      "alias": "<string>",
      "@type": "@youtube_search_video_author",
      "name": "<string>",
      "url": "<string>"
    },
    "duration_seconds": 123,
    "view_count": 123,
    "published_at": 123,
    "image": "<string>"
  }
]

Authorizations

access-token
string
header
required

Headers

access-token
string
required

Body

application/json
query
string
required

Search query

Example:

"python tutorial"

count
integer
required

Max number of results

Required range: 1 <= x <= 600
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

id
string
required
title
string
required
url
string
required
@type
string
default:@youtube_search_video
author
YoutubeSearchVideoAuthor · object
duration_seconds
integer | null
view_count
integer | null
published_at
integer | null
image
string | null