📥 Download Datasets
Primary Dataset (USD Normalized)
Format: date, price, source
Coverage: 1258-2025 (768 years)
All prices normalized to USD where exchange rates available (1791+).
Pre-1791 British prices remain in GBP.
Gold/Silver Ratio Enriched
data/gold_silver_ratio_enriched.csv
Format: date, price, silver_oz_per_gold_oz
Coverage: 1687-2025
Includes historical and calculated gold/silver ratios
Silver-Normalized (Metallic Standard)
data/gold_silver_normalized.csv
Format: date, price, source
Coverage: 1688-2025 (1,248 records)
Gold value expressed in ounces of silver (transcends fiat currency)
🔄 Auto-Updated Daily: Data refreshes automatically at 6 AM UTC via GitHub Actions
🌐 JSON API Endpoint
✨ CORS-Enabled: Access data directly from any web application without proxy servers
Endpoint URL
https://freegoldapi.com/data/latest.json
Response Format
[
{
"date": "1258-01-01",
"price": 0.89,
"source": "measuringworth_british (GBP)"
},
{
"date": "1259-01-01",
"price": 0.89,
"source": "measuringworth_british (GBP)"
},
...
]
Example Usage
JavaScript (Fetch API)
fetch('https://freegoldapi.com/data/latest.json')
.then(response => response.json())
.then(data => {
console.log(`Total records: ${data.length}`);
const latest = data[data.length - 1];
console.log(`Latest: $${latest.price} on ${latest.date}`);
const year2020 = data.filter(d => d.date.startsWith('2020'));
});
Python (requests)
import requests
response = requests.get('https://freegoldapi.com/data/latest.json')
data = response.json()
print(f"Total records: {len(data)}")
latest = data[-1]
print(f"Latest: ${latest['price']} on {latest['date']}")
curl
curl -s https://freegoldapi.com/data/latest.json
curl -s https://freegoldapi.com/data/latest.json | jq 'length'
curl -s https://freegoldapi.com/data/latest.json | jq '.[-1]'
Features
- CORS Enabled: Call directly from browser JavaScript
- No API Key Required: Free and open access
- Same Data as CSV: Identical to data/latest.csv
- Simple Array Format: Easy to parse and filter
- Daily Updates: Synchronized with CSV updates at 6 AM UTC
📊 Data Sources Timeline
🔧 Quick Start Examples
Python
import pandas as pd
df = pd.read_csv('https://freegoldapi.com/data/latest.csv')
latest_price = df.iloc[-1]['price']
print(f"Current gold price: ${latest_price:.2f}")
df_ratio = pd.read_csv('https://freegoldapi.com/data/gold_silver_ratio_enriched.csv')
JavaScript
fetch('https://freegoldapi.com/data/latest.csv')
.then(response => response.text())
.then(csv => {
const lines = csv.split('\n');
const lastLine = lines[lines.length - 2];
const [date, price] = lastLine.split(',');
console.log(`Gold price on ${date}: $${price}`);
});
curl
curl -s https://freegoldapi.com/data/latest.csv | tail -1
curl -s https://freegoldapi.com/data/latest.csv | grep "^2020"
📚 All Data Sources
Gold Price Sources
Period: 1258-1717
Records: ~460
Currency: GBP
Oldest available gold price data
Period: 1718-1959
Records: ~242
Currency: GBP (converted to USD)
London gold market prices
Period: 1960-2024
Records: ~780
Currency: USD
Commodity market prices (PGOLD)
Period: 2025-present
Records: ~196 (grows daily)
Currency: USD
Ticker: GC=F
Real-time gold futures
Silver & Ratio Sources
Period: 2025-present
Ticker: SI=F
Purpose: Calculate current gold/silver ratios
Not merged into gold dataset
Period: 1687-2024
Records: ~338
Historical ratio data (oz silver per oz gold)
Exchange Rate Sources
Period: 1791-present
Records: ~234
Used to normalize GBP prices to USD
Disabled Sources
Period: 1968-present
Requires API key (disabled by default)
🔄 Merge Strategy
When dates overlap, priority order is:
- Yahoo Finance (daily, most recent)
- World Bank (monthly)
- MeasuringWorth London (annual)
- MeasuringWorth British (annual, oldest)
Higher granularity always wins. Daily data overrides monthly, which overrides annual.