querystringobligatoire
Search query (advertiser name or keyword)
https://api.sandbase.ai/v1/api/tiktok-ads-library/search-adsSearch the TikTok Ad Library for ads matching a query (advertiser name or keyword).
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
Search the TikTok Ad Library for ads matching a query (advertiser name or keyword).
curl -X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "tiktok-ads-library/search-ads", "limit": 12, "query": "nike", "offset": 0, "region": "all", "sort_by": "last_shown_date,desc", "search_id": ""}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query (advertiser name or keyword) |
end_time | integer | No | End of date range as Unix timestamp (seconds). Defaults to now. |
limit | integer | No | Number of results per page (max 50) |
offset | integer | No | Pagination offset (0-based). Requires search_id from a previous response for values > 0. |
region | string | No | Region/country code filter (e.g. 'FR', 'DE', 'GB') or 'all' for all regions. Use get_supported_regions for the full list of accepted codes. One of: all, FR, DE, GB. |
search_id | string | No | Search ID returned from a previous search_ads call. Required when offset > 0 to paginate through results. |
sort_by | string | No | Sort order: 'last_shown_date,desc' or 'last_shown_date,asc' One of: last_shown_date,desc, last_shown_date,asc. |
start_time | integer | No | Start of date range as Unix timestamp (seconds). Defaults to 1 year ago. |
Flat $0.06 per call. Failed calls are not charged.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok-ads-library/search-ads" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 12,
"query": "nike",
"offset": 0,
"region": "all",
"sort_by": "last_shown_date,desc",
"search_id": ""
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
querystringobligatoireSearch query (advertiser name or keyword)
limitintegerNumber of results per page (max 50)
Par défaut : 12
offsetintegerPagination offset (0-based). Requires search_id from a previous response for values > 0.
Par défaut : 0
regionstringRegion/country code filter (e.g. 'FR', 'DE', 'GB') or 'all' for all regions. Use get_supported_regions for the full list of accepted codes.
Par défaut : "all"
Valeurs possibles : all, FR, DE, GB
sort_bystringSort order: 'last_shown_date,desc' or 'last_shown_date,asc'
Par défaut : "last_shown_date,desc"
Valeurs possibles : last_shown_date,desc, last_shown_date,asc
end_timeintegerEnd of date range as Unix timestamp (seconds). Defaults to now.
search_idstringSearch ID returned from a previous search_ads call. Required when offset > 0 to paginate through results.
start_timeintegerStart of date range as Unix timestamp (seconds). Defaults to 1 year ago.
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
TikTok Ads Library Search AdsCette API TikTok Ads Library | $0.06 par appel | JSON |
TikTok Ads Library | $0.03 par appel | JSON |
TikTok Ads Library | $0.03 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/tiktok-ads-library/search-ads 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.
$0.06 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : query (string). Facultatif : limit (integer), offset (integer), region (l’un de all, FR, DE, GB), sort_by (l’un de last_shown_date,desc, last_shown_date,asc), end_time (integer) et search_id (string) et 1 de plus. Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone).
Non. TikTok Ads Library Search Ads 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 Ads Library séparément.