kvk_search: Retrieve all results from the KvK Search API (up to 1,000...

View source: R/kvk_search.R

kvk_searchR Documentation

Description

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.

Details

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

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.

Examples


# Examples using the production API (requires API key)
koudum <- kvk_search(plaats = "Koudum")
print(koudum)

rotterdam <- kvk_search(plaats = "Rotterdam")
print(rotterdam)

# Examples using test environment (no API key required)
test_data <- kvk_search(plaats = "Utrecht", test_environment = TRUE)
print(test_data)


kvkapiR documentation built on June 25, 2025, 5:11 p.m.