September 28, 2022 – v. 1.2.0
Please contact us in the case of questions.
Click here for product information and pricing (in Norwegian). You can also order or try our API for free.
One can easily query a single Norwegian telephone number in our number information database.
The information is updated daily with the data supplied by the Norwegian telephone companies and is therefore always up to date.
https://api.nrop.no/nrop/telephonenumber
telephonenumber -> Norwegian telephone number E164 formatted (eg. +4798765432, note that the + sign must be URL-encoded as %2B).
Each query must employ HTTP basic authentication using an API key and password. The API key and password will be supplied by Front when your account is registered. Use these in a standard HTTP basic Authorization header. For example, if one has received the API key “Aladdin” and password “OpenSesame”, the value for the Authorization header should be the base 64 encoding of “Aladdin:OpenSesame” or QWxhZGRpbjpPcGVuU2VzYW1l.
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
The API uses semantic versioning. The desired version of the API should be included in the Accept-Version HTTP request header. If no Accept-Version header is present in the request, version 1.0.* will be assumed.
Examples of allowed versions:
Accept-Version: 1.2.*
GET /nrop/%2B4799999999 HTTP/1.1
Host: api.nrop.no
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Accept-Version: 1.2.*
The response will be a JSON document with the number information:
{
"href":"/nrop/%2B4798765432",
"created":"2016-12-12T04:39:12.000Z",
"updated":"2017-05-26T08:52:36.000Z",
"customerType":"P",
"phone":"+4798765432",
"firstName":"Kari",
"middleName":"",
"lastName":"Nordmann",
"organizationNumber":"987654321"
"companyName":"",
"address":"Storgata 10",
"postalCode":"0001",
"city":"OSLO",
"country":"NO",
"phoneBook":true,
"manualQuery":true,
"electronicQuery":true
}
If the number is registered as hidden from number information, the response will not include any personal information:
{
"href":"/nrop/%2B4798765432",
"created":"2016-12-12T04:39:12.000Z",
"updated":"2017-05-26T08:52:36.000Z",
"customerType":"",
"phone":"+4798765432",
"firstName":"",
"middleName":"",
"lastName":"",
"organizationNumber": "",
"companyName":"",
"address":"",
"postalCode":"",
"city":"",
"country":"",
"phoneBook":false,
"manualQuery":false,
"electronicQuery":false
}
These fields have the following meaning:
customerType: "P" - individual ("privat"), "B" - organization ("bedrift"), "" - unknown
phoneBook: Can publish in a phone book (paper version)
manualQuery: Can access information for a manual query (telephone)
electronicQuery: Can access information for an electronic query (API/SMS)
Note: Some telephone companies remove the number from number information when the customer registers to hide their information. In this case the response will be the same as if the number is not in use.
If a number is not found, the server will respond with HTTP status 404 and a JSON document with an error message is returned:
{
"code": "NotFoundError",
"message": "Phone number not found"
}
Code | HTTP Status | Description |
---|---|---|
InvalidVersion | 400 | The value in the Accept-Version header was invalid |
InvalidCredentialsError | 401 | Invalid API key and/or password |
AccountDisabledError | 401 | Account disabled due to missing payment or misuse |
InvalidArgumentError | 409 | Invalid telephone number |
NotFoundError | 404 | Telephone number not found or hidden |
TooManyRequestsError | 429 | Quota for the number of queries in the period exceeded |
RequestThrottledError | 429 | Too many queries in a short period |
InternalError | 500 | Unexpected error occurred on the server |
The number of queries performed and the quota may be checked.
https://api.nrop.no/query-counts
See authentication above.
{
"date": "2022-09-28",
"monthlyQueryLimit": 100,
"currentMonth": 99,
"previousMonth": 10
}
Manual check of the query count can be performed here.