/api/v4/countriesList supported countries and states
Returns every country listingsAPI supports along with its states/provinces and the ISO codes used when creating or updating locations.
Parameters
This endpoint takes no parameters.
Responses
200List of supported countries, each with its states and ISO codes. The live response is trimmed here to two representative countries.
{
"data": {
"supportedCountries": [
{
"databaseId": 13,
"hasCity": true,
"id": "Q291bnRyeToxMw==",
"iso": "AU",
"name": "Australia",
"states": [
{ "countryId": 13, "id": "139", "iso": "VIC", "name": "Victoria" },
{ "countryId": 13, "id": "142", "iso": "NSW", "name": "New South Wales" },
{ "countryId": 13, "id": "141", "iso": "QLD", "name": "Queensland" }
]
},
{
"databaseId": 17,
"hasCity": true,
"id": "Q291bnRyeToxNw==",
"iso": "BE",
"name": "Belgium",
"states": []
}
]
}
}401Unauthenticated — missing or invalid API key.
500Internal server error.
Returns the full catalog of countries and their subdivisions (states, provinces, territories) that listingsAPI supports for location data. Each country entry carries its ISO code (iso), a Relay id, a numeric databaseId, a hasCity flag, and a states array. Every state carries its own iso and numeric id. Countries that listingsAPI does not subdivide return an empty states array (for example Belgium above).
Use case — populate address dropdowns. Fetch this once at app start and cache it. Render the country picker from name/iso, and when a country is chosen, populate the state picker from that country's states. The iso values feed directly into the countryIso and stateIso fields on the create-location and update-location endpoints.
Use case — validate an address before you submit. Before calling create-location, check that the target countryIso exists in this list and that the stateIso appears under that country. Catching an unsupported code here yields a clear client-side message rather than a 400 from the create call. The full response is large (every supported country); the example above is trimmed to two entries. There are no query parameters — the endpoint always returns the complete set.
curl -X GET 'https://listingsapi.com/api/v4/countries' \
-H "Authorization: API $LISTINGSAPI_KEY"