Skip to main content

What it does

Searches TikTok for videos matching a query. Supports filtering by publish time and sorting by relevance, likes, or date.

Tool details

FieldValue
Tool nametiktok_search_videos
PlatformTikTok
REST endpointGET /v1/tiktok/search/videos
Result typeCollection tool

Parameters

ParameterTypeRequiredDescription
querystringYesSearch query
cursorstringNoPagination cursor Default: 0.
countintegerNoNumber of videos to fetch (maximum: 100, actual results may vary) Default: 50.
orderstringNoSort order: relevance (default), most-liked, or date-posted Default: relevance. Allowed values: relevance, most-liked, date-posted.
publishedstringNoFilter by publish time: all-time (default), yesterday, this-week, this-month, last-3-months, or last-6-months Default: all-time. Allowed values: all-time, yesterday, this-week, this-month, last-3-months, last-6-months.
projection_presetstringNoDefaults to minimal. Allowed values: full, minimal, identity, engagement, content.
data_fieldsstring[]NoAdds top-level keys from data on top of the selected projection_preset.
item_fieldsstring[]NoAdds keys from data.orderedItems[] on top of the selected projection_preset.

Example

{
  "name": "tiktok_search_videos",
  "arguments": {
    "query": "cooking",
    "count": 50,
    "projection_preset": "minimal",
    "data_fields": [
      "orderedItems",
      "nextCursor",
      "cursor",
      "itemCount"
    ],
    "item_fields": [
      "entityId",
      "published",
      "content",
      "url",
      "viewCount"
    ]
  }
}

Available data fields

  • @context
  • type
  • partOf
  • totalItems
  • cursor
  • nextCursor
  • next
  • itemCount
  • orderedItems

Available item fields

  • type
  • id
  • url
  • entityId
  • content
  • published
  • duration
  • viewCount
  • likeCount
  • commentCount
  • repostCount
  • shareCount
  • saveCount
  • language
  • isSponsored
  • location
  • tag
  • attributedTo
  • attachment
  • image
  • preview
  • audio

Response notes

Successful calls return a JSON object with a top-level data field and, when available, metadata.creditsUsed and metadata.creditsRemaining. See response format, pagination, and credits.