Social Fetch
TikTok

Search TikTok videos

Search TikTok videos by keyword.

Operation

GET/v1/tiktok/search
Cost: 1 credit

Headers

x-api-keystringrequired(header)

API key (`sfk_...`)

Parameters

querystringrequired(query)

Search query text for TikTok videos.

min 1 chars · max 512 chars

datePostedstring(query)

Optional upload date filter for video results.

one of: yesterday, this-week, this-month, last-3-months, last-6-months, all-time

sortBystring(query)

Optional sort order for search results.

one of: relevance, most-liked, date-posted

regionstring(query)

Optional two-letter region code for localized search results.

min 2 chars · max 2 chars

cursorstring(query)

Opaque pagination cursor returned by a previous response.

min 1 chars

trimboolean(query)

When true, returns a smaller response with fewer fields.

Response fields

data
objectrequired

Endpoint-specific response payload.

dataquery
stringrequired

Search query that was evaluated for this response.

datavideos
arrayrequired

Matching TikTok videos. TikTok may return the same video more than once for some searches.

datavideos[]id
stringrequired

TikTok video identifier.

min 1 chars

datavideos[]caption
stringrequirednullable

Caption text shown for the TikTok video.

datavideos[]createdAt
stringrequirednullable

ISO-8601 timestamp when the video was created, when available.

datavideos[]url
stringrequirednullable

Canonical public TikTok URL for the video.

datavideos[]thumbnailUrl
stringrequirednullable

Best available thumbnail or cover image URL for the video.

datavideos[]durationMs
integerrequirednullable

Video duration in milliseconds, when available.

≥ 0

datavideos[]pinned
booleanrequired

Whether the video is pinned on the profile.

datavideos[]isAd
booleanrequired

Whether TikTok marks the video as an ad.

datavideos[]stats
objectrequired

Engagement metrics for the video.

datavideos[]statsviews
integerrequired

View count reported by TikTok for the video.

≥ 0

datavideos[]statslikes
integerrequired

Like count reported by TikTok for the video.

≥ 0

datavideos[]statscomments
integerrequired

Comment count reported by TikTok for the video.

≥ 0

datavideos[]statsshares
integerrequired

Share count reported by TikTok for the video.

≥ 0

datavideos[]statssaves
integerrequired

Save or collection count reported by TikTok for the video.

≥ 0

datavideos[]media
objectrequired

Download-related media URLs for the video.

datavideos[]mediadownloadUrl
stringrequirednullable

Best available downloadable video URL, usually with watermark.

datavideos[]mediadownloadWithoutWatermarkUrl
stringrequirednullable

Best available downloadable video URL without watermark.

datavideos[]details
object

Additional TikTok-native fields for this video (for example author, music, challenges, and full `video` and `statistics` objects). Keys that only duplicate the top-level fields are omitted.

datapage
objectrequired

Pagination state for the current response.

datapagenextCursor
stringrequirednullable

Cursor to pass in the next request when more videos are available.

datapagehasMore
booleanrequired

Whether another page of videos is available.

meta
objectrequired

Metadata describing the request and billing outcome.

metarequestId
stringrequired

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integerrequired

Credits charged for this request.

≥ 0

metaversion
stringrequired

Public API version that served the response.

one of: v1

Code example

Responses

Video search results for the requested query.

Error codes

bad_requestinsufficient_creditsinternal_errorlookup_failedtemporarily_unavailableunauthorized

On this page