Calling the endpoint
Pass the number as its 8 digits, without country code, spaces or dashes:
curl https://apicvr.dk/api/v1/search/phone/44448888Example response
The response is a list, because several companies can share a number – typically group companies or associations on the same switchboard:
[
{
"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:
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
- Check the
phonefield on each result if you only want exact matches. - Results include companies that have ceased. Filter on
enddateorstatusif you only want active ones. - Only numbers the company registered in CVR can be found. Employees' mobile numbers usually aren't there.
- Use
?limit=to cap the number of results (default 100). - If you call companies for marketing, respect
protected: when it'strue, the company has opted out of marketing contact.
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.