Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Composing a Request

Take a look at the examples to see how the requests and responses may look. Note that the apiKey parameter must be present in each request. 

...

Expand
titleDetails


Request

Query Parameters
ParameterTypeExampleDescription
apiKeystringmyapikeyPlease contact us if you don't know your API key.

location

stringosloTo show street name from relevant city first. If you want to show the streets in the user's city first in the result, you will have to use a service to find the city of the user's IP address. For common street names this is useful (i.e. Kirkegata, Skoleveien or Storgata)
limitToOfficialbooleantrueIf you want to limit the results to official Norwegian addresses (will eliminate duplicates). Default is false
limitint50If you want to override the number of records to return. Default is 30, and max is 300.

Response

Status
colourGreen
titleSTATUS 200
 - application/JSON

Code Block
languagejs
{
    "streets": [
        {
			"countryCode": String,
			"city": String",
            "streetName": String,           
            "streetIds": List<Integer> 	// A street has one or more id's
        }
    ],
	"totalResults": Integer
}


...

Expand
titleDetails


Request

Query Parameters
ParameterTypeExampleDescription
apiKeystringmyapikeyPlease contact us if you don't know your API key.

streetNumber

whole number10Filter results by street number
limitToOfficialbooleantrueIf you want to limit the results to official Norwegian addresses (will eliminate duplicates). Default is false
limitint100If you want to override the number of records to return. Default is 30, and max is 300.

Response

Status
colourGreen
titleSTATUS 200
 - application/JSON

Code Block
languagejs
{
    "streetNumbers": [
		{
            "streetNo": Integer,
            "addressId": Integer,
            "entrance": String,						// Present if a building has several entrances, where the value is the entrance name
            "houseType": String, 					// See the following examples 
            "deliveryPointId": Integer,
            "postalCode": String,
            "duplicateNumberAndEntrance": Boolean, // Some streets have several entrances on the same street number. When duplicateNumberAndAddress is true, the houseType should be used to separate them
            "latitude": Number, 
            "longitude": Number
        },
		...
	]
}

House types:

(E)nebolig     - detached house
(R)ekkehus   - row house
(B)lokk          - apartment building 
(F)orretning  - business
(H)ytte          - holiday house
(A)nnet         - other

Example address with duplicateNumberAndEntrance: Akersgata 45 (houseType B and F)

...