Get video data, thumbnails, view counts, and more with a simple and fast API. No API key required, no request limits.
Use the following URL for all API requests. No registration or API key needed.
All data is returned in JSON format, readable by almost every programming language. Please use responsibly to keep the service fast and stable.
category parameter (e.g. ?category=anime) to get only videos in that category. Without it, all videos are returned.file_code parameter to the URL to retrieve data for one specific video.file_code when the video starts playing. The view count will increase automatically.YOUR_KEY and the category name with yours. Done! 🎉Save this as index.html and open it. It shows videos, lets visitors pick a category, counts views, and shows friendly error messages.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Video Site</title>
<style>
body { font-family: sans-serif; margin: 0; padding: 12px; background: #f3f4f6; }
select { padding: 8px; font-size: 16px; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { background: #fff; border-radius: 10px; overflow: hidden; cursor: pointer; }
.item img { width: 100%; display: block; }
.item p { margin: 6px; font-size: 13px; }
#msg { color: #b91c1c; }
</style>
</head>
<body>
<select id="category">
<option value="">All</option>
<option value="jepang">Jepang</option>
<option value="indo">Indo</option>
</select>
<p id="msg"></p>
<div class="grid" id="list"></div>
<script>
const API_URL = 'https://vidcodeapi.site/api.php';
const API_KEY = ''; // paste your key here (leave empty to use without a key)
function authHeaders() {
return API_KEY ? { 'X-API-Key': API_KEY } : {};
}
async function loadVideos(category) {
const msg = document.getElementById('msg');
const list = document.getElementById('list');
msg.textContent = '';
list.innerHTML = '';
let url = API_URL + '?limit=50';
if (category) url += '&category=' + encodeURIComponent(category);
try {
const res = await fetch(url, { headers: authHeaders() });
const data = await res.json();
if (!res.ok) {
msg.textContent = data.msg || 'Something went wrong.';
return;
}
const files = data.result.files || [];
if (!files.length) {
msg.textContent = 'No videos found.';
return;
}
files.forEach(function (v) {
const item = document.createElement('div');
item.className = 'item';
const img = document.createElement('img');
img.src = v.single_img;
const title = document.createElement('p');
title.textContent = v.title + ' (' + v.views + ' views)';
item.append(img, title);
item.onclick = function () { playVideo(v); };
list.appendChild(item);
});
} catch (e) {
msg.textContent = 'Cannot connect. Please try again.';
}
}
function playVideo(v) {
// Count one view (the same visitor is counted once every 6 hours)
fetch(API_URL, {
method: 'POST',
headers: Object.assign({ 'Content-Type': 'application/json' }, authHeaders()),
body: JSON.stringify({ file_code: v.file_code })
}).catch(function () {});
window.open(v.download_url, '_blank');
}
document.getElementById('category').addEventListener('change', function (e) {
loadVideos(e.target.value);
});
loadVideos('');
</script>
</body>
</html>
Best for busy websites. It keeps the result for 60 seconds, so your site stays fast and uses fewer requests.
<?php
$api = 'https://vidcodeapi.site/api.php';
$key = ''; // paste your key here (leave empty to use without a key)
$cat = 'jepang'; // category name, or '' for all
$cache = __DIR__ . '/cache_' . md5($cat) . '.json';
// Use the saved copy if it is less than 60 seconds old
if (is_file($cache) && time() - filemtime($cache) < 60) {
$json = file_get_contents($cache);
} else {
$url = $api . '?limit=50' . ($cat !== '' ? '&category=' . urlencode($cat) : '');
$ctx = stream_context_create(['http' => [
'header' => "X-API-Key: $key\r\n",
'timeout' => 10
]]);
$json = @file_get_contents($url, false, $ctx);
if ($json) {
file_put_contents($cache, $json); // save for next time
} elseif (is_file($cache)) {
$json = file_get_contents($cache); // API busy: use the old copy
}
}
$data = json_decode((string)$json, true);
$files = $data['result']['files'] ?? [];
if (!$files) {
echo 'No videos found.';
}
foreach ($files as $v) {
echo '<img src="' . htmlspecialchars($v['single_img']) . '" width="200"><br>';
echo htmlspecialchars($v['title']) . ' (' . (int)$v['views'] . ' views)<hr>';
}
?>
Get 20 videos at a time instead of everything at once:
let page = 1;
async function loadMore() {
const res = await fetch('https://vidcodeapi.site/api.php?limit=20&page=' + page);
const data = await res.json();
console.log(data.result.files); // the videos of this page
if (page >= data.result.total_pages) {
console.log('No more pages');
} else {
page++;
}
}
Open this link in your browser, or run it in a terminal. If you see video data, your key works:
curl "https://vidcodeapi.site/api.php?key=YOUR_KEY&limit=1"
| Problem | What to do |
|---|---|
| Nothing shows up | Open the API link in your browser. If you see data, check the spelling of the category. |
| Error 429 | You sent too many requests. Wait a minute, or get a key for higher limits. |
| Error 401 or 403 | Check your key, its expiry date, and the domain it is locked to. |
| Views do not go up | The same visitor is counted only once per video every 6 hours. |
GET Retrieve the full list of all videos available in the API.
{
"msg": "OK",
"server_time": "2026-08-24 22:50:43",
"result": {
"per_page_limit": 200,
"results_total": 185,
"results": 185,
"files": [
{
"fid": "6034",
"views": "114",
"file_code": "74bfe6fa",
"title": "Abg hijab viral",
"download_url": "https://vidcode.my.id/embed.php?file_code=...",
"single_img": "https://lukycinema.my.id/img/thumbnail/...jpg",
"uploaded": "07:25",
"public": "1"
}
]
}
}
GET Retrieve only videos from one category. If category is omitted, all videos are returned.
| Parameter | Required | Description |
|---|---|---|
category |
No | Category name, e.g. anime or horor (not case-sensitive) |
GET Find and retrieve data for one specific video using its unique code.
| Parameter | Required | Description |
|---|---|---|
file_code |
Yes | Unique video code, obtained from the full video list |
POST Send this request when the video starts playing to record a view.
Request Body:
{
"file_code": "5adb29cc"
}
Server Response:
{
"status": "success",
"message": "Views successfully increased",
"file_code": "5adb29cc",
"views": "115",
"server_time": "2026-08-24 22:51:00"
}
| Field | Description |
|---|---|
file_code |
Unique video identifier — used for increasing view count |
title |
Video title |
download_url |
Direct link to video file |
single_img |
Main thumbnail image |
splash_img |
Alternative image / poster |
views |
Number of people who have watched |
uploaded |
Upload time |
category |
Video category (used by the category filter) |
Every video belongs to a category, like anime or horor. You choose what you want:
?category= and the category name.| I want... | Use this link |
|---|---|
| All videos | https://vidcodeapi.site/api.php |
| Only anime | https://vidcodeapi.site/api.php?category=anime |
| Only horror | https://vidcodeapi.site/api.php?category=horor |
✅ Capital letters do not matter. Anime and anime work the same.
✅ If the category does not exist, you simply get an empty list. No error.
No. You can start right away without a key. A key gives you higher limits and a private access for your website.
| Plan | Requests per minute | Requests per day | How to get it |
|---|---|---|---|
| Anonymous (no key) | 30 | 1,000 | Automatic |
| Free key | 60 | 5,000 | Ask on Telegram |
| Premium key | 600 | 200,000 | Ask on Telegram |
Limits are counted per key. Without a key they are counted per visitor IP address.
Add your key to the link, or send it in a header. Both work the same.
https://vidcodeapi.site/api.php?key=YOUR_KEY
https://vidcodeapi.site/api.php?category=jepang&key=YOUR_KEY
Or send it as a header:
fetch('https://vidcodeapi.site/api.php', {
headers: { 'X-API-Key': 'YOUR_KEY' }
});
Each key can be locked to your domain, so nobody else can use it on their website.
| Code | Meaning |
|---|---|
401 |
Invalid key. |
403 |
Key is disabled, expired, or not allowed on this domain. |
429 |
Too many requests. Wait a moment and try again. |
Need a higher limit or a key? Contact us on Telegram
Simple example to fetch full video list:
fetch('https://vidcodeapi.site/api.php')
.then(res => res.json())
.then(data => {
const total = data.result.results_total;
const videos = data.result.files;
console.log('Total videos:', total);
});
Leave the category empty to get everything:
async function getVideos(category = '') {
let url = 'https://vidcodeapi.site/api.php';
if (category) url += '?category=' + category;
const res = await fetch(url);
const data = await res.json();
return data.result.files;
}
getVideos('anime'); // only anime
getVideos('horor'); // only horror
getVideos(); // everything
<?php
$api = 'https://vidcodeapi.site/api.php?category=anime';
$data = json_decode(file_get_contents($api), true);
foreach ($data['result']['files'] as $v) {
echo $v['title'] . '<br>';
}
?>
Send request when video starts playing:
const code = '5adb29cc';
fetch('https://vidcodeapi.site/api.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ file_code: code })
}).then(r => r.json())
.then(d => console.log('Views:', d.views));
<?php
$api = 'https://vidcodeapi.site/api.php';
$json = file_get_contents($api);
$data = json_decode($json, true);
echo 'Total: ' . $data['result']['results_total'];
foreach ($data['result']['files'] as $v) {
echo '<video src="' . $v['download_url'] . '">';
}
?>