Google Currency Converter API - will it be closed using iGoogle?

iGoogle disable .

There is a (undocumented?) Currency Conversion API available with URLs such as: http://www.google.com/ig/calculator?hl=en&q=1GBP=?USD

The base of this url - google.com/ig - will lead you to iGoogle. Will the API be available after iGoogle?

+7
currency
source share
4 answers

I had the exact same problem described here: https://stackoverflow.com/a/166778/

I used @hobailey's answer for a temporary fix until I can upgrade it to another version or google decides to make the correct api.

How Google Changed the URL to

https://www.google.com/finance/converter?a 

So, the fix found is below.

  $amount = urlencode($amount); $from_Currency = urlencode($from_Currency); $to_Currency = urlencode($to_Currency); $get = file_get_contents("https://www.google.com/finance/converter?a=$amount&from=$from_Currency&to=$to_Currency"); $get = explode("<span class=bld>",$get); $get = explode("</span>",$get[1]); $converted_amount = preg_replace("/[^0-9\.]/", null, $get[0]); 

thanks @hobailey for this little fix.

+19
source share

Alternatively, you can use the following:

But the first of them is not one that is stable very often leaves the tank. We had an extreme problem in our production environment using the first exchange service a few months ago. So far, the second is stable, does not cause any problems.

+9
source share

iGoogle has already expired, but not the gadget link you posted. It currently returns 200 OK , possibly with your desired message.

Update: Expired. There are currently no gadgets.

Update: Available from here https://www.google.com/finance/converter?a=16.6700&from=GBP&to=USD

+3
source share

Free currency converter from http://mycurrency.net

  • It is 100% free.
  • No API key required!
  • There is no limit to the frequency of API calls.
  • The currency price is updated every two hours.
  • Support for json format.
  • Very fast and reliable.
  • The api address is here. It returns 176 exchange rates along with the name of the country, country code, currency and currency. Base currency is USD.

    http://www.mycurrency.net/service/rates

There is also a free country flag API that you may also need. Just replace the country code.

 http://caches.space/flags/{countrycode}.png 

Example:

http://caches.space/flags/sg.png sg

http://caches.space/flags/us.png enter image description here

0
source share

All Articles