API YouTube Risposte ai commenti

POST

Stato di salute dell'API

Operatività nelle ultime 24 ore
Normale
  • Buono / normale
  • Disponibile
Normale

Ultime 24 ore

Ultimi 30 giorni

Read the replies under one YouTube comment, on a video or on a channel post, from the link and the comment's comment_id (a comments or community_post_comments row's id). Each reply has text, author, likes, the time YouTube shows, and creator, pinned, hearted and edited flags. About 10 on the first page and up to about 50 after; pass next_page_token back as page_token for more.

Invia POST https://api.everyinfra.com/api/v1/social con platform impostato su youtube e action impostato su comment_replies. Prezzo $0.79 per 1.000 richieste ($0.000792 per chiamata). Le chiamate non riuscite e i risultati vuoti non vengono addebitati. Sincrona. Per i job più lenti, aggiungi "mode": "async" al corpo della richiesta, recupera il job_id ed esegui il polling.

Prompt per l'AI

#
Aiutami a scrivere uno script di raccolta dei dati con l'endpoint YouTube Risposte ai commenti di EveryInfra (youtube/comment_replies).

Come funziona l'endpoint:
- Richiesta: POST https://api.everyinfra.com/api/v1/social con l'header Authorization: Bearer <chiave API>. Leggi la chiave dalla variabile d'ambiente EVERYINFRA_API_KEY e non scriverla mai direttamente nel codice.
- Nel corpo della richiesta imposta platform su youtube e action su comment_replies, e inserisci i parametri in params.
- Parametri obbligatori:
  - url: The video link (watch?v=, youtu.be or shorts) or the channel post link (https://www.youtube.com/post/Ugkx…) the comment is on.
  - comment_id: ID of the top-level comment, starting with Ug, taken from the id of a comments or community_post_comments row. A reply's ID also works and reads the comment it belongs to.
- Parametri facoltativi:
  - page_token: Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged.
- Restituisce un elenco di record. Campi principali di ogni record: id, url, text, author_name, author_username, author_id, author_url, author_avatar_url, like_count, reply_count, posted_at, is_reply; 20 campi in totale, elenco completo su https://api.everyinfra.com/api/v1/social/catalog?platform=youtube.
- Esempio di corpo della richiesta:
{
  "platform": "youtube",
  "action": "comment_replies",
  "params": {
    "url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ",
    "comment_id": "UgzrXz18R8jmeI5i-el4AaABAg"
  }
}
- Prezzo: $0.79 per 1.000 richieste; le richieste non riuscite e i risultati vuoti non vengono addebitati.
- Per decine o centinaia di target, aggiungi "mode": "async" al corpo: ricevi subito un job_id ed esegui il polling su GET https://api.everyinfra.com/api/v1/jobs/{job_id} per ottenere il risultato.
- In caso di 422, correggi la richiesta usando i nomi dei parametri e i valori consentiti suggeriti nell'errore; in caso di 429 o 503, attendi il tempo indicato da Retry-After e riprova.

Prima di scrivere il codice, chiedimi quali target mi servono, quanti, quali campi e quale formato di output voglio; poi conferma con me il piano e il costo indicativo.

Parametri della richiesta

#
NomePosizioneTipoObbligatorioPredefinitoDescrizione
AuthorizationheaderstringSì-Bearer seguito dalla tua chiave API. Creala nella console; non inserirla mai in un URL o in un repository di codice.
platformbodystringSìyoutubeIdentificativo della piattaforma, valore fisso.
actionbodystringSìcomment_repliesIdentificativo della funzionalità, valore fisso.
urlbody.paramsstringSì-The video link (watch?v=, youtu.be or shorts) or the channel post link (https://www.youtube.com/post/Ugkx…) the comment is on.
comment_idbody.paramsstringSì-ID of the top-level comment, starting with Ug, taken from the id of a comments or community_post_comments row. A reply's ID also works and reads the comment it belongs to. A value that is not recognized returns 422 and is not charged.
page_tokenbody.paramsstringNo-Page token. Leave it out for the first page, then pass back the previous response's next_page_token exactly as received, with the other parameters unchanged. About 10 replies on the first page and up to about 50 on later pages; each page is one call and limit has no effect. Tokens last 24 hours, and the last page has no next_page_token.

Esempi di codice

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "youtube",
  "action": "comment_replies",
  "params": {
    "url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ",
    "comment_id": "UgzrXz18R8jmeI5i-el4AaABAg"
  }
}'

Definizione OpenAPI (JSON)Gli esempi leggono la chiave dalla variabile d'ambiente EVERYINFRA_API_KEY; il codice copiato non contiene mai la tua chiave.

Esempio di risposta

#
Acquisita il November 21, 2026 at 07:24 (UTC) chiamando questa API con i parametri dell'esempio di codice qui sopra. results e count sono la risposta reale di quella chiamata, da cui sono state rimosse le informazioni personali (nomi, handle, avatar, link ai profili, recapiti); l'elenco conserva i primi 2. id, billing e quota cambiano a ogni chiamata, quindi ne viene mostrata solo la struttura.
json
{  "id": "req_…",  "platform": "youtube",  "action": "comment_replies",  "results": [    {      "id": "UgzrXz18R8jmeI5i-el4AaABAg.8vmh3CuTC3B94RkwQvd5d6",      "url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ&lc=UgzrXz18R8jmeI5i-el4AaABAg.8vmh3CuTC3B94RkwQvd5d6",      "text": "Wait, it was made using free software!?",      "author_name": "m•••4",      "author_username": "m•••4",      "author_id": "•••",      "author_url": "https://www.youtube.com/•••",      "author_avatar_url": "https://yt3.ggpht.com/•••",      "like_count": 61,      "reply_count": 0,      "posted_at": "6 years ago",      "is_reply": true,      "reply_to_id": "UgzrXz18R8jmeI5i-el4AaABAg",      "is_creator": false,      "is_verified": false,      "is_pinned": false,      "is_hearted": false,      "video_id": "aqz-KE-bpKQ",      "platform": "youtube"    },    {      "id": "UgzrXz18R8jmeI5i-el4AaABAg.8vmh3CuTC3B94WIBvAW4q7",      "url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ&lc=UgzrXz18R8jmeI5i-el4AaABAg.8vmh3CuTC3B94WIBvAW4q7",      "text": "Audy Birdo yes and no",      "author_name": "g•••4",      "author_username": "g•••4",      "author_id": "•••",      "author_url": "https://www.youtube.com/•••",      "author_avatar_url": "https://yt3.ggpht.com/•••",      "like_count": 16,      "reply_count": 0,      "posted_at": "6 years ago",      "is_reply": true,      "reply_to_id": "UgzrXz18R8jmeI5i-el4AaABAg",      "is_creator": false,      "is_verified": false,      "is_pinned": false,      "is_hearted": false,      "video_id": "aqz-KE-bpKQ",      "platform": "youtube"    }  ],  "next_page_token": …,  "pagination": { … },  "count": 10,  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Campi della risposta

#

I dati di business si trovano in results. La tabella elenca i campi che un record può contenere; i valori che la piattaforma non mostra non vengono mai inventati.

CampoSignificato
idID univoco del record sulla piattaforma. È univoco solo all'interno di una piattaforma; gli ID possono ripetersi tra piattaforme diverse.
urlLink al record sulla piattaforma.
textTesto del contenuto senza HTML, restituito per intero e mai troncato (su alcune piattaforme i risultati degli elenchi contengono solo un estratto; lo indicano le note sui campi della piattaforma).
author_nameNome visualizzato dell'autore.
author_usernameUsername dell'autore (@handle), di solito utilizzabile negli URL.
author_idID univoco dell'autore sulla piattaforma.
author_urlLink al profilo dell'autore sulla piattaforma.
author_avatar_urlMantiene il significato attribuito dalla piattaforma
like_countLike. null significa che la piattaforma o questa funzionalità non li rende noti; non equivale a 0.
reply_countRisposte, di solito a un commento. null significa non rese note.
posted_atData e ora di pubblicazione in formato ISO 8601, UTC (ad esempio 2026-08-07T12:34:56+00:00). Le stringhe non standard della piattaforma vengono passate così come sono, quindi esegui il parsing in modo difensivo. null significa che la piattaforma non le rende note.
is_replyMantiene il significato attribuito dalla piattaforma
reply_to_idMantiene il significato attribuito dalla piattaforma
is_creatorWhether the channel owner wrote this comment or reply.
is_verifiedIndica se la piattaforma ha verificato l'account. null significa che non è possibile determinarlo.
is_pinnedWhether it is pinned.
is_heartedWhether the channel owner gave it a heart.
is_editedWhether it was edited after it was posted.
video_idID of the video it belongs to; null for replies to a channel post comment. On channel posts, the ID of the video attached to the post, or null if none is attached.
post_idID of the channel post it belongs to; null for replies to a video comment.
platformIdentificativo della piattaforma di origine, uguale a platform nella richiesta (ad esempio xiaohongshu, tiktok).

Errori e addebiti

#
401
Chiave mancante o non valida.
402
Saldo insufficiente. Effettua prima una ricarica.
422
Nome o valore del parametro non valido. Correggilo seguendo i suggerimenti dell'errore. Nessun addebito.
429
Raggiunto il limite di richieste al minuto. Attendi il tempo indicato da Retry-After, poi riprova.
503
Impossibile completare. L'importo trattenuto torna sul tuo saldo. Se l'esito è incerto, verificalo prima di riprovare.
Risposta 200 vuota
Nessun dato. Nessun addebito.

Errori

Google Analytics: serve il consenso Privacy