Skip to content

YtdlOptions

Property Type Default value Description
clients? readonly Client[] DEFAULT_CLIENTS Clients to ask, most preferred first.
cookie? string undefined Cookie header or Netscape cookie export of a signed-in YouTube session.
country? string "US" InnerTube gl, the content region.
fetch? (input, init?) => Promise<Response> globalThis.fetch Every request goes through this; pass one bound to a proxy or local address. The player script and the lookup of its version are shared by every instance in the process, so whichever instance needs them first fetches them through its own fetch.
getPoToken? GetPoToken undefined Mints PO tokens; clients that need one are skipped without it.
lang? string "en" InnerTube hl for titles, search, related videos and suggestions. Player answers are always English, so playability is classified the same in every language and caption track names come back in English.
playerId? string undefined Pins the player.js version used for solving.
timeoutMs? number 30000 Milliseconds a request may wait for its response headers or its next body chunk before it fails with REQUEST_FAILED.
utcOffsetMinutes? number 0 InnerTube utcOffsetMinutes, which YouTube uses for relative times such as “Updated 2 days ago”.