API Instagram Comment translations
Stato di salute dell'API
- Operatività nelle ultime 24 ore
- Normale
- Buono / normale
- Disponibile
- Limitato
- Quasi del tutto inattivo
Ultime 24 ore
Ultimi 30 giorni
Translate up to 10 comments on one Instagram post, from the post url and comment_ids, into target_language (default en). One row per comment found; one call is billed once.
Invia POST https://api.everyinfra.com/api/v1/social con platform impostato su instagram e action impostato su comment_translations. Prezzo $6.39 per 1.000 richieste ($0.006389 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 Instagram Comment translations di EveryInfra (instagram/comment_translations).
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 instagram e action su comment_translations, e inserisci i parametri in params.
- Parametri obbligatori:
- url: The post or Reel the comments are on, as a link such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/.
- comment_ids: The comments to translate, as an array of 1 to 10 IDs with no repeats, from the id in comments or comment_replies results. Only about the first 150 comments on the post are searched; comments not found have no row.
- Parametri facoltativi:
- target_language: The language to translate into, as a language code such as en, zh-CN, zh-TW, ja, ko, es, pt-BR, fr or de. Defaults to en.
- Restituisce un elenco di record. Campi principali di ogni record: comment_id ((comment_translations) The numeric comm…), text, translation (The machine translation), source_language (The detected language code of the origi…), target_language (The language code translated into: the…), author_username, posted_at, url, post_url (Link del post).
- Esempio di corpo della richiesta:
{
"platform": "instagram",
"action": "comment_translations",
"params": {
"url": "https://www.instagram.com/p/DbiL3SDoJzV/",
"comment_ids": [
"18012025586749566"
]
}
}
- Prezzo: $6.39 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
#| Nome | Posizione | Tipo | Obbligatorio | Predefinito | Descrizione |
|---|---|---|---|---|---|
Authorization | header | string | Sì | - | Bearer seguito dalla tua chiave API. Creala nella console; non inserirla mai in un URL o in un repository di codice. |
platform | body | string | Sì | instagram | Identificativo della piattaforma, valore fisso. |
action | body | string | Sì | comment_translations | Identificativo della funzionalità, valore fisso. |
url | body.params | string | Sì | - | The post or Reel the comments are on, as a link such as https://www.instagram.com/p/<shortcode>/ or https://www.instagram.com/reel/<shortcode>/. |
comment_ids | body.params | array | Sì | - | The comments to translate, as an array of 1 to 10 IDs with no repeats, from the id in comments or comment_replies results. Only about the first 150 comments on the post are searched; comments not found have no row. |
target_language | body.params | string | No | - | The language to translate into, as a language code such as en, zh-CN, zh-TW, ja, ko, es, pt-BR, fr or de. Defaults to en. |
Esempi di codice
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "instagram",
"action": "comment_translations",
"params": {
"url": "https://www.instagram.com/p/DbiL3SDoJzV/",
"comment_ids": [
"18012025586749566"
]
}
}'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
#{ "id": "req_…", "platform": "instagram", "action": "comment_translations", "results": [ { "comment_id": "•••", "text": "El equilibrio y la fuerza de zona media de ese pibe es increíble", "translation": "That kid's balance and core strength are incredible", "source_language": "es", "target_language": "en", "author_username": "p•••l", "posted_at": "2026-08-30T21:47:16+00:00", "url": "https://www.instagram.com/reel/DbiL3SDoJzV/c/18012025586749566/", "post_url": "https://www.instagram.com/reel/DbiL3SDoJzV/", "platform": "instagram" } ], "count": 1, "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.
| Campo | Significato |
|---|---|
comment_id | (comment_translations) The numeric comment ID, one of the comment_ids you passed. |
text | Testo 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). |
translation | The machine translation. Absent when the post has no caption. |
source_language | The detected language code of the original text, such as en; und when it cannot be detected. |
target_language | The language code translated into: the target_language you passed, or en. |
author_username | Username dell'autore (@handle), di solito utilizzabile negli URL. |
posted_at | Data 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. |
url | Link al record sulla piattaforma. |
post_url | Link del post. |
platform | Identificativo 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.