Search a Dutch Company by Name via the KVK API
KVKBase Team

Search a Dutch Company by Name via the KVK API

Searching a company by name often returns several hits. Learn how to pick the right one, handle trade names and build a search box that does not mislead.

kvkapisearchtrade name

A customer says they work at “Bakkerij De Gouden Korst”. You search for that name in the Dutch Trade Register and get seven results. Two are deregistered, three are in a different town and one is spelled slightly differently. Which one is it? A name looks like a simple search query, but it is the hardest way to find a Dutch company.

This article walks through how searching by name works, why it so often goes wrong, and how to build a search field that ends up at a KVK number instead of a guess.

Why name search is harder than it looks

A company in the register usually has more than one name. There is the statutory name from the deed of incorporation, and one or more trade names it uses in public. What is on the shop front need not be what is in the deed. The difference is explained on our page about trade name versus statutory name.

On top of that come the ordinary spelling differences. “B.V.”, “BV” and “bv” are the same to a person and not always to a search function. The same goes for “De Gouden Korst” against “Gouden Korst, De”, an ampersand against the word “en”, and accents.

And then there are simply many companies with nearly the same name. A name is a label, not an identity. The KVK number is an identity, and that is what you want to end up with.

Searching with the KVKBase API

The search endpoint looks up names and trade names and returns a paginated list. Each result holds the KVK number, the name, the city and whether the company is active. A search costs 1 token. All parameters are in the API documentation.

curl "https://api.kvkbase.nl/v1/search?q=gouden%20korst&pageSize=10" \
  -H "Authorization: Bearer your_api_key"

The response looks like this:

{
  "results": [
    { "kvkNumber": "12345678", "name": "Bakkerij De Gouden Korst B.V.", "city": "Zwolle", "isActive": true },
    { "kvkNumber": "23456789", "name": "Gouden Korst Beheer B.V.", "city": "Zwolle", "isActive": true }
  ],
  "total": 2,
  "page": 1,
  "pageSize": 10
}

The query must be at least two characters. For a field where someone is typing there is also the autocomplete endpoint, which returns a short list of at most eight suggestions, so you can call it on each keystroke without paging through a long list.

Picking the right hit

The most dangerous thing you can do is take the first result automatically. It works in the demo and fails on the first company with a common name. Use the extra data you already hold to filter, and let a person decide when doubt remains.

A few signals that work well in practice: the city or postcode from the form, whether the company is active, and something derived such as the domain of the email address. If exactly one hit remains after filtering, you can suggest it. If there are more, show all candidates with the city next to the name, because people recognise an address faster than a number.

import requests

HEADERS = {"Authorization": "Bearer your_api_key"}

def find_company(name: str, city: str | None = None) -> list[dict]:
    r = requests.get(
        "https://api.kvkbase.nl/v1/search",
        params={"q": name, "pageSize": 20},
        headers=HEADERS,
        timeout=10,
    )
    r.raise_for_status()
    hits = [c for c in r.json()["results"] if c["isActive"]]
    if city:
        hits = [c for c in hits if c["city"].lower() == city.lower()]
    return hits

Then always store the KVK number, not the name. From that moment you never need to search by name for this company again, and you can use the number to fetch its details.

A search field that stays out of the way

If you build a search field for customers, you want it to feel fast and cost few unnecessary calls. A few agreements help.

Wait until at least two or three characters are typed and add a short delay (a debounce of around 250 milliseconds), so you do not fire a request for every letter. Cancel the previous request when a new one starts, otherwise an old answer can appear above a new one.

Show the city next to each suggestion, and preferably whether the company is active. Let the user confirm, and only then fill in the rest of the form with the data for the chosen KVK number. That is faster than typing and produces no spelling variants. How this works in a checkout is covered in auto-filling company data from a KVK number.

What not to expect

Searching by name is not fuzzy matching on a three-letter typo. A query that differs a lot from the registered name returns little or nothing. For import or matching work, normalise the name first: strip legal-form suffixes such as “B.V.”, remove punctuation and, if needed, retry with a shorter term.

Some companies will not show up because they are not in the register. Foreign companies have no KVK number, and a partnership or association may be known under a different name than you expect. So treat “no result” as a reason to check by hand, not as proof the company does not exist.

From a name to a clean database

Searching by name is the start, not the end. The goal is that every company in your system has one KVK number, so you can work with it without fuss. If you already have a database full of loose names, that is exactly the cleanup described in deduplicating companies in your CRM. More on the basics is in our complete guide to KVK number lookup.

Want to try it yourself? Create a KVKBase account, search for your own company name and see how many hits you get.