JustSERPDocs
TikTok

TikTok Profile Videos

The videos of a public TikTok account, as its page lists them, answered as the document: `profile`, `videos` and `pagination`.

GET
/v1/tiktok/profile/videos

The videos of a public TikTok account, as its page lists them, answered as the document: profile, videos and pagination. sort_by is the order of the page's own Latest, Popular and Oldest control. A page is up to 30 videos; pagination.next_page_token is sent back as next_page_token for the page after (a later page loads the account again and scrolls, so it takes longer than an early one). A post has is_pinned, is_ad, is_duet_enabled and is_stitch_enabled only when true. thumbnail, music.play_url and subtitles[].url are signed addresses that expire; playback addresses are never answered. The popular and oldest orders are written but were not seen working. An unknown account is 404 profile_not_found. zero_retention is not handled.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
username?string

The account's username, with or without the @.

Match^@?[a-zA-Z0-9_.]{1,24}$
sort_by?string

The order of the list.

Default"latest"
Value in"latest""popular""oldest"
next_page_token?string

The previous answer's pagination.next_page_token. A token this API did not give, or one of another account or order, is 400.

Response Body

The videos, as the document. When the page could not be parsed, the usual envelope.

application/json
  1. response

The first keys of a document-form answer. Unlike DocumentHead there is no search_information unless the engine has one (there is none for the AI engines, Events, Events Details, Facebook, Tripadvisor Place, Trending Now and the Apple engines' places).

search_metadata*
search_parameters*

The parameters the search ran with, defaults filled in; engine is the engine's name.

search_information?
profile?
videos?array<>
pagination?

Absent on the last page.

Example Request
curl -X GET 'https://api.justserp.com/v1/tiktok/profile/videos?username=nasa'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "profile": {    "id": "string",    "username": "string",    "link": "string",    "name": "string",    "bio": "string",    "avatar": "string",    "is_verified": true,    "is_private": true,    "followers": 0,    "following": 0,    "hearts": 0,    "posts": 0  },  "videos": [    {      "position": 0,      "grid_position": 0,      "id": "string",      "link": "string",      "caption": "string",      "language": "string",      "hashtags": [        "string"      ],      "mentions": [        "string"      ],      "iso_date": "string",      "duration": 0,      "width": 0,      "height": 0,      "is_pinned": true,      "is_ad": true,      "is_duet_enabled": true,      "is_stitch_enabled": true,      "views": 0,      "likes": 0,      "comments": 0,      "shares": 0,      "saves": 0,      "thumbnail": "string",      "dynamic_thumbnail": "string",      "type": "video",      "title": "string",      "carousel_items": [        {          "position": 0,          "image": "string",          "width": 0,          "height": 0        }      ],      "video_meta": {        "definition": "string",        "ratio": "string",        "format": "string",        "codec_type": "string",        "size": 0,        "bitrate": 0,        "bitrates": [          {            "gear_name": "string",            "bitrate": 0,            "fps": 0,            "codec_type": "string",            "format": "string"          }        ]      },      "music": {        "id": "string",        "title": "string",        "album": "string",        "author": "string",        "cover": "string",        "duration": 0,        "play_url": "string",        "is_original": true,        "is_copyrighted": true,        "link": "string"      },      "location": {        "id": "string",        "name": "string",        "address": "string",        "city": "string",        "category": "string"      },      "subtitles": [        {          "language": "string",          "format": "string",          "source": "string",          "url": "string",          "url_expires_at": "string"        }      ],      "author": {        "id": "string",        "sec_uid": "string",        "username": "string",        "link": "string",        "name": "string",        "bio": "string",        "avatar": "string",        "avatar_hd": "string",        "is_verified": true,        "is_private": true,        "followers": 0,        "following": 0,        "hearts": 0,        "posts": 0      }    }  ],  "pagination": {    "has_more": true,    "next_page_token": "string"  }}