TikTok Downloader API
A dual-purpose TikTok API. You can provide a direct TikTok URL to download a specific video, OR provide a Search Query to automatically find and download the top result for that keyword.
Endpoint
Section titled “Endpoint” POST
/api/v1/tiktok Request Parameters
Section titled “Request Parameters”The following parameters are accepted in the request body:
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | A valid TikTok URL OR a text search term (e.g., “soccer skills”). |
url | string | Optional | Alias for query (legacy support). |
Request Examples
Section titled “Request Examples”Choose your preferred method to interact with the TikTok API:
curl -X POST https://heavstal.com.ng/api/v1/tiktok \-H "Content-Type: application/json" \-H "x-api-key: <YOUR_API_KEY>" \-d '{"query": "https://vt.tiktok.com/ZGe..."}'const response = await fetch('https://heavstal.com.ng/api/v1/tiktok', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': '<YOUR_API_KEY>' }, body: JSON.stringify({ query: 'https://vt.tiktok.com/ZGe...' })});
const res = await response.json();console.log(res.data.video_nowm);import { downloader } from '@heavstal/api';
// Video Extractionconst video = await downloader.tiktok("https://vt.tiktok.com/...");console.log(video.no_watermark);
// Image Slides Extractionconst slide = await downloader.tiktokSlide("https://vt.tiktok.com/...");console.log(slide.slideImages);import requests
url = "https://heavstal.com.ng/api/v1/tiktok"headers = { "Content-Type": "application/json", "x-api-key": "<YOUR_API_KEY>"}payload = { "query": "https://vt.tiktok.com/ZGe..."}
response = requests.post(url, headers=headers, json=payload)print(response.json()["data"])Response Examples
Section titled “Response Examples”{ "status": "success", "creator": "HEAVSTAL TECH", "mode": "search", "data": { "title": "Video Caption Here", "author": "Username", "video_nowm": "https://...", "audio": "https://...", "stats": { "views": 1000, "likes": 500 } }}{ "status": "error", "error": "Invalid TikTok URL provided or video is private."}