Parse a TikTok URL (free)
What a TikTok link points to, as structured input for the other routes: whether it is a video, an account, a hashtag, a sound or a search, plus the id, username, tag or query it encodes. Makes no request to TikTok, so it costs no credit and reports pagesFetched 0. A shortened share link (vm.tiktok.com, vt.tiktok.com) carries no information about its target, so it comes back as kind "unknown" with a note saying to open it and pass the full URL — the routes that take a video reject a short link with a 400 for the same reason. Billing: free.
/resolve-url Utilities https://api.fetchlayer.dev/tiktok/resolve-url Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
url string required Any TikTok link: a video, an account, a hashtag, a sound or a search.
format string optional json or markdown. Markdown returns a rendered summary instead of the structured record. (default: json)
timeoutMs integer optional Time limit for each individual page read, in milliseconds (max 60000). It bounds one page, not the whole request.
Response Fields
resolve-url
Parse a TikTok URL (free)
transport string The upstream source. Always "tiktok".
notes string[] Caveats you can act on — a private account, comments turned off, a list that ran out early, paging that has gone as deep as it goes. Empty when there are none. An empty result always comes with a note explaining it, never as an unexplained empty array.
pagesFetched number Pages of results read, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed.
kind string One of video, user, hashtag, music, search or unknown.
canonicalUrl string The link in its canonical form, or null.
videoId string The video id, when the link points at one.
username string The account handle, when the link carries one.
hashtagName string The tag, when the link points at a hashtag.
musicId string The sound id, when the link points at a sound.
query string The search term, when the link is a search.
Request
curl -X POST "https://api.fetchlayer.dev/tiktok/resolve-url" \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.tiktok.com/@nasa/video/7686148096895569165"}'Response
{
"transport": "tiktok",
"notes": [],
"pagesFetched": 0,
"kind": "video",
"canonicalUrl": "https://www.tiktok.com/@nasa/video/7686148096895569165",
"videoId": "7686148096895569165",
"username": "nasa",
"hashtagName": null,
"musicId": null,
"query": null
}