KVK Number Lookup: The Complete Guide for Developers
Learn how to look up KVK numbers, automate lookups, and integrate Dutch company data into your application. Complete guide with code examples and common pitfalls.
KVK Number Lookup: The Complete Guide for Developers
The KVK number is the key to every Dutch company. Whether you are building an invoicing system, developing a B2B platform, or enriching company records, looking up KVK numbers is one of the most common tasks for developers working with Dutch business data.
In this guide, we explain what a KVK number is, how to look one up, and how to automate the entire process.
What is a KVK number?
Every business registered with the Dutch Chamber of Commerce (Kamer van Koophandel) receives a unique eight-digit identification number. This number is assigned at registration and never changes throughout the lifetime of the entity.
Key characteristics of the KVK number:
- Always exactly 8 digits long
- Can start with one or more leading zeros (e.g.
01234567) - Unique per legal entity, not per branch location
- Different from the branch number (vestigingsnummer), which is 12 digits
Note: a KVK number is not the same as a VAT number. The Dutch VAT number is derived from the tax identification number and follows a different format (NL123456789B01).
Where can you look up KVK numbers?
1. KVK.nl (manual)
The official Chamber of Commerce website offers a search function at kvk.nl. You can search by company name, KVK number, or address. This works well for one-off lookups but is not suitable for automation.
2. KVKBase API (automated)
With KVKBase you can look up KVK numbers through a simple REST API. This is ideal for integration into your application.
# Lookup by KVK number
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.kvkbase.nl/api/v1/lookup/12345678"
# Search by company name
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.kvkbase.nl/api/v1/search?q=Bol.com"
The response contains all public data: trade name, address, legal form, SBI codes, and more.
3. JavaScript example
If you are working from a web application, you can also call the API with fetch:
async function lookupKvk(kvkNumber) {
const response = await fetch(
`https://api.kvkbase.nl/api/v1/lookup/${kvkNumber}`,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
if (!response.ok) {
throw new Error(`Lookup failed: ${response.status}`);
}
return response.json();
}
// Usage
const company = await lookupKvk('12345678');
console.log(company.handelsnaam); // "Voorbeeld BV"
console.log(company.adres); // Full address
Common mistakes when looking up KVK numbers
1. Stripping leading zeros
One of the most common mistakes is storing KVK numbers as integers instead of strings. The number 01234567 then becomes 1234567, which is no longer a valid KVK number.
// Wrong: never store KVK numbers as integers
const kvkNumber = 01234567; // Becomes 342391 (octal!) or 1234567
// Correct: always store as a string
const kvkNumber = "01234567";
In your database, use a VARCHAR(8) or CHAR(8) column — never a numeric type.
2. Not checking whether a company is still active
A KVK number can belong to a company that has been deregistered or dissolved. Always check the company status when using the number for invoicing or contracts.
3. Confusing KVK number and branch number
The branch number (vestigingsnummer, 12 digits) identifies a specific branch location of a company. One company can have multiple branches, each with its own branch number, but they all share the same KVK number.
4. No input validation
Before making an API call, validate the format locally:
function isValidKvkFormat(kvkNumber) {
return /^\d{8}$/.test(kvkNumber);
}
This saves unnecessary API calls and gives the user immediate feedback.
Automation: when and why?
Looking up KVK numbers manually works for a single company, but as soon as you work with larger volumes, you want to automate the process. Typical scenarios:
- Onboarding: automatically fetch company data when a B2B customer registers
- Invoicing: guarantee correct company name and address on invoices
- CRM enrichment: supplement existing customer records with up-to-date KVK data
- Compliance: periodically verify that companies are still active
With KVKBase you can do this in a single API call, including VAT number and address data.
Caching and performance
When integrating KVK lookups into your application, caching is essential. Company data does not change frequently, so a 24-hour cache is sufficient for most use cases.
const cache = new Map();
const CACHE_TTL = 24 * 60 * 60 * 1000; // 24 hours
async function cachedLookup(kvkNumber) {
const cached = cache.get(kvkNumber);
if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
return cached.data;
}
const data = await lookupKvk(kvkNumber);
cache.set(kvkNumber, { data, timestamp: Date.now() });
return data;
}
Conclusion
Looking up KVK numbers is a fundamental building block for any application that works with Dutch companies. By using the correct format (string, not integer), validating input, and applying smart caching, you build a reliable integration.
KVKBase offers a fast, well-documented API that lets you get started in minutes. No complex authentication, no XML parsing — just a simple REST API that returns JSON.