REST API cung cấp thông tin về các quốc gia trên thế giới

thay lời cảm ơn!

Hà nam 88 xin chia sẻ với các bạn nguồn REST API cung cấp các thông tin chi tiết về các quốc gia trên thế giới, nó hoàn toàn free, dưới đây sẽ liệt kê chi tiết các Rest API theo nhu cầu cần lấy dữ liệu:

LATEST ADDED ENPOINT

Independent

Now you can get all independent (or not independent) countries by calling this endpoint:

https://restcountries.com/v3.1/independent?status=true

If you don’t specify the status, true will be taken as default. You can mix it with the fields filter like this:

https://restcountries.com/v3.1/independent?status=true&fields=languages,capital

ALL

https://restcountries.com/v3.1/all

NAME

Search by country name. If you want to get an exact match, use the next endpoint. It can be the common or official value

https://restcountries.com/v3.1/name/{name}
https://restcountries.com/v3.1/name/eesti
https://restcountries.com/v3.1/name/deutschland

FULL NAME

Search by country’s full name. It can be the common or official value

https://restcountries.com/v3.1/name/{name}?fullText=true
https://restcountries.com/v3.1/name/aruba?fullText=true

CODE

Search by cca2, ccn3, cca3 or cioc country code (yes, any!)

https://restcountries.com/v3.1/alpha/{code}
https://restcountries.com/v3.1/alpha/co
https://restcountries.com/v3.1/alpha/col
https://restcountries.com/v3.1/alpha/170

LIST OF CODES

Search by cca2, ccn3, cca3 or cioc country code (yes, any!)

https://restcountries.com/v3.1/alpha?codes={code},{code},{code}
https://restcountries.com/v3.1/alpha?codes=170,no,est,pe

CURRENCY

Search by currency code or name

https://restcountries.com/v3.1/currency/{currency}
https://restcountries.com/v3.1/currency/cop

Demonym

Now you can search by how a citizen is called.

https://restcountries.com/v3.1/demonym/{demonym}
https://restcountries.com/v3.1/demonym/peruvian

LANGUAGE

Search by language code or name

https://restcountries.com/v3.1/lang/{language}
https://restcountries.com/v3.1/lang/cop
https://restcountries.com/v3.1/lang/spanish

CAPITAL CITY

Search by capital city

https://restcountries.com/v3.1/capital/{capital}
https://restcountries.com/v3.1/capital/tallinn

CALLING CODE

In version 3, calling codes are in the idd object. There is no implementation to search by calling codes in V3.

REGION

Search by region (replace X with the version you want to use)

https://restcountries.com/v3.1/region/{region}
https://restcountries.com/v3.1/region/europe

SUBREGIONS

You can search by subregions (replace X with the version you want to use)

https://restcountries.com/v3.1/subregion/{subregion}
https://restcountries.com/v3.1/subregion/Northern Europe

TRANSLATION

You can search by any translation name

https://restcountries.com/v3.1/translation/{translation}
https://restcountries.com/v3.1/translation/germany
https://restcountries.com/v3.1/translation/alemania
https://restcountries.com/v3.1/translation/Saksamaa

FILTER RESPONSE

You can filter the output of your request to include only the specified fields.

https://restcountries.com/v3.1/{service}?fields={field},{field},{field}
https://restcountries.com/v3.1/all?fields=name,capital,currencies

 

thay lời cảm ơn!