ราคาทอง.today
Live

Free Public API

Gold Price API — ฟรี ไม่ต้อง API Key

ดึงราคาทองคำไทยแบบ Real-time ด้วย HTTP GET ธรรมดา ไม่ต้อง authentication ไม่ต้องสมัคร ข้อมูลอ้างอิงจาก สมาคมค้าทองคำแห่งประเทศไทย อัปเดตทุก 60 วินาที

Quick Start

Endpoint

GEThttps://www.thaigoldtoday.com/api/gold-price

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

FieldTypeDescription
buyBarnumberราคารับซื้อทองแท่ง 96.5% (บาท)
sellBarnumberราคาขายออกทองแท่ง 96.5% (บาท)
buyOrnamentnumberราคารับซื้อทองรูปพรรณ 96.5% (บาท)
sellOrnamentnumberราคาขายออกทองรูปพรรณ 96.5% (บาท)
changenumberการเปลี่ยนแปลงราคาจากรอบก่อน (บาท, บวก/ลบ)
changePercentnumberการเปลี่ยนแปลงในรูปเปอร์เซ็นต์
updateRoundnumberครั้งที่ของการอัปเดตในวันนั้น (เช่น ครั้งที่ 2)
updatedAtstringเวลาที่อัปเดตล่าสุด ในรูปแบบ 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"

Related