PHP code example of vormkracht10 / kvk-api

1. Go to this page and download the library: Download vormkracht10/kvk-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vormkracht10 / kvk-api example snippets


use Vormkracht10\KvkApi\ClientFactory;
$apiKey = '<KVK_API_KEY>';

// Optional SSL certificate
$rootCertificate = '<PATH_TO_SSL_CERT>';

$kvk = ClientFactory::create($apiKey, $rootCertificate);

// Search by company name
$companies = $kvk->search('Vormkracht10');

$companies = $kvk->search('Vormkracht10', [
'pagina' => 1,
'resultatenPerPagina' => 10
]);

$kvk->setPage(2);
$kvk->setResultsPerPage(20);

$companies = $kvk->searchByKvkNumber('12345678');

$companies = $kvk->searchByRSIN('12345678');