For Developers

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.

Latency
< 80 ms global edge
Uptime
99.95% rolling 30 days
Price
Free · 60 req/min

Endpoint

GET https://myviraltags.com/api/public/hooks/gold-rates

Sample 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://myviraltags.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://myviraltags.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://myviraltags.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

TierRequests / minCache TTL
Free (default)6060 s
High volume60030 s

High-volume access is granted on request — contact us with your domain and use case.

Share MyViralTags on WhatsApp