Free Live Gold Price API
Free live gold price API. Real-time 24K, 22K & 18K spot bullion rates in USD, PKR and INR as a clean JSON REST feed. Integrate in JavaScript, Python or PHP in under 3 minutes.
Endpoint
GET https://drhint.com/api/public/hooks/gold-ratesSample JSON response
{
"spotUsdPerOz": 4331.42,
"pkrPerUsd": 278.11,
"inrPerUsd": 83.52,
"perGram24kPkr": 38712,
"perTola24kPkr": 451487,
"perGram24kInr": 11623,
"per10gram24kInr": 116230,
"fetchedAt": "2026-06-13T08:00:00.000Z"
}JavaScript
// JavaScript / Node — fetch the live gold rate feed
const res = await fetch("https://drhint.com/api/public/hooks/gold-rates");
const data = await res.json();
console.log("Spot USD/oz:", data.spotUsdPerOz);
console.log("24K per tola PKR:", data.perTola24kPkr);Python
# Python — fetch live gold rate
import requests
data = requests.get("https://drhint.com/api/public/hooks/gold-rates").json()
print("Spot USD/oz:", data["spotUsdPerOz"])
print("24K per 10g INR:", data["per10gram24kInr"])PHP
<?php
// PHP — fetch live gold rate via cURL
$ch = curl_init("https://drhint.com/api/public/hooks/gold-rates");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Spot USD/oz: " . $data["spotUsdPerOz"];Rate limits
| Tier | Requests / min | Cache TTL |
|---|---|---|
| Free (default) | 60 | 60 s |
| High volume | 600 | 30 s |
High-volume access is granted on request — contact us with your domain and use case.
Terms of Free Usage
The free programmatic REST JSON data tier is provided at no cost in exchange for active domain attribution validation. To remain compliant with the free tier, any website or application that publicly displays values returned by this API must include a visible credit linking back to drhint.com. Attribution-removed deployments are auto-detected and rate-limited.
- ✅ Allowed
Personal sites, blogs, commercial apps, dashboards. - ✅ Required
Visible credit link on every page that displays our data. - ❌ Not allowed
Reselling the raw feed or hiding the source credit.
Paste this snippet into any blog, news article or website. It updates automatically and includes a visible source credit linking back to DrHint.
<p style="font-size:12px;font-family:Arial,sans-serif;">Live data streaming via <a href="https://drhint.com" target="_blank" rel="noopener">DrHint API</a></p>Free for personal and commercial use. Attribution link must remain visible.