Skip to contents

This function automatically paginates through the KvK API to collect available results. Due to API limitations, it retrieves a maximum of 1,000 records. When this happens, a warning will be displayed.

Usage

kvk_search(..., test_environment = FALSE)

Arguments

...

Named arguments passed to the API query (e.g., naam = "Koudum"). Available arguments can be found at https://developers.kvk.nl/documentation/zoeken-api#input.

test_environment

A logical value. If TRUE, uses the test environment instead of the live API. Defaults to FALSE.

Value

A tibble containing the retrieved results. Possible parameters can be found under the Results section of https://developers.kvk.nl/documentation/zoeken-api#output.

Details

If test_environment = TRUE, it switches to the KvK's test environment, using a mock API key for testing purposes.

Examples

# Examples using the production API (requires API key)
koudum <- kvk_search(plaats = "Koudum")
print(koudum)
#> # A tibble: 512 × 6
#>    kvkNummer vestigingsnummer naam                     adres        type  links 
#>    <chr>     <chr>            <chr>                    <list>       <chr> <list>
#>  1 01036576  000007810083     Stichting Gemeenschapsc… <named list> neve… <list>
#>  2 92692966  000032358083     M. de Boer               <named list> neve… <list>
#>  3 60112891  000045511098     Corriente 't Kofjehúske  <named list> neve… <list>
#>  4 40005051  000021251479     Bogerman                 <named list> neve… <list>
#>  5 30168016  000057781184     It Fûgelnêst             <named list> neve… <list>
#>  6 01123666  000040288196     Winterberging IJzendoorn <named list> hoof… <list>
#>  7 58496505  000027833429     HFK Verhuur              <named list> hoof… <list>
#>  8 62724843  000031708129     De Klink Exploitatie B.… <named list> hoof… <list>
#>  9 01091668  000000678279     Multiservice Beheer en … <named list> hoof… <list>
#> 10 41005555  000021707499     Stichting Jongerenwerk … <named list> hoof… <list>
#> # ℹ 502 more rows

rotterdam <- kvk_search(plaats = "Rotterdam")
#> ! API response contains more than 1000 results. Only the first 1000 will be retrieved.
print(rotterdam)
#> # A tibble: 1,000 × 6
#>    kvkNummer vestigingsnummer naam                     adres        type  links 
#>    <chr>     <chr>            <chr>                    <list>       <chr> <list>
#>  1 30019112  000022201726     Albron Campus Catering   <named list> neve… <list>
#>  2 41126601  000023151153     Albert Schweitzer Groep… <named list> neve… <list>
#>  3 24483298  000023336749     Klooster Afrikaander     <named list> neve… <list>
#>  4 34360247  000022666397     UWV WERKbedrijf Rotterd… <named list> neve… <list>
#>  5 24483298  000022493352     Gemeentewerken Rotterda… <named list> neve… <list>
#>  6 24104827  000020343264     Simonis Verf B.V.        <named list> neve… <list>
#>  7 24335233  000010150471     Shop Rosie               <named list> neve… <list>
#>  8 24483298  000022962077     GGD Rotterdam-Rijnmond   <named list> neve… <list>
#>  9 34238535  000060066164     Levéo Groep B.V.         <named list> neve… <list>
#> 10 27295998  000059996013     Temporary Works Design … <named list> neve… <list>
#> # ℹ 990 more rows

# Examples using test environment (no API key required)
test_data <- kvk_search(plaats = "Utrecht", test_environment = TRUE)
#>  You are using the KvK test environment. Test data will be returned.
print(test_data)
#> # A tibble: 24 × 6
#>    kvkNummer naam                     adres        type  links  vestigingsnummer
#>    <chr>     <chr>                    <list>       <chr> <list> <chr>           
#>  1 59581883  Kamer van Koophandel     <named list> rech… <list> NA              
#>  2 90000218  Stichting Global Hotsol… <named list> rech… <list> NA              
#>  3 90006631  Soud'Or B.V.             <named list> rech… <list> NA              
#>  4 92040373  Facility Manager         <named list> rech… <list> NA              
#>  5 90006712  VoorUBO B.V.             <named list> rech… <list> NA              
#>  6 92040292  Sociale werkplaats       <named list> rech… <list> NA              
#>  7 92040322  Woningbouwer             <named list> rech… <list> NA              
#>  8 59581883  Kamer van Koophandel     <named list> hoof… <list> 000015063097    
#>  9 90000633  Stichting Grand Bigelec… <named list> hoof… <list> 990000552513    
#> 10 90004574  Grand Alphaway B.V.      <named list> hoof… <list> 990000066710    
#> # ℹ 14 more rows