API Hongguo Short Drama Suggerimenti di ricerca
Stato di salute dell'API
- Operatività nelle ultime 24 ore
- Normale
- Buono / normale
- Disponibile
Ultime 24 ore
Ultimi 30 giorni
Get the suggestions the Hongguo search box shows for what has been typed in keyword, even a single character, usually about 10 in the platform's order with rank from 1. type tells a series title, which also carries series_id, title, cover_url, episode_count, hot_score and is_finished, from a plain search term, a category or a performer with performer_id. There is no paging.
Invia POST https://api.everyinfra.com/api/v1/social con platform impostato su hongguo e action impostato su search_suggest. Prezzo $1.6 per 1.000 richieste ($0.001597 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 Hongguo Short Drama Suggerimenti di ricerca di EveryInfra (hongguo/search_suggest).
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 hongguo e action su search_suggest, e inserisci i parametri in params.
- Parametri obbligatori:
- keyword: Search words: a series title, a theme or any keyword, up to 50 characters. On search_suggest it can be just the first characters someone has typed into the search box.
- Parametri facoltativi:
- limit: Positive integer (≥1): the maximum number of results to return; omit it to get every result from this call. Setting it only trims the response to at most this many and never fetches more.
- Restituisce un elenco di record. Campi principali di ogni record: text (The suggestion text (search_suggest)), type (Kind of suggestion (search_suggest): se…), series_id (ID of the suggested series (search_sugg…), performer_id (ID of the suggested performer (search_s…), title, cover_url (Link to the cover image), episode_count (Total number of episodes), hot_score (Heat value, which the platform shows in…), hot_score_label (The heat value as written on the page,…), is_finished (Whether the series has finished releasi…), rank (Position: the place on the chart on top…), collected_at (When this data was collected (ISO 8601,…).
- Esempio di corpo della richiesta:
{
"platform": "hongguo",
"action": "search_suggest",
"params": {
"keyword": "王"
}
}
- Prezzo: $1.6 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ì | hongguo | Identificativo della piattaforma, valore fisso. |
action | body | string | Sì | search_suggest | Identificativo della funzionalità, valore fisso. |
keyword | body.params | string | Sì | - | Search words: a series title, a theme or any keyword, up to 50 characters. On search_suggest it can be just the first characters someone has typed into the search box. |
limit | body.params | integer (1–) | No | - | Positive integer (≥1): the maximum number of results to return; omit it to get every result from this call. Setting it only trims the response to at most this many and never fetches more; billing is the same with or without limit, whatever the value. |
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": "hongguo",
"action": "search_suggest",
"params": {
"keyword": "王"
}
}'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": "hongguo", "action": "search_suggest", "results": [ { "text": …, "type": …, "series_id": …, "performer_id": …, "title": …, "cover_url": …, "episode_count": …, "hot_score": …, "hot_score_label": …, "is_finished": …, "rank": …, "collected_at": …, "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 |
|---|---|
text | The suggestion text (search_suggest). |
type | Kind of suggestion (search_suggest): series is a series title, query a plain search term, category a category and performer a performer; the platform may add other values. |
series_id | ID of the suggested series (search_suggest, when type is series). |
performer_id | ID of the suggested performer (search_suggest, when type is performer). |
title | Titolo. null quando la piattaforma non prevede titoli (ad esempio post di solo testo). |
cover_url | Link to the cover image. |
episode_count | Total number of episodes; absent for series not yet released. |
hot_score | Heat value, which the platform shows in place of a play count; Hongguo does not publish play counts. |
hot_score_label | The heat value as written on the page, in Chinese number units. |
is_finished | Whether the series has finished releasing; absent on toplist without exact. |
rank | Position: the place on the chart on toplist, the position in the results on search and search_suggest; from 1. |
collected_at | When this data was collected (ISO 8601, UTC). |
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.