Skip to main content
GET
Get audio files list
This endpoint returns the direct media URLs for a video’s available audio-only formats, along with their codec, bitrate, container and file size.

Choosing a region

Media URLs are always resolved from a specific country. By default that is the country your request originates from, falling back to DE when it cannot be determined. Pass regionCode to resolve the request as if it came from somewhere else — use it when a video is region-restricted and returns no formats from the default region. regionCode accepts an ISO 3166-1 alpha-2 code; see Countries for the full list of accepted values.
cURL

Downloading the files

The url of each format is a signed, time-limited link served directly by YouTube’s CDN. Two things follow from that:
  • The links expire within a few hours. Request the list right before you download rather than storing the URLs.
  • The links are issued to the host that fetched them, which is Poix — not your own IP address. For most videos this makes no difference and the link downloads from anywhere. For some region-licensed content YouTube additionally restricts playback to the network the link was issued for, and downloading it yourself returns 403 Forbidden.
regionCode does not fix a 403 on download. It controls which region the link is issued for, not which IP address may use it — the link is never issued for your own IP. If you hit one, request a fresh list and retry; the same link frequently succeeds from a different network.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

videoId
string
required

The YouTube video ID

Required string length: 11
Example:

"dQw4w9WgXcQ"

Query Parameters

regionCode
enum<string>

Instructs the API to return results as if the request was made from a specific country. ISO 3166 alpha-2 country code.

Available options:
AD,
AE,
AF,
AG,
AI,
AL,
AM,
AN,
AO,
AQ,
AR,
AS,
AT,
AU,
AW,
AX,
AZ,
BA,
BB,
BD,
BE,
BF,
BG,
BH,
BI,
BJ,
BM,
BN,
BO,
BR,
BS,
BT,
BV,
BW,
BY,
BZ,
CA,
CC,
CD,
CF,
CG,
CH,
CI,
CK,
CL,
CM,
CN,
CO,
CR,
CU,
CV,
CX,
CY,
CZ,
DE,
DJ,
DK,
DM,
DO,
DZ,
EC,
EE,
EG,
EH,
ER,
ES,
ET,
EU,
FI,
FJ,
FK,
FM,
FO,
FR,
GA,
GB,
GD,
GE,
GF,
GG,
GH,
GI,
GL,
GM,
GN,
GP,
GQ,
GR,
GS,
GT,
GU,
GW,
GY,
HK,
HM,
HN,
HR,
HT,
HU,
ID,
IE,
IL,
IM,
IN,
IO,
IQ,
IR,
IS,
IT,
JE,
JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KN,
KP,
KR,
KW,
KY,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
LY,
MA,
MC,
MD,
ME,
MG,
MH,
MK,
ML,
MM,
MN,
MO,
MP,
MQ,
MR,
MS,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NC,
NE,
NF,
NG,
NI,
NL,
NO,
NP,
NR,
NU,
NZ,
OM,
PA,
PE,
PF,
PG,
PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
ST,
SV,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW

Response

Successful response

itag
integer
required

The itag of the audio format

url
string<uri>
required

The URL of the audio file

mimeType
string
required

The MIME type of the audio file

bitrate
integer
required

The bitrate of the audio in bits per second

initRange
object
required

The initialization range for the audio file

indexRange
object
required

The index range for the audio file

lastModified
string
required

The last modified timestamp of the audio file

contentLength
string
required

The content length of the audio file in bytes

quality
string
required

The quality label of the audio

projectionType
string
required

The projection type of the audio

averageBitrate
integer
required

The average bitrate of the audio in bits per second

audioQuality
string
required

The audio quality label

approxDurationMs
string
required

The approximate duration of the audio in milliseconds

audioSampleRate
string
required

The audio sample rate

audioChannels
integer
required

The number of audio channels

parsedContentLength
string
required

The parsed content length in a human-readable format

lengthSeconds
string
required

The length of the audio in seconds

parsedLastModified
string
required

The parsed last modified date in ISO 8601 format

highReplication
boolean

Indicates if the audio has high replication

Example: