Free Public API
Gold Price API — ฟรี ไม่ต้อง API Key
ดึงราคาทองคำไทยแบบ Real-time ด้วย HTTP GET ธรรมดา ไม่ต้อง authentication ไม่ต้องสมัคร ข้อมูลอ้างอิงจาก สมาคมค้าทองคำแห่งประเทศไทย อัปเดตทุก 60 วินาที
Quick Start
Sample Response
JSON200 OK
{
"current": {
"buyBar": 70350,
"sellBar": 70550,
"buyOrnament": 68943,
"sellOrnament": 71350,
"change": 50,
"changePercent": 0.07,
"updateRound": 2,
"updatedAt": "2026-05-17T09:30:00.000Z"
},
"world": {
"spotOz": 3245.50,
"spotGram": 104.34,
"change": 8.20,
"changePercent": 0.25,
"thbRate": 33.45,
"updatedAt": "2026-05-17T09:30:00.000Z"
}
}Fields — current
| Field | Type | Description |
|---|---|---|
buyBar | number | ราคารับซื้อทองแท่ง 96.5% (บาท) |
sellBar | number | ราคาขายออกทองแท่ง 96.5% (บาท) |
buyOrnament | number | ราคารับซื้อทองรูปพรรณ 96.5% (บาท) |
sellOrnament | number | ราคาขายออกทองรูปพรรณ 96.5% (บาท) |
change | number | การเปลี่ยนแปลงราคาจากรอบก่อน (บาท, บวก/ลบ) |
changePercent | number | การเปลี่ยนแปลงในรูปเปอร์เซ็นต์ |
updateRound | number | ครั้งที่ของการอัปเดตในวันนั้น (เช่น ครั้งที่ 2) |
updatedAt | string | เวลาที่อัปเดตล่าสุด ในรูปแบบ ISO 8601 (UTC) |
Code Examples
cURL
curl https://www.thaigoldtoday.com/api/gold-price
JavaScript / fetch
const res = await fetch('https://www.thaigoldtoday.com/api/gold-price');
const { current } = await res.json();
console.log(current.sellBar); // ราคาขายออกPython
import requests
r = requests.get('https://www.thaigoldtoday.com/api/gold-price')
data = r.json()
print(data['current']['sellBar'])Rate Limits & Terms
Cache
60 วินาที
Authentication
ไม่ต้อง — ฟรี 100%
เหมาะสำหรับ
Widget, Dashboard, Bot แจ้งเตือน, App มือถือ
ข้อมูลจาก
สมาคมค้าทองคำแห่งประเทศไทย
Attribution
API ใช้งานได้ฟรี แต่ กรุณาลิงก์กลับมาที่ thaigoldtoday.com เมื่อใช้ข้อมูลในงานของคุณ เช่น "ข้อมูล: thaigoldtoday.com"