Download historical gold prices for symbol XAU. Retrieve one day or a date range, choose a quote currency and unit, and receive structured JSON for charts, research, and reporting.
GET YOUR API KEY VIEW API DOCUMENTATIONPreview the long-term trend, then use the API to retrieve structured historical gold data.
Give finance, pricing, and operations teams a consistent gold price history for valuations, margin reviews, budgeting, and customer reporting. Select the dates, currency, and unit that match the way your business works.
Reference gold prices from a specific transaction or reporting date.
Compare historical metal costs with product pricing and sales periods.
Use consistent XAU data across finance, operations, and customer reports.
Use the same reliable gold pricing service for historical analysis, current rates, currency-based reporting, and price-change comparisons.
Retrieve XAU spot prices for a specific date or a range of dates.
Explore historical gold ratesAccess the latest available gold price sourced from a global network of commercial market-data providers.
View the live gold price APIRequest historical or live XAU prices in the quote currency your business uses.
View supported currenciesCompare two dates and retrieve the percentage change in the gold price.
Compare gold price changes
Put a date in YYYY-MM-DD format in the endpoint path to retrieve that day's historical
gold rate. The previous day's rate becomes available at 00:05 GMT and response timestamps use UTC.
For the latest available XAU rate instead, use the live gold price API.
https://api.metalpriceapi.com/v1/2026-07-01?api_key=[API_KEY]&base=USD¤cies=XAU
The JSON response includes the requested date, currency, and gold rate in a structured format your reporting tools or development team can use.
Use the timeframe endpoint for daily historical gold rates between a required start and end date. A single request can cover up to 365 days; split longer histories into consecutive requests.
https://api.metalpriceapi.com/v1/timeframe?api_key=[API_KEY]&start_date=2026-07-01&end_date=2026-07-30&base=USD¤cies=XAU&unit=gram
Results are returned as JSON and can be downloaded for internal analysis or converted to CSV for spreadsheet workflows. Detailed implementation guidance is available when your technical team needs it.
VIEW TIMEFRAME DETAILS| Parameter | How to use it |
|---|---|
start_date |
First date in a timeframe request, formatted as YYYY-MM-DD. |
end_date |
Last date in the range. The maximum range is 365 days. |
base |
Quote currency for the gold price. It defaults to USD. |
currencies |
Use XAU to limit the response to gold. |
unit |
Gold defaults to price per troy ounce. Paid plans can request troy_oz,
gram, or kilogram.
|
| Response format | JSON over HTTPS, suitable for saving directly or transforming into CSV. |
Review endpoint details, compare plan limits, or create an API key for your first XAU request.
GET STARTEDJoin 12,000+ customers already using MetalpriceAPI. No credit card required.
Use our free WordPress integration when you also need to display current gold prices on your website.
VIEW WORDPRESS PLUGIN