YouTube Video API
Metadati completi di un video o Short tramite URL o id: titolo, descrizione, canale, numero di visualizzazioni e mi piace e data di pubblicazione.
0,70 USD/1k richieste, paghi a richiesta, nessun abbonamento.
Official Video
Rick Astley
1.5B views · Oct 25, 2009
The official video.
{"id": "dQw4w9WgXcQ","title": "Official Video","channel": "Rick Astley","durationMs": 213000,"views": 1540000000,"likes": 17200000,"createdUtc": 1256453853,"description": "The official video.",... 7 campi in più}
Prezzi e provider
Prezzi dell'API YouTube Video: una sola API, 6 provider intercambiabili
Serve per primo il provider più economico. Se fallisce, subentra il successivo nella stessa chiamata.
Provalo
Ottieni YouTube Video in una sola richiesta
Questo esempio mostra 10 campi su 18. Vedi tutti i campi
{
"found": true,
"data": {
"id": "dQw4w9WgXcQ",
"title": "Official Video",
"channel": "Rick Astley",
"durationMs": 213000,
"views": 1540000000,
"likes": 17200000,
"createdUtc": 1256453853,
"description": "The official video."
}
}Riferimento completo di parametri e risposta - ogni campo, tipo ed esempio per questo endpoint.
Riferimento
Una richiesta, una sola forma di risposta.
Ogni campo che invii e ogni campo che ricevi, ciascuno con un esempio reale.
Ultima verifica 2026-11-21 · disponibilità e latenza misurate su 30d
Corpo della richiesta
JSON, inviato a questo endpoint.
- idstring
ID del video YouTube. Uno Short usa lo stesso ID di qualsiasi altro video.
- requireFieldsarray
Facoltativo; se lo ometti l'instradamento resta invariato, e serve la fonte più economica. Indica i campi di output che questa richiesta deve poter restituire, per esempio `authorAvatarUrl`, e verrà servita solo da una fonte che li restituisce tutti. I campi che non indichi vengono comunque restituiti ogni volta che la fonte che serve li ha. Può far salire il prezzo: quando la fonte più economica non può restituire un campo indicato, serve una fonte più cara, e ti viene quotato e addebitato il suo prezzo. Un campo indicato può comunque mancare su un video che davvero non lo ha. Indicare una combinazione che nessuna singola fonte restituisce insieme viene rifiutato come input non valido, senza addebito. Una fonte che restituisce solo un valore arrotondato o abbreviato per un campo non conta come se lo restituisse.
- urlstring
https://www.youtube.com/watch?v=dQw4w9WgXcQ
URL completo del video YouTube. Funzionano gli Short (youtube.com/shorts/...) e gli URL youtu.be, live ed embed.
Risposta
JSON, un valore di esempio per campo.
The video result, or null when not found.
- authorAvatarUrlstringpuò richiedere
URL of the publishing channel's avatar image.
- authorIdstring
YouTube channel ID of the publishing channel.
- authorUrlstring
Canonical URL of the publishing channel, tracking query parameters stripped.
- categorystring
YouTube category the video is filed under, for example "Music".
- channelstring
Rick Astley
Name of the channel that published the video. Populated whenever the provider has data for the entity.
- commentsintegerpuò richiedere
Number of comments. Some sources round large counts (2.4M instead of 2,457,538); name `comments` in requireFields to be served only by a source that returns the exact count.
- createdUtcnumber
1256453853
UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. Populated whenever the provider has data for the entity.
- descriptionstringpuò richiedere
The official video.
Video description text. Some sources return it as YouTube displays it, with long links shortened (https://colab.research.google.com/dri...) and YouTube or social links replaced by their titles; name `description` in requireFields to be served only by a source that returns every link intact.
- durationMsinteger
213000
Duration of the video in milliseconds.
- idstring
dQw4w9WgXcQ
Unique identifier of the video. Populated whenever the provider has data for the entity.
- imagestring
URL of the video thumbnail image.
- keywordsstring[]
Keywords the uploader tagged the video with.
- likesinteger
17200000
Number of likes.
- titlestring
Official Video
Title of the video. Populated whenever the provider has data for the entity.
- viewsinteger
1540000000
Number of views.
- foundboolean
true
Whether the video was found.
- reason"not_found"
Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
Vendi questa API? Consulta lo schema completo che il tuo endpoint deve restituire.
FAQ
Sull'API YouTube Video
L'API YouTube Video di AnyAPI restituisce dati YouTube come JSON normalizzato da una sola chiamata POST a /v1/run/youtube.video. Metadati completi di un video o Short tramite URL o id: titolo, descrizione, canale, numero di visualizzazioni e mi piace e data di pubblicazione. AnyAPI instrada ogni richiesta su 6 fonti e passa automaticamente a un'altra quando una fallisce. Costa da 0,70 USD ogni 1.000 richieste, in dollari statunitensi, senza abbonamento e senza minimo mensile. Negli ultimi 30 giorni, il 99,8% delle chiamate YouTube Video tramite AnyAPI è riuscito, con un tempo di risposta mediano di 3,8 secondi su 487.282 chiamate misurate.