Live data from Hacker News

Get information about any country via a RESTful API

restcountries.eu

1–10 of 27 posts

Re: Get information about any country via a RESTful API

#3
Some of the data seems to be incorrect:

http://restcountries.eu/rest/alpha2/za

The South African currency is ZAR, not SOS. Cape Town is the legislative capital, but not _the_ capital.

If you search by currency for ZAR:

http://restcountries.eu/rest/currency/zar

You get South Georgia. I assume that's meant to be South Africa.

Re: Get information about any country via a RESTful API

#4
post #3

Some of the data seems to be incorrect: http://restcountries.eu/rest/alpha2/za The South African currency is ZAR, not SOS. Cape Town is the legislative capital, but not _the_ capital. If you search by currency for ZAR: http://restcountries.eu/rest/currency/zar You get South Georgia. I assume that's meant to be South Africa.

And what about the Netherlands which has two capitals? A national capital (Amsterdam) and an administrative capital (Den Haag)?

And what about countries that use two currencies... oh wait, Cuba actually lists two currencies; never mind.

Re: Get information about any country via a RESTful API

#8

Why not just publish a JSON file? It's not like the data source is that large or changes often. No reason to have an API for this

Apparently the data does come from a JSON file: https://github.com/mledoze/countries/blob/master/countries.j...

Re: Get information about any country via a RESTful API

#9
post #4
post #3

Some of the data seems to be incorrect: http://restcountries.eu/rest/alpha2/za The South African currency is ZAR, not SOS. Cape Town is the legislative capital, but not _the_ capital. If you search by currency for ZAR: http://restcountries.eu/rest/currency/zar You get South Georgia. I assume that's meant to be South Africa.

And what about the Netherlands which has two capitals? A national capital (Amsterdam) and an administrative capital (Den Haag)? And what about countries that use two currencies... oh wait, Cuba actually lists two currencies; never mind.

As a Dutch person I would say Amsterdam would be the correct listing as it is the official capital, which is what is listed.

Re: Get information about any country via a RESTful API

#10
This is nice if considered a programming exercise but it's actually pretty useless for real world use.

This data is static, that is it very rarely changes. The whole dataset is also very tiny. It's just better to store this data in-house and don't provide unnecessary point of potential failure by using an external service.

An idea on how to make it more useful is to provide downloadable data dump in several formats suited for immediate import into various data stores. An extra addition might be modules for popular frameworks providing access to this (local) data in all the ways your web service does.

I'm not trying to diss, just trying to find some value for real world usage. The service is neat otherwise.

Post reply on HN