Best Free Video
API Service

Get video data, thumbnails, view counts, and more with a simple and fast API. No API key required, no request limits.

--
Total Videos
2
Storage Domains
Unlimited
Requests
💡 Video count updates automatically from the latest data

📢 Join Channel Telegram

So you don't miss out on the latest API updates, new features, and maintenance info.

Join Now

📋 Getting Started

API Base URL

Use the following URL for all API requests. No registration or API key needed.

https://vidcodeapi.site/api.php

All data is returned in JSON format, readable by almost every programming language. Please use responsibly to keep the service fast and stable.

Quick Overview

  • Get all videos — Send a GET request to the base URL. You will receive a complete list of all available videos.
  • Filter by category — Add the category parameter (e.g. ?category=anime) to get only videos in that category. Without it, all videos are returned.
  • Get a single video — Add the file_code parameter to the URL to retrieve data for one specific video.
  • Increase view count — Send a POST request with the video's file_code when the video starts playing. The view count will increase automatically.

🚀 Quick Start — Copy & Paste

3 Easy Steps

  1. Get a key (optional). You can skip this and start without a key.
  2. Copy one of the codes below. Tap the Copy button on the code box.
  3. Replace YOUR_KEY and the category name with yours. Done! 🎉

Option 1 — Full Web Page (HTML)

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>

Option 2 — PHP With Cache

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>';
}
?>

Load More (Pagination)

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++;
  }
}

Test Your Key

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"

Quick Fixes

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.

🔗 API Endpoints

Get All Videos

GET Retrieve the full list of all videos available in the API.

https://vidcodeapi.site/api.php

Response Example

{
  "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 Videos by Category

GET Retrieve only videos from one category. If category is omitted, all videos are returned.

https://vidcodeapi.site/api.php?category=anime
Parameter Required Description
category No Category name, e.g. anime or horor (not case-sensitive)

Get Single Video

GET Find and retrieve data for one specific video using its unique code.

https://vidcodeapi.site/api.php?file_code=5adb29cc
Parameter Required Description
file_code Yes Unique video code, obtained from the full video list

Increase View Count

POST Send this request when the video starts playing to record a view.

POST https://vidcodeapi.site/api.php

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"
}

Response Fields Reference

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)

🗂️ Categories Made Easy

The Simple Idea

Every video belongs to a category, like anime or horor. You choose what you want:

  • Want everything? Use the normal link. Nothing else needed.
  • Want only one category? Add ?category= and the category name.

👤 For Developers: How to Get Videos

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.

💎 API Keys & Plans

Do I Need a Key?

No. You can start right away without a key. A key gives you higher limits and a private access for your website.

Plans

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.

How to Use Your Key

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.

Error Codes

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.

Fair Use

  • Each visitor IP counts as one view per video every 6 hours.
  • Save results on your side when you can. Your site gets faster and you use fewer requests.

Need a higher limit or a key? Contact us on Telegram

💻 Code Examples

Get All Videos — JavaScript

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);
  });

Get Videos by Category — JavaScript

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

Get Videos by Category — PHP

<?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>';
}
?>

Auto-Increase Views on Play

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));

Fetch Data Using PHP

<?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'] . '">';
}
?>

📝 Important Notes

  • ✅ No API key or registration required — free to use.
  • ✅ Video/image URLs are fully resolved — use directly.
  • ✅ Views update instantly — but only when your player sends the "Increase View Count" request when a video starts playing.
  • 💡 Respect server load — avoid spamming requests.