YepAPI
TikTok API

TikTok Search

Search TikTok for videos matching a keyword query.

POST/v1/tiktok/search
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/tiktok/search', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ keywords: 'cooking recipes' }),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/tiktok/search \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords": "cooking recipes"}'

Request Body

ParameterTypeRequiredDescriptionDefault
keywordsstringYesSearch query
cursorstringNoPagination cursor from previous response
countnumberNoNumber of results to return20

Response

{
  "ok": true,
  "data": {
    "has_more": true,
    "cursor": "20",
    "videos": [
      {
        "video_id": "7356291048572839174",
        "description": "Easy 15-minute pasta recipe #cooking #recipes #foodtok",
        "create_time": 1712345678,
        "author": {
          "unique_id": "chefmaria",
          "nickname": "Chef Maria",
          "avatar": "https://p16-sign.tiktokcdn.com/..."
        },
        "statistics": {
          "play_count": 2450000,
          "digg_count": 185000,
          "comment_count": 3200,
          "share_count": 12500
        },
        "video": {
          "duration": 45,
          "cover": "https://p16-sign.tiktokcdn.com/...",
          "play_addr": "https://v16-webapp.tiktok.com/..."
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.has_morebooleanWhether more results are available
data.cursorstringCursor for fetching the next page
data.videosobject[]Array of video results
data.videos[].video_idstringUnique TikTok video identifier
data.videos[].descriptionstringVideo caption text
data.videos[].create_timenumberUnix timestamp of when the video was posted
data.videos[].authorobjectVideo author information
data.videos[].statisticsobjectEngagement metrics (plays, likes, comments, shares)
data.videos[].videoobjectVideo media details (duration, cover image, play URL)

Use the cursor value from the response to paginate through results.

On this page