Countries API
Returns country, continent and language reference data such as capitals, currencies, dialling codes, flags and language names.
View as Markdown| GET | /countries/country | One country by its ISO 3166 code: capital, currency, dialling code, continent and languages. |
| GET | /countries/countries | Every country, or the countries of one continent, with capital and flag emoji. |
| GET | /countries/continents | The seven continents with their two-letter codes, such as EU for Europe. |
| GET | /countries/language | One language by its ISO 639-1 code: its English and native names and whether it is written right to left. |
| GET | /countries/languages | Every language the country data names, with its code and English and native names. |
| GET | /countries/countriesByCurrency | The countries whose currency has the ISO 4217 code, such as EUR, with capital and flag emoji. |
| GET | /countries/countriesByName | The countries whose name contains the text, with capital and flag emoji. The match is case-sensitive: Ger finds Germany, ger does not. |
| GET | /countries/states | The states, provinces or regions of one country with their codes, such as the US states or the provinces of Indonesia. |
country
/v1/countries/countryOne country by its ISO 3166 code: capital, currency, dialling code, continent and languages.
Parameters
codestring required | ISO 3166 alpha-2 code, such as ID. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
9 fields
capital | string |
code | string |
continent | string |
currency | string |
emoji | string |
languages | CountryLanguage[] |
name | string |
name | string |
phone | string |
curl "https://api.hoshime.com/v1/countries/country?code=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/country?code=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/country?code=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "capital": "Jakarta", "code": "ID", "continent": "Asia", "currency": "IDR", "emoji": "🇮🇩", "languages": [ { "name": "Indonesian" } ], "name": "Indonesia", "phone": "62" }, "meta": { "cached": false, "endpoint": "country", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
countries
/v1/countries/countriesEvery country, or the countries of one continent, with capital and flag emoji.
Parameters
continentstring | Two-letter continent code, such as AS or EU. Empty lists every country. |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
capital | string |
code | string |
emoji | string |
name | string |
curl "https://api.hoshime.com/v1/countries/countries" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/countries", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/countries", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "capital": "Andorra la Vella", "code": "AD", "emoji": "🇦🇩", "name": "Andorra" }, { "capital": "Abu Dhabi", "code": "AE", "emoji": "🇦🇪", "name": "United Arab Emirates" } ], "meta": { "cached": false, "endpoint": "countries", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
continents
/v1/countries/continentsThe seven continents with their two-letter codes, such as EU for Europe.
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
code | string |
name | string |
curl "https://api.hoshime.com/v1/countries/continents" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/continents", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/continents", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "code": "AF", "name": "Africa" }, { "code": "AN", "name": "Antarctica" } ], "meta": { "cached": false, "endpoint": "continents", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
language
/v1/countries/languageOne language by its ISO 639-1 code: its English and native names and whether it is written right to left.
Parameters
codestring required | ISO 639-1 language code, such as es. e.g. es |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
code | string |
name | string |
native | string |
rtl | boolean |
curl "https://api.hoshime.com/v1/countries/language?code=es" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/language?code=es", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/language?code=es", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "code": "es", "name": "Spanish", "native": "Español", "rtl": false }, "meta": { "cached": false, "endpoint": "language", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
languages
/v1/countries/languagesEvery language the country data names, with its code and English and native names.
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
code | string |
name | string |
native | string |
rtl | boolean |
curl "https://api.hoshime.com/v1/countries/languages" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/languages", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/languages", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "code": "af", "name": "Afrikaans", "native": "Afrikaans", "rtl": false }, { "code": "am", "name": "Amharic", "native": "አማርኛ", "rtl": false } ], "meta": { "cached": false, "endpoint": "languages", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
countriesByCurrency
/v1/countries/countriesByCurrencyThe countries whose currency has the ISO 4217 code, such as EUR, with capital and flag emoji.
Parameters
currencystring required | ISO 4217 currency code, such as EUR. e.g. EUR |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
capital | string |
code | string |
emoji | string |
name | string |
curl "https://api.hoshime.com/v1/countries/countriesByCurrency?currency=EUR" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/countriesByCurrency?currency=EUR", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/countriesByCurrency?currency=EUR", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "capital": "Andorra la Vella", "code": "AD", "emoji": "🇦🇩", "name": "Andorra" }, { "capital": "Vienna", "code": "AT", "emoji": "🇦🇹", "name": "Austria" } ], "meta": { "cached": false, "endpoint": "countriesByCurrency", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
countriesByName
/v1/countries/countriesByNameThe countries whose name contains the text, with capital and flag emoji. The match is case-sensitive: Ger finds Germany, ger does not.
Parameters
querystring required | Text in the country name with a capital first letter, such as Ger. e.g. Ger |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
4 fields
capital | string |
code | string |
emoji | string |
name | string |
curl "https://api.hoshime.com/v1/countries/countriesByName?query=Ger" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/countriesByName?query=Ger", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/countriesByName?query=Ger", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "capital": "Berlin", "code": "DE", "emoji": "🇩🇪", "name": "Germany" } ], "meta": { "cached": false, "endpoint": "countriesByName", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }
states
/v1/countries/statesThe states, provinces or regions of one country with their codes, such as the US states or the provinces of Indonesia.
Parameters
codestring required | ISO 3166 alpha-2 code, such as US. e.g. ID |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
code | string |
name | string |
curl "https://api.hoshime.com/v1/countries/states?code=ID" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/countries/states?code=ID", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/countries/states?code=ID", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "code": "…", "name": "…" } ], "meta": { "cached": false, "endpoint": "states", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "countries", "requestId": "req_2Xb9kQ…", "units": 1 } }