Export - address¶
Endpoint for exporting sets of addresses in a specific country given certain search parameters.
Endpoint URL¶
(POST | GET) https://valid.geposit.se/1.6/export/address/{COUNTRY_CODE}
{COUNTRY_CODE}
is replaced with one of the following supported country codes: se
(Sweden)no
(Norway)dk
(Denmark)fi
(Finland)
Supported parameters¶
Query parameter | Value |
---|---|
api_key | Required A valid API key |
query | Required The query string that will be used to filter what address suggestions to fetch. Example: query=Storg Returns addresses that begins with Storg |
max_rows | Required The maximum number of rows that should be returned. |
offset_rows | Position from where to start the extraction (used for pagination, to step through a large search result, and get {nth} number of rows at a time). |
response_format | Sets the format for the API response. The following values are supported: - xml - json - text (Default value) |
columns | A comma-separated list of what attributes you want to include in the response. List of supported columns Example: query=Storg&columns=street,street_number,letter,postalcode,locality |
postalcode | Filter results to only return addresses with a certain postalcode or where the postalcode begins with a pattern. Example: query=Storg&postalcode=11217 query=Storg&postalcode=112* * In case you're not providing a full postalcode the asterix must be used as a suffix after the postalcode parameter value |
locality | Filter results to only return addresses with a certain locality or where the locality begins with a pattern. Example: query=Storg&locality=Falun query=Storg&locality=Fal* * In case you're not providing a full locality the asterix must be used as a suffix after the locality parameter value |
street_number | Filter results to only return addresses with a certain street number. Example: query=Storg&street_number=12 |
extra_number | Filter results to only return addresses with a certain secondary street number. Example: query=Landsvägen&street_number=12&extra_number=102 |
letter | Filter results to only return addresses with a certain letter. Example: query=Storgatan&street_number=12&letter=A |
Supported columns¶
Column name | Explanation |
---|---|
street | Street name |
street_number | Street number |
letter | Letter (used in street number attribution) |
extra_number | Additional / secondary street number (used in street number attribution) |
postalcode | Postal code |
locality | Locality / City |
adm1_code | Administrative division - level 1 - code |
adm1 | Administrative division - level 1 - name |
adm2_code | Administrative division - level 2 - code |
adm2 | Administrative division - level 2 - name |
adm3_code | Administrative division - level 3 - code |
adm3 | Administrative division - level 3 - name |
adm4_code | Administrative division - level 4 - code |
adm4 | Administrative division - level 4 - name |
adm5_code | Administrative division - level 5 - code |
adm5 | Administrative division - level 5 - name |
List of supported administrative divisions in each country
Response¶
Key | Value type | Value description |
---|---|---|
name | String | The name of the API |
type | String | The type of service used, in this case "Export" |
version | String | The API version |
charset | String | The character encoding of the response, always utf-8 |
data | Array | An array with zero or more data objects (referenced below) If the data array is empty it means that no rows matched your query. |
data object¶
What attributes you'll find in the data object is controlled by the columns
parameter. Here is an explanation of each possible attribute.
Key | Value type | Value description |
---|---|---|
street | String | Street name |
street_number | String | Street number |
extra_number | String | Additional/extra street number * * Some addresses have dual street number attributing, e.g. Landsbyvägen 2-220 . In these cases street_number will be 2 and extra_number will be 220 |
letter | String | Letter used in street number attribution, e.g. Storgatan 12A |
postalcode | String | Postal code of the address |
locality | String | Locality / city of the address |
adm1_code | String | Administrative division - level 1 - code |
adm1 | String | Administrative division - level 1 - name |
adm2_code | String | Administrative division - level 2 - code |
adm2 | String | Administrative division - level 2 - name |
adm3_code | String | Administrative division - level 3 - code |
adm3 | String | Administrative division - level 3 - name |
adm4_code | String | Administrative division - level 4 - code |
adm4 | String | Administrative division - level 4 - name |
adm5_code | String | Administrative division - level 5 - code |
adm5 | String | Administrative division - level 5 - name |