YouTube Search API
Api Details
Endpoint
GET https://serpapi.abcproxy.com/search
Description Retrieve comprehensive user profile including
basic info
,account status
and optionalpermission sets
.
youtube_search
Up to 20 search results for a search term of your choice.
youtube_search_max
Up to 700 search results for a search term of your choice.
Request
HTTP Request
API Parameters
Search Query
search_query
string
Yes
Parameter defines the search query. You can use anything that you would use in a regular YouTube search.
123
Localization
gl
string
No
us
hl
string
No
en
Filters Parameters
upload_date
string
No
Filters videos by when they were uploaded. Available values are: today
, last_hour
, this_week
, this_month
, this_year
.
today
type
string
No
Returns results by content type. Available values are: video
, channel
, playlist
, movie
.
video
duration
string
No
Content duration in minutes. Available values are
>4
sort_by
string
No
Determines how search results are ordered. Available values are rating
, relevance
, view_count
,upload_date
.
relevance
is360
boolean
No
Returns 360-degree videos in search results.
false
is3d
boolean
No
Returns 3D videos in search results.
false
is4k
boolean
No
Returns 4K resolution videos in search results.
false
creative_commons
boolean
No
Returns only videos with Creative Commons licenses.
false
hd
boolean
No
Returns high-definition videos in search results.
false
hdr
boolean
No
Returns HDR (High Dynamic Range) videos in search results.
false
live
boolean
No
Returns live streams in search results.
false
area
boolean
No
Returns videos with location information.
false
purchased
boolean
No
Returns purchased content in search results.
false
subtitles
boolean
No
Returns videos with subtitles or closed captions.
false
vr180
boolean
No
Returns VR180 format videos in search results.
false
Advanced Google Play Parameters
sp
string
No
-
Serpapi Parameters
engine
string
Yes
Set parameter to youtube
to use the YouTube API engine.
google_play
no_cache
boolean
No
Parameter will force SerpApi to fetch the YouTube results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false
(default) to allow results from the cache, or true
to disallow results from the cache.
true
orfalse
api_key
string
Yes
Parameter defines the SerpApi private key to use.
-
Response
Success 200
Response Body
Response Fields
search_metadata
object
Contains timing and status information
search_parameters
object
Contains query parameters and search context
organic_results
object[]
OrganicResults
latest_from_results
object
LatestfromRes
video_results
object
VideoResults
shorts_results
object
ShortsResults
Error Responses
Common Errors
200
400
API Key can not be empty
200
401
Param error
200
402
Api key error
200
403
Insufficient Balance
200
404
Deduction failed
200
405
Failed to record usage count
200
406
Unsupported engine
200
407
Network error
200
408
File not found
200
409
Limit param error
200
410
Build url error
200
411
Failed to QueryRecentRecord
200
412
Failed to find json
200
413
Get html error
200
414
HTML is empty
200
429
Too many request
Error Example
Last updated