API TikTok Photo post images

POST

Stato di salute dell'API

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

Ultime 24 ore

Ultimi 30 giorni

Get every image of a TikTok photo post (photo mode or carousel) from its url, in the post's order: images with each image's url, width and height in pixels, plus image_urls, the same links as a list. The row also carries the post's text, posted_at, counts, author fields and background music fields. Image links expire, so download the ones you keep soon. A video, a missing post or a deleted post returns 503 and is not charged; use video for videos.

Invia POST https://api.everyinfra.com/api/v1/social con platform impostato su tiktok e action impostato su photos. Prezzo $0.56 per 1.000 richieste ($0.000556 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 TikTok Photo post images di EveryInfra (tiktok/photos).

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 tiktok e action su photos, e inserisci i parametri in params.
- Parametri obbligatori:
  - url: A TikTok photo post link with the post ID, such as https://www.tiktok.com/@<user>/photo/<ID> (the /video/<ID> form works too), or the 15 to 21 digit post ID.
- Restituisce un oggetto. Campi principali: id, url, images (Every image of a photo post (photos), i…), image_urls (Link to each image in a photo (carousel…), posted_at, text, language, location, media_type (Post type (photos): always photo), author_username, author_name, author_bio (La bio del profilo dell'autore); 59 campi in totale, elenco completo su https://api.everyinfra.com/api/v1/social/catalog?platform=tiktok.
- Esempio di corpo della richiesta:
{
  "platform": "tiktok",
  "action": "photos",
  "params": {
    "url": "https://www.tiktok.com/@tiktok/photo/7701866987609197837"
  }
}
- Prezzo: $0.56 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ìtiktokIdentificativo della piattaforma, valore fisso.
actionbodystringSìphotosIdentificativo della funzionalità, valore fisso.
urlbody.paramsstringSì-A TikTok photo post link with the post ID, such as https://www.tiktok.com/@<user>/photo/<ID> (the /video/<ID> form works too), or the 15 to 21 digit post ID. Short links such as vm.tiktok.com are not recognized, and a value in the wrong form is rejected (422) before you are charged.

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": "tiktok",
  "action": "photos",
  "params": {
    "url": "https://www.tiktok.com/@tiktok/photo/7701866987609197837"
  }
}'

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

#
Non è ancora disponibile una risposta di esempio per questi parametri. Questa anteprima mostra la struttura e i campi della risposta secondo la definizione dell'API, con … come segnaposto; non è il risultato di una chiamata reale.
json
{  "id": "req_…",  "platform": "tiktok",  "action": "photos",  "results": {    "id": …,    "url": …,    "images": …,    "image_urls": …,    "posted_at": …,    "text": …,    "language": …,    "location": …,    "media_type": …,    "author_username": …,    "author_name": …,    "author_bio": …,    "music_title": …,    "music_author": …,    "author_id": …,    "author_sec_uid": …,    "music_id": …,    "author_url": …,    "author_avatar_url": …,    "cover_url": …,    "music_url": …,    "music_cover_url": …,    "image_count": …,    "view_count": …,    "like_count": …,    "comment_count": …,    "share_count": …,    "bookmark_count": …,    "repost_count": …,    "author_follower_count": …,    "author_following_count": …,    "author_like_count": …,    "author_video_count": …,    "duration_sec": …,    "duration_seconds": …,    "music_duration_sec": …,    "category_type": …,    "author_is_verified": …,    "author_is_private": …,    "author_is_seller": …,    "music_is_original": …,    "share_enabled": …,    "view_count_estimated": …,    "like_count_estimated": …,    "comment_count_estimated": …,    "share_count_estimated": …,    "author_follower_count_estimated": …,    "author_following_count_estimated": …,    "author_like_count_estimated": …,    "author_video_count_estimated": …,    "is_ad": …,    "is_private": …,    "is_aigc": …,    "comments_disabled": …,    "duet_enabled": …,    "stitch_enabled": …,    "hashtags": …,    "mentions": …,    "suggested_words": …,    "platform": …  },  "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.
imagesEvery image of a photo post (photos), in the post's order: [{url, width, height}], with width and height in pixels. Image links expire, so download the ones you keep soon.
image_urlsLink to each image in a photo (carousel) post (video_download, photos; in photos the same images as images, in the post's order); links to all of a product's main images (shop_search, shop_category_products, shop_products); on shop_search the first is the same as cover_url.
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.
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).
languageCodice della lingua del contenuto (ad esempio zh, en) secondo la piattaforma; può essere errato.
locationDescrizione della località passata così com'è; il formato varia in base alla piattaforma.
media_typePost type (photos): always photo.
author_usernameUsername dell'autore (@handle), di solito utilizzabile negli URL.
author_nameNome visualizzato dell'autore.
author_bioLa bio del profilo dell'autore; non restituita in alcune richieste e può essere assente nei risultati di user_videos.
music_titleTitle of the background music (photos).
music_authorName of the background music's author (photos).
author_idID univoco dell'autore sulla piattaforma.
author_sec_uidsecUid dell'account dell'autore della musica (music_detail); solo per i suoni originali.
music_idID of the post's background music (photos).
author_urlLink al profilo dell'autore sulla piattaforma.
author_avatar_urlLink all'immagine dell'avatar dell'autore (nella maggior parte delle piattaforme firmato e con scadenza).
cover_urlLink to the post's cover image (photos).
music_urlLink to the background music (photos).
music_cover_urlLink to the background music's cover image (photos).
image_countNumber of images in the photo post (photos), the same as the length of images.
view_countVisualizzazioni o riproduzioni. null significa non rese note, non 0.
like_countLike. null significa che la piattaforma o questa funzionalità non li rende noti; non equivale a 0.
comment_countCommenti. null significa non resi noti, non 0.
share_countCondivisioni. null significa non rese note, non 0.
bookmark_countNumber of bookmarks (photos).
repost_countRepost (distinti dai post con citazione). null significa non resi noti.
author_follower_countNumero di follower dell'autore. null significa non reso noto.
author_following_countQuanti account segue l'autore; non restituito in alcune richieste.
author_like_countTotale dei Mi piace ricevuti dal profilo dell'autore; non restituito in alcune richieste.
author_video_countNumero totale di video pubblicati dall'autore; non restituito in alcune richieste.
duration_secDurata in secondi, lo stesso valore di duration_seconds (vengono restituiti entrambi i nomi): la lunghezza del video nelle righe dei video, la lunghezza del suono in music_search, music_chart e music_detail.
duration_secondsDurata in secondi. null per i contenuti che non sono video o audio.
music_duration_secLength of the background music in seconds (photos).
category_typeThe post's category type (photos).
author_is_verifiedIndica se l'autore ha il badge di verifica; non restituito in alcune richieste.
author_is_privateIndica se l'account dell'autore è privato.
author_is_sellerIndica se l'autore è un venditore TikTok Shop. Di solito assente nei risultati di user_videos.
music_is_originalWhether the background music is an original sound, the creator's own audio (photos).
share_enabledWhether the post can be shared (photos).
view_count_estimatedWhether view_count is an approximate figure (photos): from 10,000 up, TikTok's page shows a rounded count (35.2K is stored as 35200) and this is true.
like_count_estimatedWhether like_count is an approximate figure (photos), by the same rule as view_count_estimated.
comment_count_estimatedWhether comment_count is an approximate figure (photos), by the same rule as view_count_estimated.
share_count_estimatedWhether share_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_follower_count_estimatedWhether author_follower_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_following_count_estimatedWhether author_following_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_like_count_estimatedWhether author_like_count is an approximate figure (photos), by the same rule as view_count_estimated.
author_video_count_estimatedWhether author_video_count is an approximate figure (photos), by the same rule as view_count_estimated.
is_adIndica se il video è una pubblicità. Di solito assente nei risultati di ricerca; può essere assente nei risultati di user_videos.
is_privateIndica se l'account è privato.
is_aigcWhether the post is AI-generated content (photos).
comments_disabledWhether comments are turned off on the post (photos).
duet_enabledWhether Duet is allowed on the post (photos).
stitch_enabledWhether Stitch is allowed on the post (photos).
hashtagsHashtag presenti nel testo, in ordine di apparizione; assente se non ce ne sono.
mentionsAccounts mentioned with @ in the post (photos).
suggested_wordsSuggested words on the post (photos).
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