Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

TikTok Gift Names by IDs

Docs 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.

Prix
$0.025USD / appel
Méthode
POST
Réponse
JSON
Paramètres
1 obligatoires · 0 facultatifs

Bac à sable

Entrée
Gift ID list, recommend 50/call for best value ($0.025), auto-process first 50 if more than 50
SortieExemple
Réponseoutputs · 495 B · 29 lignes
[
  {
    "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
    }
  }
]

Exemples

Sélectionnez un exemple pour charger ses entrées et son résultat dans le playground.

README de l'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.

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
TikTok$0.025 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.001 par appelJSON
TikTok$0.05 par appelJSON

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

Questions

FAQ

Comment utiliser l’API TikTok Gift Names by IDs ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/tiktok/web/gift-names-by-ids avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API TikTok Gift Names by IDs ?

$0.025 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API TikTok Gift Names by IDs accepte-t-elle ?

Obligatoire : gift_ids (array). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API TikTok Gift Names by IDs ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.

Ai-je besoin d’un compte développeur ou d’une clé API TikTok ?

Non. TikTok Gift Names by IDs fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API TikTok séparément.