JAV Manager • API Tutorial

กลับหน้า Public

Base URL & Overview

Domain API: https://jav.dooapi.com

API เปิด CORS (Access-Control-Allow-Origin: *) เรียกได้จากเบราว์เซอร์โดยตรง และมีแคชที่ edge:

Cache-Control: public, max-age=86400, stale-while-revalidate=600

Endpoints

รายการทั้งหมด (เลือกฟิลด์ได้)

GET https://jav.dooapi.com/api/movies?fields=id,title,year&limit=20&page=1
  • fields (ไม่บังคับ) – ฟิลด์ที่ต้องการ (คอมม่า)
  • page (default 1), limit (default 20, สูงสุด 100)

รายละเอียดตาม ID

GET https://jav.dooapi.com/api/movies/123?fields=id,title,year,poster1_url

Snapshot (อัปเดตรายชั่วโมง)

GET https://jav.dooapi.com/api/movies/snapshot

API เดิม (Compatibility)

GET https://jav.dooapi.com/api/jav
GET https://jav.dooapi.com/api/jav/:id

Response Structure

สำเร็จ (Status 200)

{
  "code": 1,
  "msg": "Data list",
  "page": 1,
  "pagecount": 10,
  "limit": "20",
  "total": 200,
  "list": [
    { "id": 1, "title": "SSIS-999", "year": "2024", "slug": "ssis-999", "poster1_url": "..." }
  ]
}

คำอธิบายฟิลด์ข้อมูล

ฟิลด์ประเภทอธิบาย
idnumberรหัสภายใน
title / namestringชื่อเรื่อง (title map จาก name)
slugstringสลักสำหรับ URL
yearstringปี
poster1_urlstringโปสเตอร์แนวนอน
poster2_urlstringโปสเตอร์แนวตั้ง
categories, actor, director, studio, genre, countrystring/string[]ขึ้นกับ endpoint ที่เรียก
synopsisstringเรื่องย่อ
id_codestringเช่น SSIS-999
releasestringวันที่ปล่อย (YYYY-MM-DD)
URL_player.server_data.link_embedstringลิงก์ player (เฉพาะ /api/jav)

ตัวอย่างการใช้งาน

JavaScript (fetch)

fetch('https://jav.dooapi.com/api/movies?fields=id,title,poster1_url&limit=10&page=1')
  .then(r => r.json())
  .then(d => console.log(d.list));

Python (requests)

import requests
r = requests.get('https://jav.dooapi.com/api/movies/1?fields=id,title,year')
print(r.json())

PHP (cURL)

$ch = curl_init('https://jav.dooapi.com/api/movies?fields=id,title,year&limit=5');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true]);
$res = curl_exec($ch);
curl_close($ch);
echo $res;

cURL (CLI)

curl -s 'https://jav.dooapi.com/api/movies?fields=id,title,year&limit=5&page=1'

การจัดการข้อผิดพลาด

HTTP Status Codes

  • 200 สำเร็จ
  • 404 ไม่พบข้อมูล
  • 400 พารามิเตอร์ไม่ถูกต้อง
  • 500 ระบบภายในผิดพลาด

Error Response Example

{
  "code": 0,
  "msg": "Not found"
}