Silver Price API (XAG): Live USD Rate from JSON
A silver price API is a REST endpoint that returns the spot rate for silver as JSON. On Metals-API the ISO 4217 metal code is XAG (one troy ounce of silver). Call GET /api/latest with base=USD and symbols=XAG: rates.XAG is ounces per 1 USD; rates.USDXAG is already USD per ounce.
Do not mix ISO XAG with LBMA silver (USDLBXAG / LBXAG on the symbols page). The Latest Rates sample below is dated 2018-09-10 — copy the curl with your key for today’s print. Docs: metals-api.com/documentation. The same access_key also drives convert, time-series, fluctuation, OHLC, intraday, and lowest/highest — and there is an MCP server so agents can call those tools without wrapping REST themselves. Copper Monthly starts at $19.99/mo (2,500 calls, 10-minute updates, 10 symbols per request). Register at metals-api.com/register.
Request: latest silver (XAG) in USD
curl "https://metals-api.com/api/latest?access_key=YOUR_KEY&base=USD&symbols=XAG"
Query params from the docs: access_key (required), base (optional, default USD), symbols (required, comma-separated). Optional unit: Pound, Ounce, Troy Ounce, Gram, KG, Ton. Update cadence is 60 minutes, 10 minutes, or 60 seconds depending on the plan. LBMA fields, when you request them, are the previous day’s close — not a live tick.
Response: XAG plus USDXAG
Envelope from the official Latest Rates docs (sample date 2018-09-10). The published fixture also includes gold and palladium; a live call with symbols=XAG returns the silver pair. Trailing commas from the doc page are removed so this is valid JSON:
{
"success": true,
"timestamp": 1519296206,
"base": "USD",
"date": "2018-09-10",
"rates": {
"USD": 1,
"XAG": 0.041405839732253,
"XAU": 0.0004831705,
"XPD": 0.00084781687155574,
"USDXAG": 24.151182694673185,
"USDXAU": 2069.6627794950227,
"USDXPD": 1179.5000000000057
}
}
timestamp is UNIX time of the quote. To display “silver in USD”, prefer rates.USDXAG (~24.15 in this sample). The invert matches: 1 / 0.041405839732253 ≈ 24.15 USD per ounce, which is USDXAG 24.151182694673185.
Request: historical silver by calendar date
Most currency/metal history on this endpoint starts in 2019. LBMA silver history goes back to 2010 on the dedicated LBMA historical endpoint. Dated URL — this is the docs example (it also lists gold and palladium):
curl "https://metals-api.com/api/2013-12-24?access_key=YOUR_KEY&base=EUR&symbols=XAU,XAG,XPD"
The path is /api/YYYY-MM-DD. The JSON adds "historical": true and a date field. EOD prints become available at 00:05 GMT for the previous day. Time-series end_date cannot be today — use a prior day, and use /api/latest for the last print.
Other endpoints on the same key
/api/latest is the live tick. The rest of Metals-API is the same host, same access_key, different path — convert an amount, chart a window, measure the move, or pull candles. Symbol-page curls for silver:
curl "https://metals-api.com/api/convert?access_key=YOUR_KEY&from=USD&to=XAG&amount=100"
curl "https://metals-api.com/api/timeseries?access_key=YOUR_KEY&start_date=2023-05-01&end_date=2023-05-25&symbols=XAG"
curl "https://metals-api.com/api/fluctuation?access_key=YOUR_KEY&type=last_day&symbols=XAG"
curl "https://metals-api.com/api/open-high-low-close/2024-01-15?access_key=YOUR_KEY&base=USD&symbols=XAG"
curl "https://metals-api.com/api/intraday?access_key=YOUR_KEY&symbol=XAG&base=USD&date=2025-07-25&interval=1h"
curl "https://metals-api.com/api/lowest-highest/2024-01-15?access_key=YOUR_KEY&base=USD&symbols=XAG"
GET /api/convert—from,to,amount; optionaldatefor a historical convert. Official Convert sample envelope (GBP→JPY fixture):query,info.rate,result. Swap the pair for USD→XAG as above; do not reuse the GBP/JPYresultas a silver print.GET /api/timeseries— daily rates between two dates. One symbol per request; range depends on the plan. Docs example usesXAUand2023-05-01…2023-05-25; same params withsymbols=XAG. Shortcut:type=last_day.GET /api/fluctuation— change andchange_pctbetween two dates, ortype=last_day.GET /api/open-high-low-close/{YYYY-MM-DD}— one symbol per request. Open/close are UTC day bounds, not exchange-session hours. If you query today, high/close can still move.GET /api/intraday— candles for one symbol on one date. Docs example:symbol=XAU,date=2025-07-25,interval=1h. Candle count is plan-capped. Intervals go from 1m to 1d.GET /api/lowest-highest/{YYYY-MM-DD}— one symbol per request.GET /api/carat— gold by carat (not silver). Same key, different metal.
Time-series, fluctuation, OHLC, and lowest/highest are not a substitute for /api/latest. Dedicated LBMA and LME historical endpoints go further back than generic metal history (silver LBMA from 2010).
MCP: same tools for agents
Metals-API ships a Model Context Protocol server so Claude Desktop, ChatGPT connectors, or any MCP client can call the same data without you writing the HTTP client. Setup: metals-api.com/mcp. Endpoint:
https://metals-api.mcp.metals-api.com/mcp?api_key=YOUR_API_KEY
Each MCP tool call counts as one REST request against the same quota. Tools: metals.latest, metals.historical, metals.convert, metals.time_series, metals.fluctuation, metals.ohlc, metals.intraday, metals.symbols. Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"metals-api": {
"command": "npx",
"args": [
"mcp-remote",
"https://metals-api.mcp.metals-api.com/mcp?api_key=YOUR_API_KEY"
]
}
}
}
The MCP page’s demo prompt is gold (metals.latest with symbols=XAU, base=USD). For this post, ask for silver and pass XAG the same way.
Go live with XAG
1. Register and pick a monthly plan (Copper Monthly is $19.99).
2. Confirm XAG vs LBMA silver on the symbols page.
3. Call https://metals-api.com/api/latest?access_key=YOUR_KEY&base=USD&symbols=XAG
4. Render rates.USDXAG. Cache to the plan interval (10 minutes on Copper Monthly) so a dashboard refresh does not burn the 2,500 calls.
5. For charts, % change, or candles, use timeseries / fluctuation / OHLC / intraday. For agents, paste the MCP URL from /mcp.
Support: [email protected], Monday–Friday 7am–4pm EST.
FAQ: silver price API (XAG)
What is XAG?
XAG is the ISO 4217 code for one troy ounce of silver. Metals-API also exposes LBMA silver as USDLBXAG (from LBXAG). Use the symbol you actually need — ISO spot and the LBMA fix are not the same field.
How do I get the silver price in USD from the JSON?
Read rates.USDXAG when base=USD. If you only have rates.XAG, invert: usd_per_ounce = 1 / rates.XAG.
Is the docs sample today’s silver price?
No. The Latest Rates sample is dated 2018-09-10 with USDXAG ≈ 24.15. Always hit /api/latest with your key.
Copper Monthly vs Gold Monthly?
Copper Monthly is $19.99/mo, 2,500 calls, 10-minute updates. Gold Monthly is $149.99/mo (higher quota and 60-second updates on the Gold tier). Both can request XAG — the difference is volume and freshness, not the metal code.
Is MCP extra?
No separate product. Same key, same quota. Point the client at https://metals-api.mcp.metals-api.com/mcp?api_key=YOUR_API_KEY. Each tool call is one API request.