download_from_api_kvk

call the kvk api for the nationwide ‘ handelsregister’: ‘’EXAMPLE: get_kvk_json(url = BASE_URL, params={‘kvkNumber’: ‘58474447’}, api_key=API_KEY)’’ Use export API_KEY=********** to add the API_KEY to your environment before running this command script.

usage: download_from_api_kvk [-h] url params api_key

Positional Arguments

url Define the full API path. https://api.kvk.nl/api/v2/search/companies?
params Specify the parameters for our api call in a dict
api_key Specify KVK_API_KEY that you added to your ENVIRONMENT variables

functions

datapunt_processing.extract.download_from_api_kvk.get_kvk_json(url, params, api_key=None)

Get a json response from a url, provided params + api_key. Args:

url: api endpoint params: kvkNumber, branchNumber, rsin, street, houseNumber, postalCode,

city, tradeName, or provide lists/dicts of values

api_key: kvk api_key. add KVK_API_KEY to your ENV variables

Returns:
parsed json or error message
datapunt_processing.extract.download_from_api_kvk.parser()

Parser function to run arguments from commandline and to add description to sphinx docs.