/api/v4/countriesList supported countries and states
Returns every country Listings API supports, with its states/provinces, the ISO codes used when creating or updating locations, and which address fields each country requires or checks.
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 the United States, with three of its states.
{ "data": { "supportedCountries": [ { "databaseId": 233, "hasCity": true, "id": "Q291bnRyeToyMzM=", "iso": "US", "name": "United States", "hasPostalCode": true, "stateRequired": true, "states": [ { "countryId": 233, "id": "3542", "iso": "CA", "name": "California" }, { "countryId": 233, "id": "3537", "iso": "NY", "name": "New York" }, { "countryId": 233, "id": "3524", "iso": "TX", "name": "Texas" } ] } ] }}401Unauthenticated, missing or invalid API key.
500Internal server error.
Returns the full catalog of countries and their subdivisions (states, provinces, territories) that Listings API supports for location data. Each country entry carries its ISO code (iso), a Relay id, a numeric databaseId, a states array, and three flags that say how a location's address is checked in that country. Every state carries its own iso and numeric id. Countries that Listings API does not subdivide return an empty states array.
Address rules per country
postalCode is optional in every country, but send it wherever hasPostalCode is true: some publishers need it to place the map pin. A value you send is checked against the country's format (SY10014). With hideAddress: true on the location, the city and state checks are skipped.
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, that stateIso appears under that country when stateRequired is true, and that city is set when hasCity is true. 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 one entry. 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"