📡 Quote API Documentation

📡 Quote API Documentation

🔑 API Key Usage

All API requests must include ?api_key=YOUR_KEY

If missing or invalid, response will be { success: false, error: "Invalid or missing API key" }

📋 Endpoint

https://k.omiomi.xyz/api/quotes.php?api_key=XXXX&limit=5&search=life&category=แรงบันดาลใจ&lang=th&random=1

🛠 Available Parameters

📘 Sample Response (JSON)

{
  "success": true,
  "count": 1,
  "quotes": [
    {
      "id": 12,
      "quote": "จงใช้ชีวิตในแบบของคุณ",
      "quote_en": "Live your own life",
      "author": "นิรนาม",
      "image": "uploads/123abc.jpg",
      "category": "แรงบันดาลใจ"
    }
  ]
}

📦 Code Examples

PHP (cURL)

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://k.omiomi.xyz/api/quotes.php?api_key=YOUR_KEY&limit=3');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);
$data = json_decode($res, true);
print_r($data);

JavaScript (fetch)

fetch('https://k.omiomi.xyz/api/quotes.php?api_key=YOUR_KEY&limit=3')
  .then(res => res.json())
  .then(data => console.log(data));

Python (requests)

import requests
res = requests.get('https://k.omiomi.xyz/api/quotes.php?api_key=YOUR_KEY&limit=3')
print(res.json())

cURL

curl "https://k.omiomi.xyz/api/quotes.php?api_key=YOUR_KEY&limit=3"

🧪 API Test

© 2026 k.omiomi.xyz — Thailand's first public quote API website.