Germany - Autocomplete a street within a postal area
Given a postal area code, get a list of streets matching the specified street name. Use the completePostalArea method to get the first two parameters for this method.
The correct way to format an address in Germany using the output of this method is: 'Recipient name [newline] streetName houseNumber [newline] postcode cityName'.
URL template
The REST API requires GET requests. Parameters are added to the REST resource URL, and each parameter must be URL-encoded:
https://api.postcode.eu
Example REST request
Retrieving /de/v1/autocomplete/street/1//Eug with the proper authentication would use the following HTTP Request:
GET /de/v1/autocomplete/street/1//Eug HTTP/1.1 Host: api.postcode.eu Authorization: Basic 2eTpkU******…
Example response
The lookup is successful so we receive a 200 OK status in the headers:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
And a JSON response in the body:
[ { "streetId": 1817, "streetName": "Eugen-Bracht-Str.", "postcode": "01219", "cityName": "Dresden" }, { "streetId": 2922, "streetName": "Eugen-Dieterich-Str.", "postcode": "01326", "cityName": "Dresden" }, { "streetId": 140, "streetName": "Egon-Erwin-Kisch-Str.", "postcode": "01069", "cityName": "Dresden" }, ]
Parameters
-
cityId:
int
-
Identifier for the city in which the street is located.
-
postcode:
string or null
-
The postcode, narrows down the location of the street inside the city. This parameter is optional and may be left empty, but if the postcode is known you should always specify it.
-
streetName:
string
-
A street name. The specified name may be partial but more complete street names result in better matches. If there are zero results for a given input, adding more words can still result in matches.
Returns
- Array of arrays
-
An array of matching streets
-
streetId:
int
-
A unique identifier for the street.
-
streetName:
string
-
The street name. The maximum length of a street name is 46 characters.
-
postcode:
string
-
The postcode for the street.
-
cityName:
string
-
The name of the city in which the street is located. The maximum length of a city name is 40 characters.
-
streetId: