GnistAI GnistAI
Log in

Getting Started with Bolagsverket

Swedish company registry — organisation details, legal form, industry codes, and status.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Legal

Data source: Bolagsverket (Swedish Companies Registration Office)

Overview

Bolagsverket wraps Bolagsverket (Swedish Companies Registration Office), handling authentication, pagination, and rate limits for you. This tutorial covers all 4 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-bolagsverket": {
      "url": "https://context.gnist.ai/mcp/bolagsverket/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (4)

lookup_bolagsverket_company

Look up a Swedish company by its organisation number in Bolagsverket. Returns company record including name, organisation form, legal form, registration date, business description, SNI industry codes, postal address, active/deregistration status, and any ongoing proceedings (bankruptcy, liquidation). Data sourced from Bolagsverket (Swedish Companies Registration Office) and SCB (Statistics Sweden) via the VärdefullaDatamängder API. Args: org_number: Swedish organisation number — 10 digits. Returns: Company record, or {"error": "not_found"} if the org number is unknown.

ParameterTypeRequiredDescription
org_numberstringrequiredSwedish organisation number — 10 digits, with or without hyphen (e.g. "5564866993", "556486-6993").
curl -X POST "https://context.gnist.ai/mcp/bolagsverket/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "lookup_bolagsverket_company", "arguments": {"org_number": "5564866993"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/bolagsverket/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'org_number': '5564866993'},
            'name': 'lookup_bolagsverket_company'}},
)
print(resp.json())

search_bolagsverket_companies

Search Swedish companies by name in the Bolagsverket bulk-data cache. Returns matching companies from the locally cached Bolagsverket and SCB bulk files. Searches company name and alternate names (case-insensitive). Args: name: Company name or partial name to search for. limit: Maximum results (default 20, max 100). Returns: Object with count and results list.

ParameterTypeRequiredDescription
namestringrequiredCompany name to search for (at least 2 characters).
limitintegeroptionalMaximum number of results to return (1–100). (default: 20)
curl -X POST "https://context.gnist.ai/mcp/bolagsverket/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_bolagsverket_companies", "arguments": {"name": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/bolagsverket/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'name': 'example'},
            'name': 'search_bolagsverket_companies'}},
)
print(resp.json())

get_bolagsverket_changes

Get recent changes to Swedish company data from Bolagsverket. Returns field-level diffs (before/after values) for companies whose data changed between ETL runs. Changes are detected by comparing weekly bulk-file snapshots from Bolagsverket and SCB. Tracks: name changes, address changes, status changes (deregistration, liquidation), industry code (SNI) changes, and legal form changes. Args: since: ISO 8601 timestamp — return changes captured after this time. limit: Maximum number of changes to return (1–100, default 50). Returns: Object with count and list of change records, each containing entity_id (org number), changed_at timestamp, and a list of field changes with before/after values.

ParameterTypeRequiredDescription
sincestringrequiredISO 8601 timestamp — return changes captured after this time (e.g. "2026-04-01T00:00:00Z").
limitintegeroptionalMaximum number of changes to return (1–100, default 50). (default: 50)
curl -X POST "https://context.gnist.ai/mcp/bolagsverket/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_bolagsverket_changes", "arguments": {"since": "2026-04-01T00:00:00Z"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/bolagsverket/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'since': '2026-04-01T00:00:00Z'},
            'name': 'get_bolagsverket_changes'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/bolagsverket/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/bolagsverket/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Search then retrieve
Use search_bolagsverket_companies to find items, then lookup_bolagsverket_company to get full details. This two-step pattern is common for exploring data before drilling down.
Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.

FAQ

What data does Bolagsverket provide?

Swedish company registry — organisation details, legal form, industry codes, and status. It exposes 4 tools: lookup_bolagsverket_company, search_bolagsverket_companies, get_bolagsverket_changes, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the Bolagsverket API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials