API ACCESS
Gold Rate API
Real-time gold and silver price data for developers and businesses | Simple integration | Powerful endpoints
99.9%
Uptime Guaranteed
5s
Update Interval
20+
Currencies Supported
10K+
Daily Requests
Live API Tester
Test the API endpoints in real-time and see the response instantly
Ready
0ms
Click "Send Request" to test the API
API Documentation
Everything you need to integrate our gold rate API into your application
Authentication
All API requests require an API key. Include your API key in the request header:
X-API-Key: your_api_key_here
Get your free API key by contacting us at api@goldcoinstandard.com
Base URL
https://api.goldcoinstandard.com/v1/
Endpoints
GET
/latest
Get the latest gold and silver prices
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| metal | string | No | gold, silver, or both (default: both) |
| currency | string | No | USD, PKR, INR, etc. (default: USD) |
Example Request:
curl -X GET "https://api.goldcoinstandard.com/v1/latest?metal=gold¤cy=PKR" \
-H "X-API-Key: your_api_key"
Example Response:
{
"success": true,
"data": {
"metal": "gold",
"currency": "PKR",
"price_per_gram": 19500.50,
"price_per_oz": 606500.00,
"timestamp": "2024-01-15T14:30:00Z",
"change_24h": 1.25
}
}
GET
/historical
Get historical gold and silver price data
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| metal | string | Yes | gold or silver |
| days | integer | No | Number of days (1-365, default: 30) |
| currency | string | No | USD, PKR, INR, etc. (default: USD) |
Example Request:
curl -X GET "https://api.goldcoinstandard.com/v1/historical?metal=gold&days=7" \
-H "X-API-Key: your_api_key"
Example Response:
{
"success": true,
"data": {
"metal": "gold",
"currency": "USD",
"period": 7,
"prices": [
{"date": "2024-01-15", "price": 1950.50},
{"date": "2024-01-14", "price": 1948.20},
{"date": "2024-01-13", "price": 1945.80}
]
}
}
GET
/country
Get gold prices by country
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| country | string | Yes | Country name (e.g., pakistan, india) |
Example Request:
curl -X GET "https://api.goldcoinstandard.com/v1/country?country=pakistan" \
-H "X-API-Key: your_api_key"
GET
/convert
Convert gold weight to different units
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| metal | string | Yes | gold or silver |
| amount | float | Yes | Amount to convert |
| from_unit | string | Yes | g, oz, tola |
| to_unit | string | Yes | g, oz, tola |
Example Request:
curl -X GET "https://api.goldcoinstandard.com/v1/convert?metal=gold&amount=10&from_unit=oz&to_unit=g" \
-H "X-API-Key: your_api_key"
Error Codes
| Code | Message | Description |
|---|---|---|
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Endpoint not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Something went wrong on our end |
Rate Limits
100
Requests per minute (Free)
1,000
Requests per minute (Pro)
10,000
Requests per minute (Enterprise)
SDKs & Libraries
We provide official SDKs for popular programming languages:
Ready to Get Started?
Get your free API key and start integrating gold rate data into your application today.
API Disclaimer: The API is for demonstration purposes. Real API access requires authentication. Contact us for production access and pricing.