📥 Download Datasets
Primary Dataset (USD Normalized)
data/latest.csv
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.
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
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)
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)"
},
...
]
{
"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}`);
// Get latest price
const latest = data[data.length - 1];
console.log(`Latest: $${latest.price} on ${latest.date}`);
// Filter by year
const year2020 = data.filter(d => d.date.startsWith('2020'));
});
.then(response => response.json())
.then(data => {
console.log(`Total records: ${data.length}`);
// Get latest price
const latest = data[data.length - 1];
console.log(`Latest: $${latest.price} on ${latest.date}`);
// Filter by year
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()
# Get total records
print(f"Total records: {len(data)}")
# Get latest price
latest = data[-1]
print(f"Latest: ${latest['price']} on {latest['date']}")
response = requests.get('https://freegoldapi.com/data/latest.json')
data = response.json()
# Get total records
print(f"Total records: {len(data)}")
# Get latest price
latest = data[-1]
print(f"Latest: ${latest['price']} on {latest['date']}")
curl
# Get full JSON response
curl -s https://freegoldapi.com/data/latest.json
# Count total records
curl -s https://freegoldapi.com/data/latest.json | jq 'length'
# Get latest price
curl -s https://freegoldapi.com/data/latest.json | jq '.[-1]'
curl -s https://freegoldapi.com/data/latest.json
# Count total records
curl -s https://freegoldapi.com/data/latest.json | jq 'length'
# Get latest price
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
# Load gold prices (USD normalized)
df = pd.read_csv('https://freegoldapi.com/data/latest.csv')
# Get current gold price
latest_price = df.iloc[-1]['price']
print(f"Current gold price: ${latest_price:.2f}")
# Load with silver ratios
df_ratio = pd.read_csv('https://freegoldapi.com/data/gold_silver_ratio_enriched.csv')
# Load gold prices (USD normalized)
df = pd.read_csv('https://freegoldapi.com/data/latest.csv')
# Get current gold price
latest_price = df.iloc[-1]['price']
print(f"Current gold price: ${latest_price:.2f}")
# Load with silver ratios
df_ratio = pd.read_csv('https://freegoldapi.com/data/gold_silver_ratio_enriched.csv')
JavaScript
// Fetch gold prices
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}`);
});
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
# Get latest gold price
curl -s https://freegoldapi.com/data/latest.csv | tail -1
# Get gold prices for specific year
curl -s https://freegoldapi.com/data/latest.csv | grep "^2020"
curl -s https://freegoldapi.com/data/latest.csv | tail -1
# Get gold prices for specific year
curl -s https://freegoldapi.com/data/latest.csv | grep "^2020"
📚 All Data Sources
Gold Price Sources
MeasuringWorth - British Official
Period: 1258-1717
Records: ~460
Currency: GBP
Oldest available gold price data
Records: ~460
Currency: GBP
Oldest available gold price data
MeasuringWorth - London Market
Period: 1718-1959
Records: ~242
Currency: GBP (converted to USD)
London gold market prices
Records: ~242
Currency: GBP (converted to USD)
London gold market prices
World Bank Pink Sheet
Period: 1960-2024
Records: ~780
Currency: USD
Commodity market prices (PGOLD)
Records: ~780
Currency: USD
Commodity market prices (PGOLD)
Yahoo Finance - Gold Futures
Period: 2025-present
Records: ~196 (grows daily)
Currency: USD
Ticker: GC=F
Real-time gold futures
Records: ~196 (grows daily)
Currency: USD
Ticker: GC=F
Real-time gold futures
Silver & Ratio Sources
Yahoo Finance - Silver Futures
Period: 2025-present
Ticker: SI=F
Purpose: Calculate current gold/silver ratios
Not merged into gold dataset
Ticker: SI=F
Purpose: Calculate current gold/silver ratios
Not merged into gold dataset
MeasuringWorth - Gold/Silver Ratio
Period: 1687-2024
Records: ~338
Historical ratio data (oz silver per oz gold)
Records: ~338
Historical ratio data (oz silver per oz gold)
Exchange Rate Sources
MeasuringWorth - USD/GBP
Period: 1791-present
Records: ~234
Used to normalize GBP prices to USD
Records: ~234
Used to normalize GBP prices to USD
Disabled Sources
FRED (Federal Reserve)
Period: 1968-present
Requires API key (disabled by default)
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.