Skip to main content
POST
Bridgly SDK

Authorizations

Authorization
string
header
required

A Bridgly API key (bgly_…). Metered endpoints deduct credits from the resolved account.

Body

application/json
query
string
required

Search keywords, e.g. "lofi hip hop".

Minimum string length: 1
cursor
string

The previous response's nextCursor, to fetch the next page. Omit it for the first page.

type
enum<string>

Which kind of result to return: "all" (the mixed results YouTube shows by default), "video", "short", "channel" or "playlist". Defaults to "all".

Available options:
all,
video,
short,
channel,
playlist
sortBy
enum<string>

Result order: "relevance" (YouTube's default) or "viewCount" (most viewed first). Defaults to "relevance".

Available options:
relevance,
viewCount
uploadDate
enum<string>

Only return videos uploaded in the last day, week, month or year. Applies to videos and Shorts, so channels and playlists are left out when it is set.

Available options:
today,
week,
month,
year
duration
enum<string>

Only return videos of this length: under 3 minutes, 3 to 20 minutes, or over 20 minutes. Applies to videos and Shorts, so channels and playlists are left out when it is set.

Available options:
under3Minutes,
3to20Minutes,
over20Minutes
features
enum<string>[]

Only return videos that have all of these features, as in YouTube's search filters: "live" (live now), "4k", "hd", "subtitles" (subtitles or closed captions), "creativeCommons" (Creative Commons license), "360" (360°), "vr180", "3d", "hdr", "location" (tagged with a place) or "purchased" (bought by the viewer, which signed-out searches never match). Applies to videos and Shorts, so channels and playlists are left out when it is set.

Maximum array length: 11
Available options:
360,
live,
4k,
hd,
subtitles,
creativeCommons,
vr180,
3d,
hdr,
location,
purchased
count
integer
default:20

Number of results to return (1–20). Defaults to 20.

Required range: 1 <= x <= 20
cacheMaxAgeHours
integer

Accept a cached result up to this many hours old, at no cost; its cachedAt says when it was fetched. Without one that recent, fresh data is fetched at the normal price. Leave it out to always get fresh data, e.g. 24.

Required range: x <= 9007199254740991
cacheOnly
boolean

Return only a cached result, never fresh data. With cacheMaxAgeHours, only one that recent; without it, the latest of any age. Responds 404, at no cost, when there is none, e.g. true.

Response

Default Response

timeMs
number
required

Wall-clock time the request took to complete, in milliseconds.

creditsCost
number
required

Number of account credits this request consumed.

cachedAt
string<date-time> | null
required

When the returned data was fetched, if it came from the cache. Null when it was fetched fresh for this request.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
data
object
required