alt tag

A Rest Api of country information that you need.

EndPoint Request: http://countryapi.gear.host/v1/Country/getCountries

Suggestion: GearHost is a free hosting web apps, and has a limit of request by hour, I recommended download the repository and made your own server, and use this only for tests. If you like the repository, my work, and you want that this works ever in the current host or other, please Donate, I will thanks you and the developers community too.

Codacy Badge License

Contents

How to Use

Buy me a Coffee (Donate)


How To Use

What is CountryAPI?

Country API is a simple web service, made with REST API architecture, that return a simple Json Object with the verb “GET”, withouth Oauth, Oauth2, or another authetication.

This service return the next data of all the countries in the world:


Why use CountryAPI?


Executing the CountryAPI request

Simple example. Only need to open browser and paste the url http://countryapi.gear.host/v1/Country/getCountries.

Or use Postman or similar software with the verb GET, and obtain the json data and/or edit the json in Json Editor Online. For example: alt tag

Request Parameters

You can use any parameter that you need.

Parameter list:

Name Type Required SQLConsult Type
pName String False LIKE "% %"
pAlpha2Code string False Equals
pAlpha3Code string False Equals
pNativeName string False LIKE "% %"
pRegion string False Equals
pSubRegion string False Equals
pAreaFrom long? False BETWEEN pAreaFrom AND pAreaTo
pAreaTo long? False BETWEEN pAreaFrom AND pAreaTo
pNumericCode long? False Equals
pNativeLanguage string False Equals
pCurrencyCode string False Equals
pCurrencyName string False LIKE "% %"
pPage int? False Pagination
pLimit int? False Limit of objects response



Request Examples

Specific country name

http://countryapi.gear.host/v1/Country/getCountries?pName=Costa%20Rica

{"IsSuccess":true,"UserMessage":null,"TechnicalMessage":null,"TotalCount":1,"Response":[{"Name":"Costa Rica","Alpha2Code":"CR","Alpha3Code":"CRI","NativeName":"Costa Rica","Region":"Americas","SubRegion":"Central America","Latitude":"10","Longitude":"-84","Area":51100,"NumericCode":188,"NativeLanguage":"spa","CurrencyCode":"CRC","CurrencyName":"Costa Rican colón","CurrencySymbol":"₡","Flag":"https://api.backendless.com/2F26DFBF-433C-51CC-FF56-830CEA93BF00/473FB5A9-D20E-8D3E-FF01-E93D9D780A00/files/CountryFlags/cri.svg","FlagPng":"https://api.backendless.com/2F26DFBF-433C-51CC-FF56-830CEA93BF00/473FB5A9-D20E-8D3E-FF01-E93D9D780A00/files/CountryFlagsPng/cri.png"}]}

PD: the request is similar with pNativeName.


Countries with a specific region and subRegion

http://countryapi.gear.host/v1/Country/getCountries?pRegion=Americas&pSubRegion=Central%20America

Region and sub region list


Country with Alpha code 2 or 3

http://countryapi.gear.host/v1/Country/getCountries?pAlpha2Code=CR

Countries with english like native language

http://countryapi.gear.host/v1/Country/getCountries?pNativeLanguage=eng

Countries with Currency code USD (United States Dollar)

http://countryapi.gear.host/v1/Country/getCountries?pCurrencyCode=USD

Countries with an Area (km2) more than 8000 and less than 12000

http://countryapi.gear.host/v1/Country/getCountries?pAreaFrom=8000&pAreaTo=12000

Countries with limit and pagination

http://countryapi.gear.host/v1/Country/getCountries?pLimit=25&pPage=1 http://countryapi.gear.host/v1/Country/getCountries?pLimit=25&pPage=2



Donate


Servers

PAAS: Host server .Net Web API 2.0

https://www.gearhost.com/

PAAS: Sql server 2008 free

https://appharbor.com/

BAAS: Free files storage

https://backendless.com/


Current Version


Credits

Author Fabián Rosales - Frosquivel Developer

Contributors List of contributors

alt tag alt tag alt tag alt tag


References

https://restcountries.eu

https://github.com/aredo/restcountries


License

Copyright 2017 Fabian Rosales

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.