Skip to content

Search Content Photo TikTok ​

GEThttps://api.repliz.com/public/research/tiktok/content/photo

Search public TikTok photo posts by keyword. Returns up to 30 posts per page, each with its images in medias and type album.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): research:read
  • Access Tier: Gold+

TikWM key

TikTok research runs through TikWM, a separate service that reads public TikTok data, with your own TikWM API key. Save it first in Repliz under Setting → TikWM key (how to get one); without it, the request fails with 400 invalid tikwm key. Each request uses your key's own TikWM quota. When TikWM refuses a request, for example when the key is out of quota, it fails with 403 and TikWM's message.

Parameters ​

ParameterTypeRequiredDescription
keywordsstringYesKeyword to search photo posts for.
nextTokenstringNoCursor for the next page: the nextToken of the previous response. Leave it out for the first page. hasMore is false and nextToken is empty when there are no more pages.

Example Request ​

bash
curl -X GET "https://api.repliz.com/public/research/tiktok/content/photo?keywords=cat" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const response = await axios.get('https://api.repliz.com/public/research/tiktok/content/photo', {
  params: {
    keywords: 'cat',
  },
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY',
  },
});

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch('https://api.repliz.com/public/research/tiktok/content/photo?keywords=cat', {
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "docs": [
    {
      "id": "7407304287891639582",
      "description": "#catoftiktok #cat #catmemes #funny #funnycat  #foryou ",
      "type": "album",
      "owner": {
        "id": "7382080583107527726",
        "name": "Daevid Heralo Shop",
        "picture": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/83405556a4..."
      },
      "medias": [
        {
          "type": "image",
          "thumbnail": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-i-photomode-tx2/7fa189...",
          "url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-i-photomode-tx2/7fa189..."
        },
        {
          "type": "image",
          "thumbnail": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-i-photomode-tx2/f83fb6...",
          "url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-i-photomode-tx2/f83fb6..."
        }
      ],
      "url": "https://tiktok.com/@fashionsweatshirt/photo/7407304287891639582",
      "createdAt": "2024-08-26T04:44:08.000Z",
      "statistic": {
        "play": 576984,
        "like": 3878,
        "comment": 412,
        "share": 581,
        "download": 184
      }
    }
  ],
  "hasMore": true,
  "nextToken": "8c936c38d3e700241be3e8e73a768fa14734ed58f924d1866eedfd8644bd6bf9"
}
json
{
  "code": 400,
  "message": "invalid tikwm key"
}
json
{
  "code": 403,
  "message": "Request failed with status code 429"
}
json
{
  "code": 401,
  "message": "unauthorized"
}