Dec 08, 2025 21:06:42 pm (-05:00, America/New_York Time)

Free Gold Price API (REST, JSON, PHP)

Important Notice — 27 August 2023: Our API now runs exclusively over HTTPS for enhanced security. If your integration still uses http://, update it to https:// to avoid connection issues.

Live Gold & Silver Price API — Free Tier for Websites

Add reliable, real-time gold and silver prices to your website, blog, or application. Our free tier is built for high availability and simple integration.

  • Free access — no hidden charges.
  • Rate limits: 30–60 requests/hour (≈ 44,640 per month, depending on plan/allocation).
  • Roadmap: additional commodities (e.g., copper, oil) and broader currency coverage.

Why Choose Our API

Developer-friendly, HTTPS JSON endpoints with global coverage and a straightforward free tier.

  • Free & transparent limits. Up to 30–60 requests per hour (≈ 44,640/month), clearly documented.
  • Simple integration. Language-agnostic REST + JSON. Ready-to-use PHP and cURL samples (see Section 4).
  • Global coverage. Gold and silver prices with multi-currency support and common units (gram, ounce, kg, tola, baht, masha, etc.).
  • Karat conversions built in. 24k down to 10k with formulas/examples in the sample package.
  • Caching-first pattern. Cron + DB examples to keep pages fast and stay within rate limits.
  • Security baseline. HTTPS-only endpoints; keep keys server-side (never expose in client code).
  • Clear activation flow. One proof email (key + site URL) records compliance; no auto-disables, fair grace periods.

Contents

  1. API Registration
  2. How to Pull Real-Time Quotes
  3. Best Practices (Cache + Cron)
  4. Integration Examples (PHP + cURL)
  5. Response Format & Field Reference
  6. Rate Limits & Error Handling
  7. Security & Compliance
  8. Support & Key Status
  9. Terms & Policies

1) API Registration

2) How to Pull Real-Time Quotes

Download the sample PHP code: pull_gold_rates.zip (WinZip).

Authentication: send your key via header X-API-KEY: YOUR_API_KEY. Responses are JSON. Use https:// endpoints only.

2.1) Pulling Gold Rates Only

curl -X GET \
  -H "X-API-KEY: YOUR_API_KEY" \
  https://goldpricez.com/api/rates/currency/usd/measure/all

Change the currency (e.g., SAR, AUD, GBP, EUR, CAD, INR, PKR, AED) and the unit (e.g., gram, kg, ounce, grain, baht, tola-india, tola-pakistan, masha, etc.).

Examples:

# Specific currency
curl -X GET -H "X-API-KEY: YOUR_API_KEY" \
  https://goldpricez.com/api/rates/currency/gbp/measure/all

# Specific unit
curl -X GET -H "X-API-KEY: YOUR_API_KEY" \
  https://goldpricez.com/api/rates/currency/gbp/measure/gram

curl -X GET -H "X-API-KEY: YOUR_API_KEY" \
  https://goldpricez.com/api/rates/currency/usd/measure/ounce

2.2) Pulling Both Gold & Silver

curl -X GET \
  -H "X-API-KEY: YOUR_API_KEY" \
  https://goldpricez.com/api/rates/currency/gbp/measure/gram/metal/all

3) Best Practices (Cache + Cron)

To stay within rate limits and improve page speed, don’t call the API on every page view. Use a simple cache:

  • Create a database table (e.g., goldrate). A sample SQL is included in the zip file.
  • Create a script (e.g., pull_gold_rates.php) to fetch from the API and upsert into goldrate.
  • Run a cron job every 1–2 minutes:
    wget -q -O - https://your-website/pull_gold_rates.php >/dev/null 2>&1
    
  • Render prices to users from your database, not directly from the API.

Tip: Implement backoff on errors and respect 429 Too Many Requests responses.

4) Integration Examples (PHP + cURL)

4.1) Minimal PHP (cURL)

<?php
$endpoint = 'https://goldpricez.com/api/rates/currency/usd/measure/all';
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
  CURLOPT_HTTPHEADER     => ['X-API-KEY: ' . getenv('GOLDPRICEZ_API_KEY')],
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_TIMEOUT        => 10,
]);
$raw = curl_exec($ch);
$http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http === 200 && $raw) {
  $data = json_decode($raw, true);
  // TODO: persist $data to DB, then render from DB in your pages
  echo number_format($data['ounce_in_gbp'] ?? 0, 2);
} else {
  // TODO: log and fallback to last cached value
  http_response_code(503);
  echo 'Service temporarily unavailable';
}

More complete samples (including SQL and helper functions) are in pull_gold_rates.zip.

5) Response Format & Field Reference

5.1) Example (Gold, GBP, all measures)

{
  "ounce_price_usd": "1251.10",
  "gmt_ounce_price_usd_updated": "19-12-2018 01:16:01 pm",
  "ounce_price_ask": "1251.10",
  "ounce_price_bid": "1250.74",
  "ounce_price_usd_today_low": "1248.41",
  "ounce_price_usd_today_high": "1251.63",
  "usd_to_gbp": "0.790239",
  "gmt_gbp_updated": "19-12-2018 09:05:00 am",
  "ounce_in_gbp": 988.6680129,

  "gram_to_ounce_formula": 0.0321,
  "gram_in_usd": 40.16031,
  "gram_in_gbp": 31.73624321409,

  "kg_to_ounce_formula": 32.1507,
  "kg_in_usd": 40223.74077,
  "kg_in_gbp": 31786.368682344,

  "grain_to_ounce_formula": 0.002,
  "grain_in_usd": 2.5022,
  "grain_in_gbp": 1.9773360258,

  "tael-hongkong_to_ounce_formula": 1.21528,
  "tael-hongkong_in_usd": 1520.436808,
  "tael-hongkong_in_gbp": 1201.5084627171,

  "tael-japan_to_ounce_formula": 1.2056,
  "tael-japan_in_usd": 1508.32616,
  "tael-japan_in_gbp": 1191.9381563522,

  "tola-india_to_ounce_formula": 0.375,
  "tola-india_in_usd": 469.1625,
  "tola-india_in_gbp": 370.7505048375,

  "tola-pakistan_to_ounce_formula": 0.40125,
  "tola-pakistan_in_usd": 502.003875,
  "tola-pakistan_in_gbp": 396.70304017612,

  "masha_to_ounce_formula": 0.03119,
  "masha_in_usd": 39.021809,
  "masha_in_gbp": 30.836555322351,

  "ratti_to_ounce_formula": 0.00585,
  "ratti_in_usd": 7.318935,
  "ratti_in_gbp": 5.783707875465
}

5.2) Example (Gold + Silver, GBP, gram)

{
  "ounce_price_usd": "1674.47",
  "gmt_ounce_price_usd_updated": "08-03-2020 04:52:01 am",
  "ounce_price_ask": "1674.47",
  "ounce_price_bid": "1673.90",
  "ounce_price_usd_today_low": "1642.13",
  "ounce_price_usd_today_high": "1692.46",
  "usd_to_gbp": "0.766342",
  "gmt_gbp_updated": "08-03-2020 12:05:16 am",
  "ounce_in_gbp": 1283.21668874,

  "gram_to_ounce_formula": 0.0321,
  "gram_in_usd": 53.750487,
  "gram_in_gbp": 41.191255708554,

  "silver_gram_in_usd": 0.5569029,
  "silver_gram_in_gbp": 0.4267780821918,
  "silver_ounce_in_gbp": 13.295267358,
  "silver_ounce_price_ask_gbp": 13.314425908,
  "silver_ounce_price_bid_gbp": 13.276108808,
  "silver_ounce_price_gbp_today_low": 13.047738892,
  "silver_ounce_price_gbp_today_high": 13.486086516
}

5.3) Field Descriptions (Gold)

# JSON Field Example Description
1ounce_price_usd1295.56Spot ounce price in USD
2gmt_ounce_price_usd_updated18-08-2017 12:28:11 pmTimestamp of USD ounce update (GMT)
3ounce_price_ask1295.56Ask price (USD)
4ounce_price_bid1295.10Bid price (USD)
5ounce_price_usd_today_low1288.41Day low (USD/oz)
6ounce_price_usd_today_high1301.63Day high (USD/oz)
7usd_to_gbp0.790239FX: USD→GBP
8gmt_gbp_updated19-12-2018 09:05:00 amTimestamp of GBP update (GMT)
9ounce_in_gbp988.6680129Ounce price in GBP
10gram_to_ounce_formula0.03211 gram = 0.0321 troy oz
11gram_in_usd41.587476Gram price in USD
12gram_in_gbp32.271881376Gram price in GBP
13kg_to_ounce_formula32.15071 kg = 32.1507 troy oz
14kg_in_usd41653.160892Kilogram price in USD
15kg_in_gbp32322.852852192Kilogram price in GBP
16grain_to_ounce_formula0.0021 grain = 0.002 troy oz
17grain_in_usd2.59112Grain price in USD
18grain_in_gbp2.01070912Grain price in GBP
19tael-hongkong_to_ounce_formula1.215281 HK tael = 1.21528 troy oz
20tael-hongkong_in_usd1574.4681568HK tael price in USD
21tael-hongkong_in_gbp1221.7872896768HK tael price in GBP
22tael-japan_to_ounce_formula1.20561 JP tael = 1.2056 troy oz
23tael-japan_in_usd1561.927136JP tael price in USD
24tael-japan_in_gbp1212.055457536JP tael price in GBP
25tola-india_to_ounce_formula0.3751 Indian tola = 0.375 troy oz
26tola-india_in_usd485.835Indian tola price in USD
27tola-india_in_gbp377.00796Indian tola price in GBP
28tola-pakistan_to_ounce_formula0.401251 Pakistan tola = 0.40125 troy oz
29tola-pakistan_in_usd519.84345Pakistan tola price in USD
30tola-pakistan_in_gbp403.3985172Pakistan tola price in GBP
31masha_to_ounce_formula0.031191 masha = 0.03119 troy oz
32masha_in_usd40.4085164Masha price in USD
33masha_in_gbp31.3570087264Masha price in GBP
34ratti_to_ounce_formula0.005851 ratti = 0.00585 troy oz
35ratti_in_usd7.579026Ratti price in USD
36ratti_in_gbp5.881324176Ratti price in GBP

5.4) Additional Silver Fields (when metal=all)

  • silver_ounce_price_usd — Silver ounce in USD
  • silver_gram_in_usd, silver_gram_in_gbp — Silver gram price
  • silver_ounce_in_gbp — Silver ounce in GBP
  • silver_ounce_price_ask_gbp, silver_ounce_price_bid_gbp
  • silver_ounce_price_gbp_today_low / _high

6) Rate Limits & Error Handling

  • Free tier: 30–60 requests/hour (plan-dependent). Do not exceed limits.
  • On sustained violations, IP access may be blocked.
  • Recommended polling interval: 60–120 seconds via cron + DB cache.

Status Codes

  • 200 OK — Successful response
  • 400 Bad Request — Invalid parameters
  • 401 Unauthorized — Missing/invalid X-API-KEY
  • 403 Forbidden — Key not active or blocked
  • 404 Not Found — Resource or path invalid
  • 429 Too Many Requests — Slow down; implement backoff
  • 5xx Server errors — Retry with exponential backoff

Error Payload (example)

{
  "error": true,
  "code": 429,
  "message": "Too Many Requests. Please reduce frequency."
}

7) Security & Compliance

  • Use HTTPS only. Never expose your key in client-side code.
  • Keep keys in server env variables; rotate if compromised.
  • Cache results; avoid exposing raw endpoints directly to browsers.

8) Support & Key Status



Version: Nov 15, 2025 • Effective: Dec 06, 2025

We may update these Terms from time to time. For material changes, we’ll make reasonable efforts to provide notice (on this page, the API docs, the key status page, and/or by email to registered users). Your continued use of the API on or after the Effective Date constitutes acceptance of the updated Terms.

9) API Terms & Conditions

  1. Free Access. Our API is provided free of charge for use on websites only.
  2. Data Nature. API data is for informational purposes only and does not constitute financial advice. See our Disclaimer.
  3. Future Plans. We have not charged fees to date. We may introduce additional plans or features (including paid tiers) in the future; updates will appear on this page.
  4. Attribution (Free Tier). If you publicly display API data, include a visible attribution to our site as source credit. Example:
    <a href="https://goldpricez.com" target="_blank" rel="noopener">GoldPriceZ.com</a>
    • Acceptable locations: footer, “About,” “Data Sources,” or other publicly visible, relevant pages.
    • Exactly one attribution per website (domain) is sufficient; site-wide links are not required.
    • The link must be visible to users and not hidden, cloaked, or placed on doorway/empty pages.
    • Anchor text should be brand-oriented (e.g., “GoldPriceZ.com” or “Gold Price API by GoldPriceZ”). Avoid keyword-stuffing.
    • Rel attributes: rel="nofollow", rel="sponsored", or rel="ugc" are acceptable. We do not require followed links.
    • Indexability by search engines is not required; the page must be publicly reachable by users.
    • We may request reasonable adjustments to placement/format to ensure clear attribution and avoid user confusion.
  5. Registration & Records. After adding attribution, email us once at goldpricekg@gmail.com with:
    • Your API key
    • The URL where attribution appears
    This allows us to record compliance for future reference. For activation/status checks, use goldpricez.com/key/info.
  6. Restrictions. You may not:
    • Resell, sublicense, or redistribute raw API data to third parties;
    • Remove, hide, misrepresent, or alter required attribution;
    • Use the API for unlawful, abusive, or disruptive purposes, or on illegal content;
    • Expose API keys in client-side code or perform abusive scraping.
  7. Rate Limits. Unless otherwise agreed, each IP or API key is limited to up to 60 requests per hour (or 30–60/hour depending on allocation), measured over a rolling window. We may throttle or temporarily suspend access if limits are exceeded or abuse is detected.
  8. Security. Use HTTPS. Keep API keys confidential and server-side (do not embed in client-side code). Rotate keys if you suspect compromise.
  9. Enforcement & Grace Periods. We do not automatically disable keys. If attribution is missing, we will send a reminder and provide a reasonable grace period (e.g., 7–14 days). If unresolved, API access may be temporarily blocked until fixed. Access may be revoked immediately for abuse, misuse, or security reasons.
  10. Changes & Termination. We may modify, suspend, or discontinue the API at any time, with or without notice. For material changes, we will make reasonable efforts to post notice on this page. Your continued use after changes constitutes acceptance.
  11. Liability. The API is provided “as is,” without warranties. We accept no liability for losses or damages arising from its use. See our Disclaimer.
  12. Governing Terms. By using the API, you also agree to our Website Terms of Service, Privacy Policy, and Disclaimer.
  13. Amendments. Changes take effect upon posting on this page and apply to new and existing users.
  14. Service Scope. The API service and requirements apply equally to all free-tier users. If we introduce paid tiers or additional services, details will be published here. Email or informal correspondence does not override these Terms.
  15. Contact. goldpricekg@gmail.com

Last updated: 15 November 2025

📈 Go to:
Share
✉️ Contact Us
ℹ️ Disclaimer
---

Silver Purity/types:

Unlike gold, silver is typically not classified by karats. Instead, silver purity is usually expressed as a percentage or parts per thousand. The most common purities are:

  • Fine Silver (99.9%): Used in investment-grade bullion, coins, and bars.
  • Sterling Silver (92.5%): Common in jewelry, silverware, and decorative items.
  • Coin Silver (90%): Previously used in coins, now less common.
  • Other Alloys: Lower purity silver used in budget or industrial applications.

Silver purity is often marked with stamps like "999," "925," or "900" to indicate the purity level.

- About Silver Types (in Detail),
- Methodologies, and References

Description of Weight Units:


Weight Unit Equivalent in Grams
Troy Ounce 31.1035
Kilogram 1000
Baht 15.244
Tola 11.664
Vori (Bori) 11.664
Pennyweight 1.555
Pound 453.592
Grain 0.065
Ratti 0.121
Carat 0.2
Masha 3.885
Tael (Hong Kong) 37.429

- More Units (in Detail),
- Methodologies, and References

Description for currency:

Select your preferred currency to view silver prices. Prices are available in major global currencies like USD, EUR, GBP, and more. Choosing the correct currency ensures you see accurate and up-to-date pricing based on the exchange rate for your location or preference.

Live Silver Price Chart:

Use the duration options to view silver price trends over different time periods. 'Today' shows the current day's price movements, while '7 Days,' 'Month,' and '30 Days' provide recent trends. 'YTD' (Year-to-Date) and '1 Year' offer a longer-term view. Select 'More' for additional timeframes and detailed analysis.

This performance section provides an overview of silver price trends. The Summary tab offers an at-a-glance view with color-coded trend indicators showing percentage changes across key time horizons.
The Amount tab displays absolute value changes in both USD (global benchmark) and local currency, along with exchange rate movements, enabling precise profit/loss calculations.
The Percent tab reveals relative growth rates, essential for comparing silver's performance against other assets and inflation.
The History tab provides anchor price points on specific dates, supporting technical analysis and investment strategy backtesting.
Together, these tabs offer investors, jewelers, and economists multidimensional insights into silver's behavior across timeframes and currency perspectives.

Live Silver Price Calculator:


This tool estimates silver values using live market rates. Enter your silver weight, select a measurement unit (grams, tolas, ounces, etc.), and choose any currency. Click "Calculate" for instant valuation based on current prices. You can also switch tabs to value gold or convert currencies. All calculations reflect real-time market data for accurate precious metal valuation.

About this timestamp


The time shown here indicates when the price data was last fetched from our server. It is not the exact moment of a retail sale or trade, and may differ slightly from jewellery shops or live trading platforms because of data provider timing and currency conversion.

For transparency, full details of how prices are calculated and updated are available in the Reference section. There you can see the data sources, update frequency, and notes on what is included or excluded.

Silver Price Comparison by Purity:


This tool compares live silver prices across different purity levels and weight units. Switch between tabs to see values per ounce, gram, tola, or select "More" for units like baht, tael, etc. Each table shows today's current, lowest, and highest prices for every purity type in your chosen currency. Use the dropdown filters to focus on specific purities, switch weight measurements, or convert values to any global currency.

Silver Market Price Tool


This section shows live silver pricing with bid/ask spreads and customization options. View real-time market rates for different purity levels using the top tabs. The table displays three key prices per gram:

1. Current Price: Latest market rate
2. Bid Price: What buyers offer
3. Ask Price: What sellers request

Adjust the spread percentage to see how dealer margins affect prices, or add labor costs for jewelry valuation. Use the dropdowns to switch between purity levels, weight units, or currencies for international comparisons.

Silver Quantity Calculator Guide


This tool calculates silver prices for specific quantities in Pakistani Rupees. Select a weight unit (grams, tolas, ounces) using the tabs, or choose other units like "baht", "tael", etc. from the "More" dropdown. The table instantly shows spot, buy, and sell prices for common quantities (1, 5, 10 units) and allows custom quantity entry.

Key features:

1. Custom Quantity: Enter any amount for instant valuation
2. Spread Adjustment: Modify dealer margin spreads
3. Labor Costs: Add manufacturing fees for jewelry valuation
4. Live Rates: All prices update in real-time based on market data

Use the dropdowns to change silver purity, weight units, or convert prices to other currencies.

Explore more related information

Silver Price History


This section tracks silver's value over time. The table shows daily prices with percentage changes, highlighting market activity and closures.

Reference Information


The following information is about the primary data used in the above sections for transparency and trustworthiness. This section details the weight unit, purity, and currency. It also provides update times and data sources to ensure all information is fresh and accurate for decision-making.

Back to Top – Gold Price Updates