YepAPI
TikTok API

Search Photos

Search TikTok for photo posts matching a keyword query.

POST/v1/tiktok/search-photo
$0.01/call

Usage

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

Request Body

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

Response

{
  "ok": true,
  "data": {
    "has_more": true,
    "cursor": "20",
    "photos": [
      {
        "video_id": "7389012345678901234",
        "description": "Hidden gems in Bali #travel #photography",
        "create_time": 1712456789,
        "author": {
          "unique_id": "traveler_jake",
          "nickname": "Jake Travels",
          "avatar": "https://p16-sign.tiktokcdn.com/..."
        },
        "images": [
          "https://p16-sign.tiktokcdn.com/image1.jpg",
          "https://p16-sign.tiktokcdn.com/image2.jpg"
        ],
        "statistics": {
          "digg_count": 45000,
          "comment_count": 890,
          "share_count": 2300
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.has_morebooleanWhether more results are available
data.cursorstringCursor for fetching the next page
data.photosobject[]Array of photo post results
data.photos[].video_idstringUnique post identifier
data.photos[].descriptionstringPost caption text
data.photos[].create_timenumberUnix timestamp of when the post was created
data.photos[].authorobjectPost author information
data.photos[].imagesstring[]Array of image URLs in the photo post
data.photos[].statisticsobjectEngagement metrics (likes, comments, shares)

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

On this page