Swedish Company Search API — Search All Swedish Companies
Sweden has about 1.3 million registered companies. If you want to search them in code, you quickly run into client certificates, OAuth2 flows, and two separate government APIs: SCB for search and Bolagsverket for lookup.
Apiverket puts both behind the same API key. Start with a sandbox search, select a company, then reuse its identifier for later lookups.
Go to the runnable search and lookup example
The Problem with Direct Access
Direct access usually means setting up both of these:
- SCB Företagsregister — name search, but requires a client certificate (.pfx) and a separate agreement
- Bolagsverket HVD — org.nr lookup, but requires OAuth2 client credentials
Both paths involve registration, approval, and custom auth. For a simple "find companies named Volvo", that is a lot of setup before you even get data back.
One GET Request Instead
SCB + Bolagsverket Direct
// 1. Load client certificate
const agent = new https.Agent({
pfx: fs.readFileSync("cert.pfx"),
passphrase: "YOUR_PASSWORD"
});
// 2. POST search query
const res = await fetch(
"https://privateapi.scb.se/..." +
"/api/je/hamtaforetag",
{ method: "POST", agent,
body: JSON.stringify({
"Företagsstatus": "1",
variabler: [{
Variabel: "Namn",
Operator: "Innehaller",
Varde1: "Volvo", Varde2: ""
}]
})
}
);
Apiverket
const res = await fetch(
"https://apiverket.se/v1/companies" +
"/search?q=Volvo",
{
headers: {
Authorization:
"Bearer sk_live_YOUR_KEY"
}
}
);
const { data } = await res.json();
// data.total = 81
// data.companies[0].name
// = "AKTIEBOLAGET VOLVO"
// data.companies[0].city
// = "GÖTEBORG"
No certificates. No OAuth2 work in your app. Apiverket handles SCB's client certificate auth and Bolagsverket's OAuth2, then returns clean JSON with your API key.
What You Get
The company endpoints give you the fields teams usually need for search, enrichment, and internal tools:
- Company details — legal name, org.nr, registration date, status
- Legal form — Aktiebolag, Handelsbolag, Enskild firma, and 20+ types
- SNI codes — up to 5 industry classifications with descriptions
- Address — postal address, care-of, visit address, municipality, county
- Employee count — size class (0, 1-4, 5-9, ... 500+)
- Tax and registry status — active/deregistered state, F-skatt, moms registration, employer status
- Business context — revenue year, sector, ownership category, and export/import classes when available
- Search by name — substring search across 1.3M+ registered companies
Fields are normalized for stable integrations and may be null when SCB or Bolagsverket does not provide a value. Apiverket does not expose raw source payloads, owner names, or detailed workplace/CFAR rows on this endpoint.
Available Endpoints
The usual flow is simple: search by name, save the org_number, then use organisation-number lookup whenever you need to enrich the same company again.
| Endpoint | Description | Source |
|---|---|---|
/v1/companies/search?q=name | Search companies by name when you do not know the org number. Separate company-search quota applies. | SCB Företagsregister |
/v1/companies/{orgnr} | Look up one exact organisation number and return stable registry fields such as address, legal form, SNI codes, F-tax, VAT, employer status, and size classes when available. | Bolagsverket + SCB enrichment/fallback |
/v1/vat/validate/{vatNumber} | EU VAT number validation | VIES |
From search to repeat lookup
- Search by name when you do not yet know the right company.
- Select the correct match and store its identifier in your application. Do not automatically select the first live result.
- Use lookup with the saved identifier next time. Respect response cache information and avoid unnecessary repeat requests.
The company example uses test data without an account. Select Sök på namn to search by name, then select a match to look up its details.
A runnable server example
Run as company-example.mjs with Node.js 20 or later. Without environment variables, both steps use curated sandbox data. The code makes no automatic retries.
// Node.js 20+. Run as company-example.mjs on your server, not in a browser.
const key = process.env.APIVERKET_API_KEY || "sk_test_demo";
const isSandbox = key === "sk_test_demo";
async function request(path) {
const response = await fetch("https://apiverket.se" + path, {
headers: { Authorization: "Bearer " + key },
signal: AbortSignal.timeout(15000),
});
const body = await response.json();
if (response.status === 429) {
const reset = body.error?.rate_limit?.reset_at;
const retryAfter = response.headers.get("Retry-After");
throw new Error("Stop this job. Reset: " + (reset || "see quota details")
+ "; Retry-After: " + (retryAfter || "see quota details"));
}
if (!response.ok) throw new Error("Request stopped: HTTP " + response.status);
if (body.meta?.warnings?.some(w => w.code === "sandbox_fallback")) {
throw new Error("Source unavailable: curated fallback is not live registry data.");
}
return body;
}
// Later runs can reuse the identifier selected and stored by your application.
let orgNumber = process.env.COMPANY_ID;
if (!orgNumber) {
if (!isSandbox && !process.env.COMPANY_QUERY) {
throw new Error("Set COMPANY_QUERY for your live evaluation.");
}
const query = process.env.COMPANY_QUERY || "AB";
const search = await request("/v1/companies/search?" + new URLSearchParams({ q: query }));
const matches = search.data.companies;
if (!matches.length) throw new Error("No matches. Refine the search; do not loop.");
// The first match is only a sandbox demonstration, never an automatic live choice.
if (!isSandbox) {
console.table(matches.map(({ name, org_number }) => ({ name, org_number })));
throw new Error("Choose the correct match, store its identifier, then set COMPANY_ID.");
}
orgNumber = matches[0].org_number;
}
const company = await request("/v1/companies/" + encodeURIComponent(orgNumber));
// Use company.data in your application; avoid logging sensitive registry data.
console.log("Lookup complete. Mode:", company.meta.mode);
Continue to live evaluation
Use sign-in to create or open your account, then create a live key in the dashboard. Set APIVERKET_API_KEY only in your server environment, never in a public page, URL or analytics. Use COMPANY_QUERY for discovery. After selecting the correct match, store its identifier and use COMPANY_ID on later runs to skip search.
After a successful test lookup, choose Använd i min app to continue with the same company after sign-in. Sandbox confirms the response format, not that a company exists in the live source. Check mode, sources and warnings; even live mode can contain a curated-fallback warning.
Handling company-search limits
/v1/companies/search has its own daily quota because it protects the shared SCB certificate: free 20/day, starter 100/day, pro 500/day, business 2,000/day, enterprise 10,000/day. Free accounts also include 50 lifetime live company discovery searches, shared across the account’s keys and never replenished by a daily reset. Live organisation-number lookup has its own Free allowance of 100/day; paid tiers use the regular daily API quota as the practical lookup limit.
If search returns 429 with error.rate_limit.scope = "company_search_daily", pause the search job until error.rate_limit.reset_at. Do not retry in a loop. For per-minute limits, respect Retry-After and use exponential backoff with jitter.
Free is for personal, non-commercial evaluation: 200 total API requests/day and 10/minute, subject to the separate company limits above. Paid plans permit commercial use under the full terms. A larger plan increases capacity; it does not resolve invalid input or source outages.
When a request does not succeed
- 400: Check input format and any checksum. Correct the input before retrying.
- 404: Check the selected match and operation. A failed search does not prove the company is absent; source problems can also produce this response. Do not repeat it in a loop.
- 429: Read the quota scope and reset_at. A daily search quota requires waiting for reset; exhausted lifetime credits do not reset the next day. For minute limits, respect Retry-After and bounded backoff with jitter.
- 5xx / timeout: Stop the job and investigate source status. If you add retries, bound the attempts and waiting time; never send a tight loop.
- sandbox_fallback: Curated data is not a verified live result even with HTTP 200. The example stops on this warning.
Add Swedish company data to your app
Try the search operation in the console, then follow the server example above.
Try the company exampleView pricing plans — company search quotas scale by tier