Find a Danish company by phone number

Got a phone number and want to know which company is behind it? The /api/v1/search/phone/{phone} endpoint searches the phone numbers companies have registered in CVR and returns full company profiles.

Calling the endpoint

Pass the number as its 8 digits, without country code, spaces or dashes:

bash
curl https://apicvr.dk/api/v1/search/phone/44448888

Example response

The response is a list, because several companies can share a number – typically group companies or associations on the same switchboard:

json
[
  {
    "vat": 32657222,
    "name": "NOVO NORDISK PHARMA OPERATIONS A/S",
    "address": "Novo Alle 1",
    "zipcode": 2880,
    "city": "Bagsværd",
    "phone": "44448888",
    "status": "NORMAL",
    "protected": false,
    "industrydesc": "...",
    ...
  },
  ...
]

Normalize the number first

The search is a full-text match on the register's phone field. If you send +45 44 44 88 88, each group of digits is matched separately and you get unrelated results. Strip the country code and every non-digit before calling the API:

python
import re
import requests

def find_by_phone(raw: str) -> list:
    digits = re.sub(r"\D", "", raw)
    if digits.startswith("45") and len(digits) == 10:
        digits = digits[2:]
    if len(digits) != 8:
        return []
    res = requests.get(f"https://apicvr.dk/api/v1/search/phone/{digits}", timeout=10)
    res.raise_for_status()
    return [c for c in res.json() if c["phone"] == digits]

for company in find_by_phone("+45 44 44 88 88"):
    print(company["vat"], company["name"], company["status"])

Tips

Frequently asked questions

Can I include +45 in the number?

No, send only the 8 digits. A country code or spaces give imprecise results because each group of digits is matched separately.

Why do I get several companies for one number?

Several CVR entities can register the same phone number, such as subsidiaries, foundations or staff associations sharing a switchboard.

Does it cost anything?

No. The endpoint is free and needs no API key.