TikTok Search
POST /api/v1/tiktok/search
Search TikTok for videos by keyword or hashtag with metrics, music details, and media URLs.
Overview
Search TikTok for videos by keyword or hashtag with metrics, music details, and media URLs.
POST /api/v1/tiktok/search
Method: POST Path: /api/v1/tiktok/search Category: Social Media
Request Parameters
Endpoint Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
| limit | integer | Optional | Number of video results to return. |
| query | string | Required | Search keyword, hashtag or search URL (e.g. cooking or |
Request Example
TikTok Search Request Examples
curl -X POST "https://api.dataguru.cc/api/v1/tiktok/search" \ -H "Authorization: Api-Key YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"limit": "5", "query": "example"}'
Response Example
200 OK
Typical 200 OK JSON response structure with envelope metadata.
{ "tiktok_search": { "query": "string", "search_url": "https://example.com/...", "total_results": 0, "results": [ { "video_id": "1234567890", "video_url": "https://example.com/...", "description": "string", "created_at": "2026-01-01T12:00:00Z", "music_id": "1234567890", "music_title": "string", "music_author": "string", "music_url": "https://example.com/...", "duration": 0, "cover_image_url": "https://example.com/...", "dynamic_cover_url": "https://example.com/...", "download_url": "https://example.com/...", "play_url": "https://example.com/...", "view_count": 0, "like_count": 0, "comment_count": 0, "share_count": 0, "collect_save_count": 0 } ] }, "_metadata": { "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e", "execution_time_ms": 842, "endpoint": "TikTok Search", "mode": "live", "format": "json", "timestamp": "2026-01-01T12:00:00+00:00" } }
Response Schema
Fields returned in a successful response. Nested fields use dot notation and `[]` marks items of a list. Fields that are not required can be missing or `null` when the source does not provide them. Every response also includes a `_metadata` block.
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
| tiktok_search | object | Yes | Search results container for TikTok query. |
| tiktok_search.query | string | Yes | Cleaned search term or query string. |
| tiktok_search.search_url | string | Yes | Canonical TikTok search URL. |
| tiktok_search.total_results | integer | Yes | Count of video search results returned. |
| tiktok_search.results | array<object> | Yes | List of video items matching the search query. |
| tiktok_search.results[].video_id | string | Yes | Numeric video ID. |
| tiktok_search.results[].video_url | string | Yes | Full TikTok post URL link. |
| tiktok_search.results[].description | string | Yes | Video caption text. |
| tiktok_search.results[].created_at | string | null | Yes | Video creation timestamp in UTC ISO-8601 format. |
| tiktok_search.results[].music_id | string | null | No | Background music ID. |
| tiktok_search.results[].music_title | string | null | No | Music track title. |
| tiktok_search.results[].music_author | string | null | No | Music artist name. |
| tiktok_search.results[].music_url | string | null | No | Direct audio stream URL. |
| tiktok_search.results[].duration | integer | null | Yes | Video duration in seconds. |
| tiktok_search.results[].cover_image_url | string | Yes | Static video thumbnail poster URL. |
| tiktok_search.results[].dynamic_cover_url | string | null | No | Animated dynamic cover preview URL. |
| tiktok_search.results[].download_url | string | null | No | Direct downloadable video stream URL. |
| tiktok_search.results[].play_url | string | Yes | Direct streaming video URL. |
| tiktok_search.results[].view_count | integer | null | No | Total plays / views count. |
| tiktok_search.results[].like_count | integer | null | No | Total likes count. |
| tiktok_search.results[].comment_count | integer | null | No | Total comments count. |
| tiktok_search.results[].share_count | integer | null | No | Total shares count. |
| tiktok_search.results[].collect_save_count | integer | null | No | Total favorites / bookmarks count. |
Asynchronous Requests
Long-running requests can be processed in the background. Add `?async=true` (or the `Prefer: respond-async` header) to receive a `job_id` immediately, then poll the job until its status is `COMPLETED`.
Async Workflow
curl -X POST "https://api.dataguru.cc/api/v1/tiktok/search?async=true" \ -H "Authorization: Api-Key YOUR_API_KEY" # 202 Accepted { "success": true, "status": "SUBMITTED", "job_id": "0ca215ce-244f-4b28-b481-dc1b551983c8", "status_url": "/api/v1/jobs/0ca215ce-244f-4b28-b481-dc1b551983c8/" }
Batch Processing
To run many requests at half price, upload them as a CSV file: one row per request, with the parameter names above as the header row. Rows run in the background within 24 hours (up to 7 days for large files) and each successful row costs 50% of the price below. Poll /api/v1/batches/{batch_id}/ for progress and download results.json when it has finished. See the Batch Processing guide for details.
Batch Workflow
query,limit example,5
Pricing & Rate Limits
Endpoint Pricing
$0.0009 / per successful request (USD)
Consumed per successful call: 1 request unit(s), 1 credit(s).
Endpoint Rate Limits
Common Errors
Common HTTP Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | A required parameter is missing or malformed. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | INSUFFICIENT_BALANCE | Your balance cannot cover this request. |
| 403 | ENDPOINT_DISABLED | This endpoint is currently unavailable. |
| 405 | METHOD_NOT_ALLOWED | The endpoint was called with the wrong HTTP method. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests. See the Retry-After header. |
| 502 | PROVIDER_ERROR | The upstream data source failed. Retry with exponential backoff. |