API Weibo Profile featured posts
Stato di salute dell'API
- Operatività nelle ultime 24 ore
- Normale
- Buono / normale
- Disponibile
Ultime 24 ore
Ultimi 30 giorni
Read the Featured tab of a Weibo account's profile by numeric UID: a few popular posts Weibo picked for the user, not in time order and not the latest. Weibo picks them for only some accounts, such as organizations and large media accounts; most personal accounts return an empty list. It returns one page of 5 to 7 posts and does not page.
Invia POST https://api.everyinfra.com/api/v1/social con platform impostato su weibo e action impostato su profile_feed. 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 Weibo Profile featured posts di EveryInfra (weibo/profile_feed).
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 weibo e action su profile_feed, e inserisci i parametri in params.
- Parametri obbligatori:
- user_id: Numeric UID of the Weibo account, or a profile link that contains /u/<UID>. Nicknames are not accepted and are rejected with 422 before you are charged; look them up first with user_search.
- Parametri facoltativi:
- limit: Numero massimo di righe da restituire in questa chiamata: un intero pari o superiore a 1. Se lo ometti, viene applicato il valore predefinito; una chiamata può restituire meno righe.
- Restituisce un elenco di record. Campi principali di ogni record: type, id, mblogid (The post's mblogid (user_articles, prof…), url, text, posted_at, edited_at (When the post was edited (user_articles…), edit_count (How many times the post was edited (use…), device (Client da cui è stato pubblicato il pos…), ip_location (Regione IP mostrata con la risposta (co…), like_count, like_count_label (Like count as Weibo writes it on the pa…); 50 campi in totale, elenco completo su https://api.everyinfra.com/api/v1/social/catalog?platform=weibo.
- Esempio di corpo della richiesta:
{
"platform": "weibo",
"action": "profile_feed",
"params": {
"user_id": "1195054531"
}
}
- 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
#| 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ì | weibo | Identificativo della piattaforma, valore fisso. |
action | body | string | Sì | profile_feed | Identificativo della funzionalità, valore fisso. |
user_id | body.params | string | Sì | - | Numeric UID of the Weibo account, or a profile link that contains /u/<UID>. Nicknames are not accepted and are rejected with 422 before you are charged; look them up first with user_search. It returns the posts of the profile's Featured tab, 5 to 7, and does not page. |
limit | body.params | integer (1–) | No | - | Numero massimo di righe da restituire in questa chiamata: un intero pari o superiore a 1. Se lo ometti, viene applicato il valore predefinito; una chiamata può restituire meno righe. |
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": "weibo",
"action": "profile_feed",
"params": {
"user_id": "1195054531"
}
}'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": "weibo", "action": "profile_feed", "results": [ { "type": …, "id": …, "mblogid": …, "url": …, "text": …, "posted_at": …, "edited_at": …, "edit_count": …, "device": …, "ip_location": …, "like_count": …, "like_count_label": …, "comment_count": …, "comment_count_label": …, "repost_count": …, "repost_count_label": …, "view_count": …, "author_id": …, "author_username": …, "author_name": …, "author_avatar_url": …, "author_verified": …, "author_verified_type": …, "author_verified_reason": …, "author_bio": …, "author_follower_count": …, "author_follower_count_label": …, "author_following_count": …, "author_following_count_label": …, "image_urls": …, "image_count": …, "video_id": …, "video_url": …, "duration_sec": …, "duration_seconds": …, "cover_image_url": …, "play_count": …, "play_count_label": …, "hashtags": …, "mentions": …, "links": …, "links_detail": …, "is_long_text": …, "is_truncated": …, "is_pinned": …, "is_repost": …, "is_paid": …, "is_ad": …, "original_post_id": …, "reposted_post": …, "platform": … } ], "count": …, "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 |
|---|---|
type | Tipo di record; i valori dipendono dalla funzionalità (ad esempio video / image / text). |
id | ID univoco del record sulla piattaforma. È univoco solo all'interno di una piattaforma; gli ID possono ripetersi tra piattaforme diverse. |
mblogid | The post's mblogid (user_articles, profile_feed). |
url | Link al record sulla piattaforma. |
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). |
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. |
edited_at | When the post was edited (user_articles, profile_feed), ISO 8601, UTC. |
edit_count | How many times the post was edited (user_articles, profile_feed). |
device | Client da cui è stato pubblicato il post (ad esempio un client per iPhone). |
ip_location | Regione IP mostrata con la risposta (comment_replies), ad esempio Guangdong; assente quando Weibo non ne mostra nessuna. |
like_count | Like. null significa che la piattaforma o questa funzionalità non li rende noti; non equivale a 0. |
like_count_label | Like count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
comment_count | Commenti. null significa non resi noti, non 0. |
comment_count_label | Comment count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
repost_count | Repost (distinti dai post con citazione). null significa non resi noti. |
repost_count_label | Repost count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
view_count | Numero di letture che Weibo mostra per il post (post_detail); le righe dell'elenco user_posts non lo riportano. |
author_id | ID univoco dell'autore sulla piattaforma. |
author_username | Username dell'autore (@handle), di solito utilizzabile negli URL. |
author_name | Nome visualizzato dell'autore. |
author_avatar_url | URL dell'avatar dell'autore. Non restituito in alcune richieste (search). |
author_verified | Indica se l'autore ha la verifica di Weibo (il badge V). Non restituito in alcune richieste (search). |
author_verified_type | Verification type of the author (user_articles, profile_feed). |
author_verified_reason | Descrizione della verifica (ad esempio un ruolo in un'azienda); usala per capire cosa rappresenta un account verificato. Non restituita in alcune richieste (search, user_posts). |
author_bio | Biografia dell'autore. Non restituita in alcune richieste (search, user_posts). |
author_follower_count | Numero di follower dell'autore. Non restituito in alcune richieste (search, user_posts). In video arriva solo quando url è un link al video o un ID 1034:, ed è approssimativo. |
author_follower_count_label | Author's follower count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
author_following_count | Numero di account seguiti dall'autore. Non restituito in alcune richieste (search, user_posts). |
author_following_count_label | Author's following count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
image_urls | Array di link alle immagini nell'ordine di visualizzazione della piattaforma; assente se non ci sono immagini. |
image_count | Number of images in the post (user_articles, profile_feed). |
video_id | ID del video (video, collection_videos). |
video_url | Link al video del post. |
duration_sec | Durata del video in secondi (post video su post_detail / user_posts, e video / collection_videos). |
duration_seconds | Durata in secondi. null per i contenuti che non sono video o audio. |
cover_image_url | Immagine di copertina. |
play_count | Numero di riproduzioni di un video (video, collection_videos). Esatto in collection_videos e in video quando cerchi il post tramite link o ID del post; approssimativo in video quando usi un link al video o un ID 1034:, perché Weibo mostra un valore arrotondato. Non coincide con view_count, il numero di letture di un post. |
play_count_label | Video play count as Weibo writes it on the page, kept as text, for example the Chinese for “1 million+” or “23.798 million” (user_articles, profile_feed). |
hashtags | Hashtag presenti nel testo, in ordine di apparizione; assente se non ce ne sono. |
mentions | Accounts mentioned with @ in the post (user_articles, profile_feed). |
links | Link nella pagina del profilo (user_about), un array. |
links_detail | Details of each link in the post (user_articles, profile_feed): [{url, short_url, title}]. |
is_long_text | Indica se il post è un post lungo (post_detail / user_posts). Su user_posts, il testo di un post lungo contiene solo l'inizio (circa 140 caratteri). |
is_truncated | Whether text is cut (user_articles, profile_feed): when true, get the full text with post_detail using id. |
is_pinned | Whether the post is pinned (user_articles, profile_feed). |
is_repost | Indica se il post è una ricondivisione. |
is_paid | Whether the post is a paid post (user_articles, profile_feed). |
is_ad | Whether the post is an ad (user_articles, profile_feed). |
original_post_id | Per una ricondivisione, l'ID del post originale (post_detail / user_posts); passalo come url a post_detail per leggere l'originale. Assente quando il post non è una ricondivisione. |
reposted_post | The post that was reposted (user_articles, profile_feed): the same shape as a row, and it does not nest another reposted 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.