# MIL — Machine Intelligence Layer > Swedish company data for AI agents: Bolagsverket and SCB register facts per organisationsnummer, verified across sources, with change history and digitally filed annual reports. Every value carries its source, verification status, confidence and freshness; unknown is reported as unknown, never as false. Production service at https://www.milquery.com, REST API version 0.4 and a standard MCP server. MIL reads Swedish public registers (Bolagsverket and SCB), normalises them and serves one machine-readable answer per company. When the sources disagree, MIL returns every value with its provenance as a `conflict` instead of picking a winner. MIL gives facts with their sources, no advice and no risk score: the client draws its own conclusions. Products are priced per company that resolves; not-found and invalid identifiers are never charged. Ask for one with `tier=basic|verified|intelligence`. - **basic** — free, fair use of 30 company units a minute per client (HTTP 429 with Retry-After beyond that): organisation number, legal name, legal form, primary SNI, registration date, municipality, county, postal code, locality, status, source and freshness. - **verified** — 0.02 USDC: the full current state (VAT, F-tax and employer registration, size classes, workplace count, contact fields, ongoing proceedings, addresses, SNI), each value with verification status, method, confidence, source field, provenance and freshness. - **intelligence** — 0.08 USDC: verified plus observation history, events, digitally filed annual reports (revenue, results, equity, assets, liabilities per financial year), deterministic signals with their rule and evidence, and a timeline. A company for which it adds nothing beyond verified is quoted and charged as verified (`meta.tier_adjusted`). The information decides the price, not the URL: a request without `tier` is basic, `/history` and `/related` are intelligence, `/v1/contract/company/{organisation_number}` is verified, and search returns basic cards only (its `has_signals` filter is intelligence and is refused there). Paying, without an account: x402 version 2, scheme `exact`, USDC on Base Mainnet (`eip155:8453`), paid to `0xf0bB3e3Ac165db32baFAA366A21a15384489b851`. A paid request without payment gets HTTP 402 with the PaymentRequired in the body and the `PAYMENT-REQUIRED` header; repeat the identical request with `PAYMENT-SIGNATURE`. A settled answer carries `PAYMENT-RESPONSE` and `meta.payment`. On MCP the PaymentRequired is the tool result (`isError`); retry with `params._meta["x402/payment"]`, and the receipt is in `_meta["x402/payment-response"]`. Paying by card, for companies that want an invoice: Stripe. `POST /v1/billing/register` returns a `checkout_url` for a person and a `registration_token` for the agent; after checkout, `POST /v1/billing/activate` with the token returns an API key, shown once. Send it as `Authorization: Bearer ` on REST or on the MCP endpoint and paid tiers are served without x402. Subscription: 99 SEK a month plus 0.20 SEK per verified and 0.80 SEK per intelligence company, invoiced monthly. Prepaid: no monthly fee, at least 100 SEK of card credit (`"plan": "prepaid"`, `"credit_sek"`), topped up with `POST /v1/billing/topup`. Prices exclude VAT; Stripe Tax applies Swedish moms or EU reverse charge. Access rules: discovery documents, health, privacy notice and terms never need a key. Keys are sent as `Authorization: Bearer ` or `X-API-Key: `. Limits are reported in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `Retry-After`. Every error is `{"error": {"code", "message", "retriable", "http_status", "documentation"}}`: branch on `code`, never on `message`. REST requests (base https://www.milquery.com): ``` GET /v1/companies?name=Volvo # search by name; also locality, industry_code (SNI), organisation_number, limit (max 100), offset, max_age_seconds GET /v1/company/{organisation_number}?tier=basic POST /v1/companies/batch # {"organisation_numbers": [...], "tier": "verified"}, up to 50, each with status resolved | not_found | invalid_organisation_number GET /v1/company/{organisation_number}/history # ?days=7|30|90|365&attribute_key= GET /v1/company/{organisation_number}/related # ?relation_type=industry_cluster|address_cluster GET /v1/contract/company/{organisation_number} GET /v1/freshness ``` On REST an organisation number is 10 or 12 digits, without a dash or spaces. MCP: JSON-RPC 2.0 over the Streamable HTTP transport (stateless, JSON responses), protocol 2025-06-18 (also 2025-03-26 and 2024-11-05). POST `initialize`, then `tools/list`, then `tools/call` to `https://www.milquery.com/api/mcp`. Tools: - `search_companies` (free) — find companies by name, organisation number, locality or SNI industry code; returns basic cards with `organisation_number`. - `get_company` — one company at a tier (basic free). - `batch_get_companies` — up to 50 companies at a tier. - `get_company_history`, `find_related_companies`, `find_distress_signals` — intelligence, per company. - `search_company_events` — attribute change events across companies, intelligence per company returned. - `search` and `fetch` (free) — the pair ChatGPT connectors and deep research call: `search(query)` takes a company name, an organisationsnummer or a phrase such as `restaurants in Trelleborg` and returns `{"results": [{id, title, url}]}`; `fetch(id)` returns that company's basic identity. Add MIL in ChatGPT as a connector with `https://www.milquery.com/api/mcp?src=chatgpt`. Sources: Bolagsverket Värdefulla datamängder (registration, legal form, status, ongoing proceedings); Bolagsverket annual reports filed digitally as iXBRL (financial history); SCB Företagsregistret (population, identity, SNI); SCB SokPaVar (VAT, F-tax and employer registration, size classes, workplaces, contact fields). Coverage: Sweden only. What MIL does not do: no beneficial owners, board members or ownership; no sanctions, PEP or adverse-media screening; no bank-account verification; no credit or risk score and no advice; MIL is not a credit reference agency. No company mortgages, no bankruptcy event feed (Bolagsverket's current list of ongoing proceedings is held) and no paper-filed annual reports. SCB publishes employee size classes, not head counts, and a range is never reported as a single number. Sole traders (enskild näringsidkare) are never listed in search; one is answered only to a caller who supplies its organisation number, without the owner's name, contact details, street address or turnover class, and without signals. ## Machine documentation - [Capabilities](https://www.milquery.com/capabilities): full machine-readable declaration of resources, tiers, attributes, semantics, limits, error codes and payment. - [OpenAPI 3.1](https://www.milquery.com/openapi.json): the public REST operations. - [MCP discovery document](https://www.milquery.com/.well-known/mcp.json): endpoint, transport, protocol versions, tools and payment keys. - [Data contract](https://www.milquery.com/v1/contract): the unified machine data contract every company response follows. - [Freshness](https://www.milquery.com/v1/freshness): per-source freshness and the age distribution across the register. ## Try it - [Search by name](https://www.milquery.com/v1/companies?name=Volvo&limit=5): basic company cards, free. - [One company, basic](https://www.milquery.com/v1/company/5560125790?tier=basic): AB Volvo, free. - [One company, verified](https://www.milquery.com/v1/company/5560125790?tier=verified): answers HTTP 402 with the x402 PaymentRequired until paid. ## Payment - [Payment status](https://www.milquery.com/api/payment/status): whether x402 is enforced, network, asset, recipient, prices and header names. - [Card billing terms](https://www.milquery.com/v1/billing): Stripe plans, prices, VAT and the registration flow. ## Policies - [Privacy notice](https://www.milquery.com/v1/privacy): also as JSON with `?format=json`. - [Terms of use](https://www.milquery.com/v1/terms): also as JSON with `?format=json`. ## Optional - [Service root](https://www.milquery.com/): identity document pointing to both interfaces and every discovery document. - [Health](https://www.milquery.com/api/health): liveness. - [Official MCP Registry entry](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.lordfreez-ship-it/mil): `io.github.lordfreez-ship-it/mil`. - [Public GitHub home](https://github.com/lordfreez-ship-it/mil-swedish-company-data): README with connect instructions and `server.json`.