python-stdnum icon indicating copy to clipboard operation
python-stdnum copied to clipboard

Add dutch Chamber of Commerce number (Business Number)

Open Jopie01 opened this issue 3 years ago • 2 comments

Is it possible to add the dutch chamber of commerce number to the package? It's only a number but is has to be 8 digits long. There is no free API to check the name against the number, but there are some search functions in the website which can be scraped and used.

Jopie01 avatar Jun 23 '22 12:06 Jopie01

The KvK has an API but to get an API key your used to have to provide a letter in writing on company letterhead. I know there is also https://openkvk.nl/ but don't know how well supported it is at the moment.

The KvK number itself is not that interesting for python-stdnum (possibly except for providing an API client implementation) because it is just 8 digits and I'm not aware of any other constraints like a check digit.

arthurdejong avatar Jul 04 '22 12:07 arthurdejong

I know there is also https://openkvk.nl/ but don't know how well supported it is at the moment.

Didn't know that site, I was more thinking about using https://www.kvk.nl/zoeken/handelsregister/ which does a request to https://zoeken.kvk.nl/search.ashx with some parameters. If it's just to verify the number the query can be something like

https://zoeken.kvk.nl/search.ashx?handelsnaam=&kvknummer=**<NUMBER>**&hoofdvestiging=1&rechtspersoon=0&nevenvestiging=1&zoekvervallen=0&zoekuitgeschreven=0&start=0&error=false&searchfield=uitgebreidzoeken&_=**<UNIX TIMESTAMP>**

Result is HTML but this can easily be stripped down to get the data.

Another method is using https://www.kvk.nl/informatiebank/kvk-nummer-alles-wat-je-moet-weten/

This queries to https://zoeken.kvk.nl/Address.ashx and using the number, the name will come up

https://zoeken.kvk.nl/Address.ashx?senttimestamp=**<UNIX TIMESTAMP>**&q=**<NUMBER>**

The result here is JSON.

Question is if this is allowed to do.

Jopie01 avatar Jul 04 '22 13:07 Jopie01