TikTok Scraper REST API

Self-hosted API untuk scrape & download video TikTok. Register untuk akses API key.

4
Endpoints
24/7
Uptime
Free
10 req/hr
Cara Menggunakan
GUIDE Quick Start
🔑 Semua scraper endpoints membutuhkan API Key. Daftar gratis lewat tombol Login / Register di pojok kanan atas.

Langkah-langkah:

LangkahDeskripsi
1Klik Login / Register di navigation bar
2Register dengan username, email, dan password (minimal 6 karakter)
3API Key akan muncul di halaman utama (format: mallss_xxx)
4Gunakan API Key di setiap request sebagai header
Cara Pakai API Key

Kirim API Key di header setiap request. Dua cara:

Method 1: X-Api-Key Header (Recommended)
curl -H "X-Api-Key: mallss_xxx" "https://tiktokapi.amanenime.my.id/api/videos?u=mal_oniisan"
Method 2: Query Parameter
curl "https://tiktokapi.amanenime.my.id/api/videos?u=mal_oniisan&api_key=mallss_xxx"
Tier & Rate Limit
TierRate LimitHarga
Free10 request per jamGratis
Premium100 request per jamHubungi admin
Contoh Kode (Multi-Language)
CODE Code Examples Python, JavaScript, PHP, Go, Java

Contoh integrasi API dalam berbagai bahasa pemrograman. Semua contoh menggunakan API key via header X-Api-Key.

Python
JavaScript
PHP
Go
Java
Python — pip install requests
import requests

API_KEY = "mallss_xxx"
BASE_URL = "https://tiktokapi.amanenime.my.id"

# Ambil video terbaru dari user
headers = {"X-Api-Key": API_KEY}
resp = requests.get(f"{BASE_URL}/api/videos", headers=headers, params={"u": "mal_oniisan", "limit": 5})
data = resp.json()

if data["status"]:
    for v in data["videos"]:
        print(f"{v['title']} — {v['play_count']} views")
        print(f"  Cover: {v['cover']}")
        print(f"  Link: https://tiktok.com/@{v['author']}/video/{v['video_id']}")
        print()

# Download video
resp = requests.get(f"{BASE_URL}/api/download", headers=headers, params={"url": "https://www.tiktok.com/@user/video/123..."})
dl = resp.json()
if dl["status"]:
    print(f"Video URL: {dl['video'][0]}")
    print(f"Audio URL: {dl['audio'][0]}")

# Download file langsung
with requests.get(f"{BASE_URL}/api/download-file", headers=headers, params={"url": "...", "type": "video"}, stream=True) as r:
    with open("video.mp4", "wb") as f:
        for chunk in r.iter_content(chunk_size=8192):
            f.write(chunk)
💡 Ganti mallss_xxx dengan API key kamu sendiri. Dapatkan dengan register di tombol Login / Register.
Scraper Endpoints
GET /api/videos Ambil video terbaru dari user

Ambil daftar video terbaru dari profil TikTok. Scraping dilakukan via headless browser dengan cookies session untuk melewati WAF TikTok.

Parameters
NamaTipeWajibDefaultDeskripsi
ustringYa-Username TikTok tanpa @ (contoh: mal_oniisan)
limitintegerTidak10Jumlah video maksimal yang dikembalikan (1-50)
Response (200 OK)
{ "status": true, "count": 10, "videos": [ { "video_id": "7666777418601860372", "title": "judul video", "cover": "https://...", "author": "username", "play_count": 12345, "digg_count": 678, "create_time": 1722547200 } ] }
Response Fields
FieldTipeDeskripsi
statusbooleantrue jika berhasil
countintegerJumlah video yang dikembalikan
videos[].video_idstringID unik video TikTok
videos[].titlestringJudul/caption video
videos[].coverstringURL thumbnail video
videos[].authorstringUsername pemilik video
videos[].isVideobooleantrue jika konten video
videos[].play_countintegerJumlah views
videos[].digg_countintegerJumlah likes
videos[].create_timeintegerUnix timestamp (0 jika tidak tersedia)
Contoh Request (curl)
curl -H "X-Api-Key: mallss_xxx" "https://tiktokapi.amanenime.my.id/api/videos?u=mal_oniisan&limit=5"
Contoh Response
{ "status": true, "count": 5, "videos": [ { "video_id": "7668987703706307860", "title": "presetwinxz | asik nii😜", "cover": "https://p19-common-sign.tiktokcdn.com/tos-alisg-p-0037/...image", "author": "winxzrawrr", "isVideo": true, "play_count": 16500, "digg_count": 0, "create_time": 0 } ] }

Try it

GET /api/download Ambil URL download video TikTok

Ambil direct URL untuk video dan audio dari link TikTok. Mendukung format URL: tiktok.com/@user/video/ID, vt.tiktok.com/xxx, vm.tiktok.com/xxx.

Parameters
NamaTipeWajibDeskripsi
urlstringYaURL video TikTok (lengkap dengan https://)
Response (200 OK)
{ "status": true, "title": "#hashtag | caption 😜 #tag1 #tag2", "author": "username", "cover": "https://p16-common-sign.tiktokcdn-us.com/...jpeg", "duration": 14, "video": ["https://v16m.tiktokcdn-us.com/.../video.mp4"], "video_hd": ["https://...hd.mp4"], "audio": ["https://v16-ies-music.tiktokcdn-us.com/.../audio.mp3"], "video_id": "7668987703706307860" }
Response Fields
FieldTipeDeskripsi
statusbooleantrue jika berhasil
titlestringJudul/caption video
authorstringUsername pemilik video
coverstringURL thumbnail video
durationintegerDurasi video dalam detik
videostring[]URL download video kualitas normal (mp4)
video_hdstring[]URL download video kualitas HD (mp4)
audiostring[]URL download audio saja (mp3)
video_idstringID unik video TikTok
Contoh Request (curl)
curl -H "X-Api-Key: mallss_xxx" "https://tiktokapi.amanenime.my.id/api/download?url=https://www.tiktok.com/@user/video/123..."
Contoh Response
{ "status": true, "title": "#presetwinxz | asik nii😜 #presetalightmotion #sektegace #xyzbca #fyp", "author": "winxzrawrr", "cover": "https://p16-common-sign.tiktokcdn-us.com/tos-alisg-p-0037/...jpeg", "duration": 14, "video": ["https://v16m.tiktokcdn-us.com/.../video.mp4"], "video_hd": [], "audio": ["https://v16-ies-music.tiktokcdn-us.com/.../audio.mp3"], "video_id": "7668987703706307860" }

Try it

GET /api/download-file Download video sebagai file
📦 Download langsung video TikTok sebagai file .mp4 atau .mp3. File di-fetch dari CDN TikTok lalu di-stream ke client. File temporary otomatis dihapus setelah download selesai.
Parameters
NamaTipeWajibDefaultDeskripsi
urlstringYa-URL video TikTok (lengkap dengan https://)
typestringTidakvideovideo untuk .mp4, audio untuk .mp3
Response

Berhasil: Binary file stream dengan header:

HeaderNilai
Content-Typevideo/mp4 atau audio/mpeg
Content-Dispositionattachment; filename="judul.mp4"
Content-LengthUkuran file dalam bytes

Gagal: JSON error response

{ "status": false, "error": "video_fetch_failed" }
Contoh Request (curl - download video)
curl -H "X-Api-Key: mallss_xxx" -O -L "https://tiktokapi.amanenime.my.id/api/download-file?url=https://www.tiktok.com/@user/video/123..."
Contoh Request (curl - download audio)
curl -H "X-Api-Key: mallss_xxx" -O -L "https://tiktokapi.amanenime.my.id/api/download-file?url=https://www.tiktok.com/@user/video/123...&type=audio"
INFO /api/health Cek status scraper

Cek apakah scraper API sedang aktif dan berapa lama sudah berjalan (uptime). Endpoint ini tidak membutuhkan API key.

Response (200 OK)
{ "status": "ok", "uptime": 12345.67 }
Response Fields
FieldTipeDeskripsi
statusstring"ok" jika server aktif
uptimenumberWaktu server berjalan dalam detik
Contoh Request
curl "https://tiktokapi.amanenime.my.id/api/health"
Error Codes
REF Daftar Error Code