gift_idsarray必須
Gift ID list, recommend 50/call for best value ($0.025), auto-process first 50 if more than 50
https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-idsReturns gift names for a batch of TikTok gift identifiers. Provide a list of gift IDs to look up their corresponding gift labels.
[
{
"data": {
"found": 3,
"message": null,
"not_found": 0,
"original_count": 3,
"results": [
{
"code": 0,
"gift_id": "10001",
"gift_name": "鞭炮"
},
{
"code": 0,
"gift_id": "10002",
"gift_name": "红包"
},
{
"code": 0,
"gift_id": "10003",
"gift_name": "龙年幸运福袋"
}
],
"total": 3,
"truncated": false
}
}
]例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
Returns the gift name for each TikTok gift ID in a list. You send gift_ids as an array of strings and get one result row per ID, plus counts for found and missing IDs.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-ids" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"gift_ids": ["10001", "10002", "10003"]}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
gift_ids | array | Yes | Gift ID list, recommend 50/call for best value ($0.025), auto-process first 50 if more than 50 |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"found": 3,
"message": null,
"not_found": 0,
"original_count": 3,
"results": [
{
"code": 0,
"gift_id": "10001",
"gift_name": "鞭炮"
}
],
"total": 3,
"truncated": false
}
| Field | Meaning |
|---|---|
results[].gift_id | The gift ID from your request that this row answers. |
results[].gift_name | The name of the gift. The sample values are in Chinese, such as 鞭炮 and 红包. |
results[].code | Result code for this single lookup. It is 0 on every row in the sample, where all IDs returned a name. |
found / not_found | Number of IDs that returned a name and number of IDs that did not. |
original_count / total | Count of IDs in the request and total count of results. Both are 3 in the sample. |
truncated | Boolean flag. It is false in the sample. |
message | Text message about the call. It is null in the sample. |
"10001". The gift_ids list accepts 1 to 1000 items.found, not_found and truncated with your request to see whether any IDs were unresolved or skipped.$0.025 per successful call. Failed calls are not charged.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-ids" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"gift_ids": [
"10001",
"10002",
"10003"
]
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
gift_idsarray必須Gift ID list, recommend 50/call for best value ($0.025), auto-process first 50 if more than 50
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
[
{
"data": {
"found": 3,
"message": null,
"not_found": 0,
"original_count": 3,
"results": [
{
"code": 0,
"gift_id": "10001",
"gift_name": "鞭炮"
},
{
"code": 0,
"gift_id": "10002",
"gift_name": "红包"
},
{
"code": 0,
"gift_id": "10003",
"gift_name": "龙年幸运福袋"
}
],
"total": 3,
"truncated": false
}
}
]さらに探索
| API | 価格 | レスポンス |
|---|---|---|
TikTok Gift Names by IDsこの API TikTok | $0.025 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.05 / 回 | JSON |
ガイド:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-ids に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.025、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: gift_ids (array)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。TikTok Gift Names by IDs は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。TikTok の API アクセスを別途申請する必要はありません。