CVR API i PHP: Slå danske virksomheder op

PHP-eksempel på integration med CVRcheck API. Brug file_get_contents eller cURL til at hente CVR-data, regnskaber og ejerskab.

Brug CVRcheck API fra PHP

<?php
$cvr = "28271026";
$json = file_get_contents("https://api.cvrcheck.dk/v1/company/$cvr");
$company = json_decode($json, true);
echo $company["name"] . " - " . $company["status"];

Med cURL og Bearer-token

$ch = curl_init("https://api.cvrcheck.dk/v1/financials/$cvr");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer $apiKey"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$financials = json_decode(curl_exec($ch), true);

Få API-nøgle

Start CVR-opslag · Opret gratis konto