Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

TikTok Gift Names by IDs

Dokumentasi API
https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-ids

Returns gift names for a batch of TikTok gift identifiers. Provide a list of gift IDs to look up their corresponding gift labels.

Harga
$0.025USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 0 opsional

Playground

Input
Gift ID list, recommend 50/call for best value ($0.025), auto-process first 50 if more than 50
OutputContoh
Responsoutputs · 495 B · 29 baris
[
  {
    "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
    }
  }
]

Contoh

Pilih contoh untuk memuat input dan hasilnya ke playground.

README API

TikTok Gift Names by IDs API

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.

Use cases

  • Turn raw gift IDs in live stream gift event logs into readable gift names.
  • Build a local lookup table of TikTok gift IDs and names.
  • Check which gift IDs in a stored dataset have no known name.
  • Label gift columns in a report on live stream gifting.

Request

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.

Parameters

NameTypeRequiredDescription
gift_idsarrayYesGift ID list, recommend 50/call for best value ($0.025), auto-process first 50 if more than 50

Example response

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
}

Response fields

FieldMeaning
results[].gift_idThe gift ID from your request that this row answers.
results[].gift_nameThe name of the gift. The sample values are in Chinese, such as 鞭炮 and 红包.
results[].codeResult code for this single lookup. It is 0 on every row in the sample, where all IDs returned a name.
found / not_foundNumber of IDs that returned a name and number of IDs that did not.
original_count / totalCount of IDs in the request and total count of results. Both are 3 in the sample.
truncatedBoolean flag. It is false in the sample.
messageText message about the call. It is null in the sample.

Notes

  • Send each ID as a string, for example "10001". The gift_ids list accepts 1 to 1000 items.
  • If you send more than 50 IDs, only the first 50 are processed.
  • Compare found, not_found and truncated with your request to see whether any IDs were unresolved or skipped.
  • To look up one ID, use TikTok Gift Name by ID.

Pricing

$0.025 per successful call. Failed calls are not charged.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
TikTok$0.025 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.001 per panggilanJSON
TikTok$0.05 per panggilanJSON

Panduan:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Pertanyaan

FAQ

Bagaimana cara menggunakan API TikTok Gift Names by IDs?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-ids dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API TikTok Gift Names by IDs?

$0.025 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API TikTok Gift Names by IDs?

Wajib: gift_ids (array). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API TikTok Gift Names by IDs?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API TikTok?

Tidak. TikTok Gift Names by IDs berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API TikTok secara terpisah.