Introduction
🚀 apiva.io is a powerful API service designed to fetch and download TikTok videos effortlessly. The platform offers developers a simple yet efficient way to retrieve video details, as well as download TikTok videos with or without watermarks.
API Functionality Overview
apiva.io provides two key API endpoints:
1: fetch-video: This endpoint retrieves detailed information about a TikTok video, including metadata such as the title, author, and a thumbnail image.
2: get-video: This endpoint returns download links for the TikTok video, both with and without a watermark, as well as a link to the video's audio.
FETCH-VIDEO (cURL)
EXAMPLES
1 <?php
2 $curl = curl_init();
3
4 curl_setopt_array($curl, [
5 CURLOPT_URL => "https://your-domain.com/fetch-video",
6 CURLOPT_RETURNTRANSFER => true,
7 CURLOPT_ENCODING => "",
8 CURLOPT_MAXREDIRS => 10,
9 CURLOPT_TIMEOUT => 30,
10 CURLOPT_HTTPHEADER => [
11 "Content-Type: application/json",
12 "api-key: YOUR_API_KEY"
13 ],
14 CURLOPT_POSTFIELDS => json_encode([
15 'url' => 'https://www.tiktok.com/@username/video/video-id'
16 ])
17 ]);
18 $response = curl_exec($curl);
19 curl_close($curl);
20 echo $response;
21 ?>
GET-VIDEO (cURL)
EXAMPLES
1 <?php
2 $curl = curl_init();
3
4 curl_setopt_array($curl, [
5 CURLOPT_URL => "https://your-domain.com/get-video",
6 CURLOPT_RETURNTRANSFER => true,
7 CURLOPT_ENCODING => "",
8 CURLOPT_MAXREDIRS => 10,
9 CURLOPT_TIMEOUT => 30,
10 CURLOPT_HTTPHEADER => [
11 "Content-Type: application/json",
12 "api-key: YOUR_API_KEY"
13 ],
14 CURLOPT_POSTFIELDS => json_encode([
15 'url' => 'https://www.tiktok.com/@username/video/video-id'
16 ])
17 ]);
18 $response = curl_exec($curl);
19 curl_close($curl);
20 echo $response;
21 ?>
FETCH-VIDEO (PHP Guzzle)
EXAMPLES
1 <?php
2 use GuzzleHttp\Client;
3
4 $client = new Client();
5 $response = $client->post('https://your-domain.com/fetch-video', [
6 'headers' => [
7 'Content-Type' => 'application/json',
8 'api-key' => 'YOUR_API_KEY'
9 ],
10 'json' => [
11 'url' => 'https://www.tiktok.com/@username/video/video-id'
12 ]
13 ]);
14 echo $response->getBody();
15 ?>
GET-VIDEO (PHP Guzzle)
EXAMPLES
1 <?php
2 use GuzzleHttp\Client;
3
4 $client = new Client();
5 $response = $client->post('https://your-domain.com/get-video', [
6 'headers' => [
7 'Content-Type' => 'application/json',
8 'api-key' => 'YOUR_API_KEY'
9 ],
10 'json' => [
11 'url' => 'https://www.tiktok.com/@username/video/video-id'
12 ]
13 ]);
14 echo $response->getBody();
15 ?>
FETCH-VIDEO (Python)
EXAMPLES
1 import requests
2
3 url = "https://your-domain.com/fetch-video"
4 headers = {
5 "Content-Type": "application/json",
6 "api-key": "YOUR_API_KEY"
7 }
8 data = {
9 "url": "https://www.tiktok.com/@username/video/video-id"
10 }
11
12 response = requests.post(url, json=data, headers=headers)
13 print(response.json())
GET-VIDEO (Python)
EXAMPLES
1 import requests
2
3 url = "https://your-domain.com/get-video"
4 headers = {
5 "Content-Type": "application/json",
6 "api-key": "YOUR_API_KEY"
7 }
8 data = {
9 "url": "https://www.tiktok.com/@username/video/video-id"
10 }
11
12 response = requests.post(url, json=data, headers=headers)
13 print(response.json())
Response example
APIVA.IO the response provides detailed metadata about the TikTok video
Response (fetch-video)
{
"data": {
"version": "API version",
"type": "Type of content (e.g., video)",
"title": "Title of the TikTok video",
"author_url": "URL of the author profile on TikTok",
"author_name": "Author's name on TikTok",
"width": "Width of the embedded content",
"height": "Height of the embedded content",
"thumbnail_url": "URL of the thumbnail image",
"provider_url": "Provider URL (TikTok)",
"provider_name": "Provider name (TikTok)",
"embed_product_id": "ID of the embedded product (video)"
}
}
Response (get-video)
{
"video_no_watermark": "URL for the video without watermark",
"video_with_watermark": "URL for the video with watermark",
"music_url": "URL for the music of the video"
}