Hongguo Short Drama検索候補API
APIの稼働状況
- 24時間の稼働状況
- 正常
- 良好/正常
- 利用可能
過去24時間
過去30日間
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.
POST https://api.everyinfra.com/api/v1/socialを送信し、platformにhongguo、actionにsearch_suggestを指定します。 料金は1,000リクエストあたり$1.6(1回あたり$0.001597)です。失敗した呼び出しと空の結果には課金されません。 同期処理です。時間のかかるジョブでは、ボディに"mode": "async"を追加し、job_idを取得してポーリングしてください。
AIプロンプト
#EveryInfraのHongguo Short Drama 検索候補エンドポイント(hongguo/search_suggest)を使ったデータ収集スクリプトの作成を手伝ってください。
エンドポイントの仕組み:
- リクエスト:ヘッダーにAuthorization: Bearer <API key>を指定して、https://api.everyinfra.com/api/v1/socialにPOSTします。APIキーは環境変数EVERYINFRA_API_KEYから読み込み、ハードコードしないでください。
- リクエストボディでplatformにhongguo、actionにsearch_suggestを指定し、パラメータはparamsの中に入れます。
- 必須パラメータ:
- 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.
- 任意パラメータ:
- 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.
- レコードのリストを返します。各レコードの主なフィールド: 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,…).
- リクエストボディの例:
{
"platform": "hongguo",
"action": "search_suggest",
"params": {
"keyword": "王"
}
}
- 料金:1,000リクエストあたり$1.6。失敗時および結果が空の場合は課金されません。
- 対象が数十〜数百件ある場合は、ボディに"mode": "async"を追加します。すぐにjob_idが返されるので、GET https://api.everyinfra.com/api/v1/jobs/{job_id}をポーリングして結果を取得します。
- 422の場合は、エラーに含まれる推奨パラメータ名と指定可能な値を使ってリクエストを修正します。429または503の場合は、Retry-Afterの指定に従って待ってから再試行します。
コードを書く前に、必要な対象とその件数、必要なフィールド、希望する出力形式を私に質問してください。そのうえで、計画と概算費用を私に確認してください。リクエストパラメータ
#| 名前 | 場所 | 型 | 必須 | デフォルト | 説明 |
|---|---|---|---|---|---|
Authorization | header | string | はい | - | Bearerの後にAPIキーを続けます。APIキーはコンソールで作成してください。URLやコードリポジトリには絶対に含めないでください。 |
platform | body | string | はい | hongguo | プラットフォームの識別子です。値は固定です。 |
action | body | string | はい | search_suggest | 機能の識別子です。値は固定です。 |
keyword | body.params | string | はい | - | 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–) | いいえ | - | 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. |
コードサンプル
#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": "王"
}
}'OpenAPI定義(JSON)サンプルは環境変数EVERYINFRA_API_KEYからAPIキーを読み込みます。コピーしたコードにAPIキーが含まれることはありません。
レスポンス例
#{ "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": { … }}
レスポンスフィールド
#業務データはresultsに含まれます。この表はレコードに含まれうるフィールドの一覧です。プラットフォームに表示されない値を作り出すことはありません。
| フィールド | 意味 |
|---|---|
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 | タイトルです。プラットフォームにタイトルがない場合(テキストのみの投稿など)はnullになります。 |
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 | 取得元プラットフォームの識別子で、リクエストのplatformと同じです(例:xiaohongshu、tiktok)。 |
エラーと課金
#- 401
- キーが未指定か無効です。
- 402
- 残高が不足しています。先にチャージしてください。
- 422
- パラメータ名または値が無効です。エラーに含まれる候補を参考に修正してください。課金はされません。
- 429
- 1分あたりのリクエスト上限に達しました。Retry-Afterの指定に従って待ってから再試行してください。
- 503
- 処理を完了できませんでした。保留中の請求額は残高に戻されます。結果が不明な場合は、再試行する前に確認してください。
- 200(空)
- データがありません。課金はされません。