Company — Lookup and search
Live Bolagsverket company lookups by organisationsnummer, plus fuzzy name search.
The Company service wraps Bolagsverket (the Swedish Companies Registration Office) behind two endpoints: a live per-company lookup and a fast local search over the synced company register. Both require the company scope on your API key.
Sandbox uses test companies
In sandbox, both endpoints serve built-in fictional test companies instead of calling Bolagsverket — for example 5599000105 (Testbolaget Nordic AB), or 5599000550 for a deregistered company. Real organisationsnummer return 404 company_not_found in sandbox; they only work in production. The examples below use the sandbox test companies.
Live lookup by organisationsnummer
Fetches the authoritative, up-to-the-minute company record straight from Bolagsverket:
curl -X POST https://sandbox-api.cerrtify.com/service/company/lookup \
-H "X-API-Key: cert_..." \
-H "Content-Type: application/json" \
-d '{ "orgnr": "5599000105" }'orgnr is a Swedish 10-digit organisationsnummer. Formatted input is fine — 559900-0105 and 559900 0105 are normalized before lookup. The 12-digit form the search answers with (165599000105) is accepted too. Anything else returns 400 invalid_orgnr.
The response is Bolagsverket's JSON record passed through verbatim, so its shape follows their "Värdefulla datamängder" schema. Sandbox test companies are returned in the same shape.
Fuzzy search by name (or orgnr)
When you don't have an organisationsnummer — say, an autocomplete field — search the locally synced register instead. It's fast and doesn't hit Bolagsverket per request:
curl -X POST https://sandbox-api.cerrtify.com/service/company/search \
-H "X-API-Key: cert_..." \
-H "Content-Type: application/json" \
-d '{ "q": "testbolaget", "limit": 5 }'{
"q": "testbolaget",
"mode": "name",
"count": 1,
"limit": 5,
"results": [
{
"orgnr": "165599000105",
"name": "Testbolaget Nordic AB",
"legal_form": "AB",
"city": "Stockholm",
"active": true,
"score": 0.9,
"sni_codes": ["62010", "58290"]
}
]
}How matching works:
- If
qis a 10- or 12-digit number, it's treated as an orgnr and matched exactly ("mode": "orgnr"). - Otherwise it runs a prefix + trigram fuzzy match on company names (
"mode": "name"). Prefix matches score ~0.99; trigram similarity scores range 0–1. - In sandbox, the test companies match on an exact org.nr or any part of the name (case-insensitive); name matches score 0.9.
orgnrin the results is the 12-digit form (companies carry the16prefix).
Request options:
| Field | Default | Notes |
|---|---|---|
q | — | Required, minimum 2 characters (400 query_too_short otherwise) |
limit | 10 | Max 50 |
active_only | true | Set false to include deregistered companies |
Choosing between them
Use search for autocomplete and name-to-orgnr resolution; it's served from a local index synced weekly from Bolagsverket's bulk register. Use lookup when you need the authoritative live record for a company you've already identified — onboarding checks, KYB flows, registry snapshots.