Obtaining International Regions

This tutorial shows you how you obtain international regions which you need for creating international real estates, by using our GeoHierarchy API.

In contrast to German real estates, you need to provide country code and region name for an international real estate that you put on the ImmoScout24 portal, so that it can be found even if the address cannot be geocoded.

You don't need an extra permission for using this GeoHierarchy API.

In order to create an international real estate, you will need to provide the following:

  1. country code: a value from ISO-List
  2. region name: See steps below to get the region name

Stepwise approach:

  • get the continent id with the get request https://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent

Take the continent id from the response. e.g "1" for Europe

1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gis:continents xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
 <Continent xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1" id="1" label="Europa"/>
 <Continent xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/2" id="2" label="Asien"/>
 <Continent xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/3" id="3" label="Afrika"/>
 <Continent xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/4" id="4" label="Amerika"/>
 <Continent xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/5" id="5" label="Australien"/>
 <Continent xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/6" id="6" label="Antarktika"/>
</gis:continents>
  • get the country id with the GET request https://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country

Take the country id from the response, e.g. "40" for Austria (we've shortened the result list here):

1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gis:countries xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
 <Country xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/8" id="8" label="Albanien"/>
 <Country xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/20" id="20" label="Andorra"/>
 <Country xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40" id="40" label="Österreich"/>
</gis:countries>
  • get the region name with the GET request https://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region

Take the region name as given in the label attributes of the response, e.g. "Kärnten"

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gis:regions xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/1" id="1" label="Burgenland"/>
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/2" id="2" label="Kärnten"/>
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/3" id="3" label="Niederösterreich"/>   
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/4" id="4" label="Oberösterreich"/>  
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/5" id="5" label="Salzburg"/>
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/6" id="6" label="Steiermark"/>
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/7" id="7" label="Tirol"/>
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/8" id="8" label="Vorarlberg"/>
 <Region xlink:href="http://rest.immobilienscout24.de/restapi/api/gis/v1.0/continent/1/country/40/region/9" id="9" label="Wien"/>
</gis:regions>