apilayer / restcountries

Get information about countries via a RESTful API

Home Page:https://restcountries.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hard to reach the api today ?

MrSimh opened this issue · comments

Hello,

I run the api with this url for my little app : https://restcountries.eu/rest/v2/all?fields=name;population;capital;flag;region;alpha2Code

But today i have a lot of 502,503 and 504 error,
I am redirected here : http://countrylayer.com/rest/v2/all?fields=name;population;capital;flag;region;alpha2Code

Is anyone have the same ?

Thx

There are more people complaining here #251. We also face the same

you can use https://restcountries.com instead :) it's a clone of this project that is updated more often

you can use https://restcountries.com instead :) it's a clone of this project that is updated more often

Is yours open sourced?

yes, I keep the original license and it's available for free :)

you can use https://restcountries.com instead :) it's a clone of this project that is updated more often

@amatosg, just to keep it honest for your potential new audience, you should mention that https://restcountries.eu/rest/v2/all and https://restcountries.com/v2/all are not compatible and have different field names.

So the one who wants to migrate to new API have also to modify his code, not just URL.

I never said to "just change the URL", I pointed to the site with the documentation to use the API. If the docs are not clear, please let me know and I will make the amendments.

you can use https://restcountries.com instead :) it's a clone of this project that is updated more often

@amatosg, just to keep it honest for your potential new audience, you should mention that https://restcountries.eu/rest/v2/all and https://restcountries.com/v2/all are not compatible and have different field names.

So the one who wants to migrate to new API have also to modify his code, not just URL.

Yeah, I realised that… I ended up forking the original url, and using the dist countries.json file in my app

If you just need the json file, I get it from here :)

If you just need the json file, I get it from here :)

I’m currently using https://github.com/octanna/restcountries/blob/master/src/main/resources/countriesV2.json as it’s the exact data structure that the restcountries.eu was using.

No other api including yours contains population, and the JSON Object Structure is completely different.

I have a V2 with almost the same structure (I added a png file for the flag) as this project which also includes population:

https://restcountries.com/v2/name/Eswatini

I have a V2 with almost the same structure (I added a png file for the flag) as this project which also includes population:

https://restcountries.com/v2/name/Eswatini

Is it possible to have the same structure as the .eu API on your domain, but with the ability to see all countries? And PNG for flag is awesome.

yeap :) almost all the functionallity available here is also available in V2 (Although I think I made the mistake of changing the URL structure)

https://restcountries.com/v2/all

yeap :) almost all the functionallity available here is also available in V2 (Although I think I made the mistake of changing the URL structure)

https://restcountries.com/v2/all

Hey buddy, most of this seems perfect, only issue I see is;

  • subregion is now region.
  • region is now continent.

These are perfectly fine, but mainly for others to consider, only issue I see is that some things don't have a region key, could these be present but just null?

I've created an issue here to keep track of what you mention.

I just went through the file and found only a couple of cases in which region was not set but was present as empty. Could you tell me which country does not have the region field?
thanks!

@amatosg Hi there, I test your v3 solution and I found some issues in some calling codes, for example Mexico, its calling code is 52 but the API returns 484, insted I tested your v2 and I believe the returning information is more trusthy, thanks for telling us abut your solution, hope the project continue and keep growing.

@dhernandezmartinez I'm sorry, but I just checked and V3 doesn't have calling code. It has a composite code called "idd" and it is actually 52 :/

hello

unfortunatly v2 and v3 are not compatible
v2 flags links are unreachable too

And if i take and recode for the v3, i will have to recode again for the v4 ?
I just need a json, up to date, and compatible to work with my little app.
If possible, without creat mine in local with all flags and names. and [fields i need] to bypass the issue

have a good day

hello

unfortunatly v2 and v3 are not compatible
v2 flags links are unreachable too

And if i take and recode for the v3, i will have to recode again for the v4 ?
I just need a json, up to date, and compatible to work with my little app.
If possible, without creat mine in local with all flags and names. and [fields i need] to bypass the issue

have a good day

Yeah, I am finding his API is all over the place, best bet is to get the JSON file from the existing repo and reference that for your application.

unfortunatly v2 and v3 are not compatible

Well, they're obviously not compatible, hence the version number in order to avoid braking implementations.

v2 flags links are unreachable too

They are reachable

And if i take and recode for the v3, i will have to recode again for the v4 ?

Yes. That will apply to every API you consume.

I just need a json, up to date, and compatible to work with my little app.

You can download the json file to your project and consume it

I am finding his API is all over the place

Sorry about that, I will try to make it better. If you have any specifics, I would love to hear them

yes i will find a way
for flags its ok i found https://restcountries.com/data/afg.svg is ok,i had https://restcountries.eu/data/afg.svg
thx

@heychazza Hi Charlie, what do you mean with is all over the place?

Message from apilayer support: We no longer support restcountries.eu; however, we do offer a free tier of a similar API on countrylayer.com. See https://countrylayer.com/documentation/