CountryPuff

CountryPuff API

Every endpoint below is a read-only GET request that returns JSON.

country_code accepts ISO alpha-2 (US), ISO alpha-3 (USA), GEC code (us), or a country name.

JSON endpoints

EndpointDescription
/api/v1/countries List all available countries. Try it
/api/v1/countries/search?q={query} Search countries by name. Try it
/api/v1/country/{country_code} Full country data. country_code accepts ISO alpha-2 (US), ISO alpha-3 (USA), GEC code (us), or country name. Try it
/api/v1/country/{country_code}/summary Short country summary. Try it
/api/v1/country/{country_code}/flag Flag image URL and ISO code. Try it
/api/v1/country/{country_code}/codes ISO and GEC code mappings for the country. Try it
/api/v1/country/{country_code}/raw Raw CIA World Factbook data. Try it
/api/v1/country/{country_code}/section/{section_name} A single Factbook section (e.g. Geography, Economy). Try it
/api/v1/country/{country_code}/field?path={path} A single field by comma-separated path. Try it
/api/v1/country/{country_code}/search?q={query} Search within one country's fields. Try it

Also available