Skip to content

Countries API

8 endpointsUtilitiesGlobalsocial:read7 real examples

Returns country, continent and language reference data such as capitals, currencies, dialling codes, flags and language names.

View as Markdown
GET/countries/countryOne country by its ISO 3166 code: capital, currency, dialling code, continent and languages.
GET/countries/countriesEvery country, or the countries of one continent, with capital and flag emoji.
GET/countries/continentsThe seven continents with their two-letter codes, such as EU for Europe.
GET/countries/languageOne language by its ISO 639-1 code: its English and native names and whether it is written right to left.
GET/countries/languagesEvery language the country data names, with its code and English and native names.
GET/countries/countriesByCurrencyThe countries whose currency has the ISO 4217 code, such as EUR, with capital and flag emoji.
GET/countries/countriesByNameThe countries whose name contains the text, with capital and flag emoji. The match is case-sensitive: Ger finds Germany, ger does not.
GET/countries/statesThe states, provinces or regions of one country with their codes, such as the US states or the provinces of Indonesia.

country

GET/v1/countries/country

One country by its ISO 3166 code: capital, currency, dialling code, continent and languages.

scope social:read1 unitcached 24 h

Parameters

code
string
required
ISO 3166 alpha-2 code, such as ID.
e.g. ID
tunnel
string
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.
proxy
string
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.
profileId
string
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
capitalstring
codestring
continentstring
currencystring
emojistring
languagesCountryLanguage[]
namestring
namestring
phonestring
curl "https://api.hoshime.com/v1/countries/country?code=ID" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/countries/countries

Every country, or the countries of one continent, with capital and flag emoji.

scope social:read1 unitcached 24 hpaginated

Parameters

continent
string
Two-letter continent code, such as AS or EU. Empty lists every country.
tunnel
string
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.
proxy
string
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.
profileId
string
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
capitalstring
codestring
emojistring
namestring
curl "https://api.hoshime.com/v1/countries/countries" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/countries/continents

The seven continents with their two-letter codes, such as EU for Europe.

scope social:read1 unitcached 24 hpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
codestring
namestring
curl "https://api.hoshime.com/v1/countries/continents" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/countries/language

One language by its ISO 639-1 code: its English and native names and whether it is written right to left.

scope social:read1 unitcached 24 h

Parameters

code
string
required
ISO 639-1 language code, such as es.
e.g. es
tunnel
string
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.
proxy
string
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.
profileId
string
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
codestring
namestring
nativestring
rtlboolean
curl "https://api.hoshime.com/v1/countries/language?code=es" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/countries/languages

Every language the country data names, with its code and English and native names.

scope social:read1 unitcached 24 hpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
codestring
namestring
nativestring
rtlboolean
curl "https://api.hoshime.com/v1/countries/languages" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/countries/countriesByCurrency

The countries whose currency has the ISO 4217 code, such as EUR, with capital and flag emoji.

scope social:read1 unitcached 24 hpaginated

Parameters

currency
string
required
ISO 4217 currency code, such as EUR.
e.g. EUR
tunnel
string
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.
proxy
string
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.
profileId
string
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
capitalstring
codestring
emojistring
namestring
curl "https://api.hoshime.com/v1/countries/countriesByCurrency?currency=EUR" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/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.

scope social:read1 unitcached 24 hpaginated

Parameters

query
string
required
Text in the country name with a capital first letter, such as Ger.
e.g. Ger
tunnel
string
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.
proxy
string
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.
profileId
string
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
capitalstring
codestring
emojistring
namestring
curl "https://api.hoshime.com/v1/countries/countriesByName?query=Ger" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/countries/states

The states, provinces or regions of one country with their codes, such as the US states or the provinces of Indonesia.

scope social:read1 unitcached 24 hpaginated

Parameters

code
string
required
ISO 3166 alpha-2 code, such as US.
e.g. ID
tunnel
string
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.
proxy
string
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.
profileId
string
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
codestring
namestring
curl "https://api.hoshime.com/v1/countries/states?code=ID" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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
  }
}
esc
↑↓ move↵ open