Parse a TikTok URL (free)
What a TikTok link points to — a video, account, hashtag, sound or search — and the id, username, tag or query it carries, ready for the other routes. Free: it costs no credit.
/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, with or without https://: a video (an /embed/v2/ link included), an account, a hashtag, a sound or a search. A short share link (vm.tiktok.com, vt.tiktok.com, tiktok.com/t/…) does not say what it points to, so it comes back as unknown with a note to open it and pass the full URL.
format string optional json or markdown, lowercase; any other value is a 400. Over MCP, markdown returns the result rendered as text; the REST API accepts it and returns JSON. (default: json)
timeoutMs integer optional Time limit for the whole request, in milliseconds (1000–120000); a value outside that range is a 400. When it runs out, a paged request returns what it has with nextCursor, billed for the pages it returned; a request with nothing to return yet fails with a 503 you can retry, marked with the response header X-Timeout-Source: caller. Left out, the request runs as long as it needs.
Response Fields
resolve-url
Parse a TikTok URL (free)
transport string The data source: always the platform id, "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 fetched, 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
}