Number Information API Documentation

September 28, 2022 – v. 1.2.0

Please contact us in the case of questions.

Front Invest DA
Postboks 2406 Solli
0201 OSLO
kontakt@fro.no
22 20 24 00
Org. nr: 983 203 213

Click here for product information and pricing (in Norwegian). You can also order or try our API for free.

Telephone Number Lookup

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.

URL

https://api.nrop.no/nrop/telephonenumber

Parameters

telephonenumber -> Norwegian telephone number E164 formatted (eg. +4798765432, note that the + sign must be URL-encoded as %2B).

Authentication

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

Versioning

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:

  • 1.0.0 - Original version (documentation)
  • 1.1.0 - Same lookup functionality as this version.
  • 1.2.0 - This version
  • 1.2.* - Recommended. Use this version or patch versions of the current version (currently 1.2.0).
  • 1.* - Use the most recent version without breaking changes (currently 1.2.0). May include minor changes such as addition of new fields.
  • * - Use the most recent version of the API. Warning: May include breaking changes!
Accept-Version: 1.2.*

Full Request Example

GET /nrop/%2B4799999999 HTTP/1.1
Host: api.nrop.no
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
Accept-Version: 1.2.*

Response

Valid telephone number

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
}
Hidden telephone number

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.

Telephone number not found

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"
}

Overview of the possible errors

CodeHTTP StatusDescription
InvalidVersion400The value in the Accept-Version header was invalid
InvalidCredentialsError401Invalid API key and/or password
AccountDisabledError401Account disabled due to missing payment or misuse
InvalidArgumentError409Invalid telephone number
NotFoundError404Telephone number not found or hidden
TooManyRequestsError429Quota for the number of queries in the period exceeded
RequestThrottledError429Too many queries in a short period
InternalError500Unexpected error occurred on the server

Query Count

The number of queries performed and the quota may be checked.

URL

https://api.nrop.no/query-counts

Authentication

See authentication above.

Response

{
  "date": "2022-09-28",
  "monthlyQueryLimit": 100,
  "currentMonth": 99,
  "previousMonth": 10
}
date
The current date on the server
monthlyQueryLimit
The maximum number of queries (quota) which may be performed the current month; Contact Front to upgrade/downgrade the query limit.
currentMonth
The number of queries performed this month
previousMonth
The number of queries performed last month

Manual check of the query count can be performed here.

Document History

  • September 28, 2022 (v. 1.2.0)
    • Added Query Count
  • March 11, 2020 (v. 1.1.0)
    • Added information on API versioning using the Accept-Version HTTP header.
    • Added the fields customerType and organizationNumber to the response.
  • January 9, 2019 (v. 1.0.3)
    • Added HTTP status for errors.
  • May 26, 2017 (v. 1.0.0)
    • Initial revision.