Note: As of 27 August 2023, we've transitioned to HTTPS to bolster our security measures. Existing users may encounter issues when retrieving gold rates. Please ensure you replace 'http' with 'https' in your API calls to resolve any discrepancies.
Looking to showcase real-time gold and silver rates on your website or blog? We offer a reliable and free solution for your needs.
If these offerings align with your requirements, you've come to the right place.
In today's digital landscape, finding a free and dependable gold API can be challenging. We pride ourselves on offering a high-availability service complemented by robust support. Here's what you can expect:
This document has divided into the following sections
1. Registeration of the Gold API
2. Method of pulling the real time quotes
Suggestion with PHP Source code
2.1. Pulling the gold rates only
2.1.1. Example, cURL command
2.1.2. Output
2.1.3. Description of the output
2.2. Pulling both the gold and silver rates
2.2.1. Example, cURL command
2.2.2. Output
2.2.3. Description of the output
3. Terms and conditions of using our API
1. Create a new key by visting this link.
2. Now, request for registration by sending that key, URL of your website and requirements to goldpricekg@gmail.com, then we will inform you about the registration.
Note: the Gold API is free but the registration is a mandatory requirement
You can check the verification status (or end-date of the trial period) by visiting this link
On that interface, you will know about the end-date of the trial period.
Remember! On continues violation, we will block the IP access.
Sample of PHP source code for pulling the gold rates [WinZip File]
As mentioned above that per hour more than 60 API requests are not allowed. Therefore,
to avoid any inconvenience (e.g., blocking your access), we advise to follow these steps:
Using the Gold API, do not directly display the gold rates on your website, instead
3. After registering a key, you can pull the live gold and silver rates using our REST API. For testing the key, you can use any tool or programming language. You can also use CURL, its syntax is following
Example, cURL command:
curl -X GET -H "X-API-KEY: f6412fdf260d55b6cb460cb4e5bad69cf6412fdf" https://goldpricez.com/api/rates/currency/gbp/measure/all
Output:
"{\ "ounce_price_usd\ ":\ "1251.1\ ",\
"gmt_ounce_price_usd_updated\ ":\ "19-12-2018 01:16:01 pm\ ",\
"ounce_price_ask\ ":\ "1251.1\ ",\
"ounce_price_bid\ ":\ "1250.74\ ",\
"ounce_price_usd_today_low\ ":\ "1248.41\ ",\
"ounce_price_usd_today_high\ ":\ "1251.63\ ",\
"usd_to_gbp\ ":\ "0.790239\ ",\
"gmt_gbp_updated\ ":\ "19-12-2018 09:05:00 am\ ",\
"ounce_in_gbp\ ":988.6680129,\
"gram_to_ounce_formula\ ":0.0321,\
"gram_in_usd\ ":40.16031,\
"gram_in_gbp\ ":31.73624321409,\
"kg_to_ounce_formula\ ":32.1507,\
"kg_in_usd\ ":40223.74077,\
"kg_in_gbp\ ":31786.368682344,\
"grain_to_ounce_formula\ ":0.002,\
"grain_in_usd\ ":2.5022,\
"grain_in_gbp\ ":1.9773360258,\
"tael-hongkong_to_ounce_formula\ ":1.21528,\
"tael-hongkong_in_usd\ ":1520.436808,\
"tael-hongkong_in_gbp\ ":1201.5084627171,\
"tael-japan_to_ounce_formula\ ":1.2056,\
"tael-japan_in_usd\ ":1508.32616,\
"tael-japan_in_gbp\ ":1191.9381563522,\
"tola-india_to_ounce_formula\ ":0.375,\
"tola-india_in_usd\ ":469.1625,\
"tola-india_in_gbp\ ":370.7505048375,\
"tola-pakistan_to_ounce_formula\ ":0.40125,\
"tola-pakistan_in_usd\ ":502.003875,\
"tola-pakistan_in_gbp\ ":396.70304017612,\
"masha_to_ounce_formula\ ":0.03119,\
"masha_in_usd\ ":39.021809,\
"masha_in_gbp\ ":30.836555322351,\
"ratti_to_ounce_formula\ ":0.00585,\
"ratti_in_usd\ ":7.318935,\
"ratti_in_gbp\ ":5.783707875465} "
JSON Field | Example Value | Description |
ounce_price_usd | 1295.56 | Ounce Rate in USD |
gmt_ounce_price_usd_updated | 18-08-2017 12:28:11 pm | Gold Rate Updated according to GMT time |
usd_to_gbp | 0.776 | USD to GBP |
gmt_gbp_updated | 17-08-2017 05:00:00 am | GBP price updated according to GMT Time |
ounce_in_gbp | 1005.35456 | Ounce Price in GBP |
gram_to_ounce_formula | 0.0321 | 1 Gram = 0.0321 Troy Ounce |
gram_in_usd | 41.587476 | Gram Price in USD |
gram_in_gbp | 32.271881376 | Gram Price in GBP |
kg_to_ounce_formula | 32.1507 | 1 KG = 32.1507 Troy Ounce |
kg_in_usd | 41653.160892 | KG Price in USD |
kg_in_gbp | 32322.852852192 | KG Price in GBP |
grain_to_ounce_formula | 0.002 | 1 Grain = 0.002 Troy Ounce |
grain_in_usd | 2.59112 | Grain Price in USD |
grain_in_gbp | 2.01070912 | Grain Price in GBP |
tael-hongkong_to_ounce_formula | 1.21528 | 1 Tael (of Hongkong) = 1.21528 Troy Ounce |
tael-hongkong_in_usd | 1574.4681568 | Tael (of Hongkong) Price in USD |
tael-hongkong_in_gbp | 1221.7872896768 | Tael (of Hongkong) Price in GBP |
tael-japan_to_ounce_formula | 1.2056 | 1 Tael (of Japan) = 1.2056 Troy Ounce |
tael-japan_in_usd | 1561.927136 | Tael (of Japan) Price in USD |
tael-japan_in_gbp | 1212.055457536 | Tael (of Japan) Price in GBP |
tola-india_to_ounce_formula | 0.375 | 1 Indian Tola = 0.375 Troy Ounce |
tola-india_in_usd | 485.835 | Indian Tola Price in USD |
tola-india_in_gbp | 377.00796 | Indian Tola Price in GBP |
tola-pakistan_to_ounce_formula | 0.40125 | 1 Pakistan Tola = 0.40125 Troy Ounce |
tola-pakistan_in_usd | 519.84345 | Pakistan Tola Price in USD |
tola-pakistan_in_gbp | 403.3985172 | Pakistan Tola Price in GBP |
masha_to_ounce_formula | 0.03119 | 1 Masha = 0.03119 Troy Ounce |
masha_in_usd | 40.4085164 | Masha Price in USD |
masha_in_gbp | 31.3570087264 | Masha Price in GBP |
ratti_to_ounce_formula | 0.00585 | 1 Ratti = 0.00585 Troy Ounce |
ratti_in_usd | 7.579026 | Ratti Price in USD |
ratti_in_gbp | 5.881324176 | Ratti Price in GBP |
cURL command:
curl -X GET -H "X-API-KEY: f6412fdf260d55b6cb460cb4e5bad69cf6412fdf" https://goldpricez.com/api/rates/currency/gbp/measure/gram/metal/all
Output:
"{\"ounce_price_usd\":\"1674.47\",\
"gmt_ounce_price_usd_updated\":\"08-03-2020 04:52:01 am\",\
"ounce_price_ask\":\"1674.47\",\"
ounce_price_bid\":\"1673.9\",\"
ounce_price_usd_today_low\":\"1642.13\",\"
ounce_price_usd_today_high\":\"1692.46\",\"
usd_to_gbp\":\"0.766342\",\"
gmt_gbp_updated\":\"08-03-2020 12:05:16 am\",\"
ounce_in_gbp\":1283.21668874,\"
silver_ounce_in_gbp\":13.295267358,\"
gram_to_ounce_formula\":0.0321,\"
gram_in_usd\":53.750487,\"
gram_in_gbp\":41.191255708554,\"
silver_gram_in_usd\":0.5569029,\"
silver_gram_in_gbp\":0.4267780821918,\"
silver_ounce_price_ask_gbp\":13.314425908,\"
silver_ounce_price_bid_gbp\":13.276108808,\"
silver_ounce_price_gbp_today_low\":13.047738892,\"
silver_ounce_price_gbp_today_high\":13.486086516}"
You will see the output in the following format (note: the output will also include the gold price information as mentioned in the above table)
JSON Field | Example Value | Description |
silver_ounce_price_usd | 13 | Silver, Ounce Rate in USD |
silver_gram_price_usd | 10 | Silver, Gram Rate in USD |
silver_gram_price_gbp | 0.4 | Silver, Gram Rate in GBP |
silver_ounce_price_ask_gbp | 9.9 | Silver, Ounce Ask Price in GBP |
silver_ounce_price_bid_gbp | 10.1 | Silver, Ounce Bid Price in GBP |
silver_ounce_price_gbp_today_high | 13 | Today low price of silver per ounce in GBP |
silver_ounce_price_gbp_today_low | 7 | Today high price of silver per ounce in GBP |
For queries, suggestions, improvements, or assistance, kindly email to: goldpricekg@gmail.com