{"openapi":"3.0.3","info":{"title":"x402-gateway","version":"0.1.0","description":"Pay-per-lookup data gateway for AI agents. Authoritative registry data, paid per call in USDC via the x402 protocol — no account, no contract, no API key.","contact":{"url":"https://x402-gateway.ai"}},"servers":[{"url":"https://x402-gateway.ai/api/v1"}],"paths":{"/ping":{"get":{"operationId":"core.system.ping","summary":"Paid ping — test the x402 payment flow end-to-end","description":"Returns pong. Costs $0.001, exists so agents can verify their x402 wallet setup against this gateway cheaply.\n\nPaid endpoint: $0.001 per call via the x402 payment protocol (HTTP 402 challenge → signed USDC payment → response). Use an x402-capable client such as @x402/fetch.","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","const":"pong"},"paid":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"}}}}}},"402":{"description":"Payment required — the PAYMENT-REQUIRED header carries the x402 challenge (scheme, network, amount, payTo)."},"404":{"description":"Not found"}},"x-x402":{"price_usd":0.001,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}},"/se/company/{orgnr}":{"get":{"operationId":"se.company.lookup","summary":"Swedish company basics by org.nr","description":"Look up any Swedish organisation by its 10-digit organisationsnummer (e.g. /api/v1/se/company/5567037485 for Spotify AB): registered and trade names, legal form, active status, bankruptcy/liquidation/reconstruction, registered address, SNI 2007 industry codes and activity description. Live from Bolagsverket's official register with SCB business data. No API key — pay per call in USDC.\n\nPaid endpoint: $0.005 per call via the x402 payment protocol (HTTP 402 challenge → signed USDC payment → response). Use an x402-capable client such as @x402/fetch.","parameters":[{"name":"orgnr","in":"path","required":true,"description":"Swedish organisationsnummer, 10 digits without hyphen","schema":{"type":"string","pattern":"^\\d{10}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"identifier":{"type":"string","description":"Global identifier, e.g. \"SE:orgnr:5567037485\""},"country":{"type":"string","description":"ISO 3166-1 alpha-2"},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["registered","trade","former"]}},"required":["name","type"]},"description":"Registered name first, then trade/former names"},"legal_form":{"type":"object","properties":{"native_code":{"type":"string","description":"Register code, e.g. \"AB\""},"native_name":{"type":"string","description":"Register name, e.g. \"Aktiebolag\""},"type":{"type":"string","enum":["limited_company","sole_trader","partnership","association","other"],"description":"Coarse cross-country mapping"}},"required":["native_code","native_name","type"]},"status":{"type":"object","properties":{"active":{"type":"boolean","description":"false once deregistered"},"insolvency":{"type":"string","enum":["none","bankruptcy","liquidation","reconstruction"]},"f_tax":{"description":"F-tax approval; null when the source lacks it","type":["boolean","null"]},"vat_registered":{"description":"null when the source lacks it","type":["boolean","null"]},"employer":{"description":"Registered employer; null when the source lacks it","type":["boolean","null"]}},"required":["active","insolvency","f_tax","vat_registered","employer"]},"registration_date":{"anyOf":[{"type":"string","description":"Registration date (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]},"deregistration_date":{"anyOf":[{"type":"string","description":"Deregistration date (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"street":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":"string","description":"ISO 3166-1 alpha-2"}},"required":["street","postal_code","city","country"]},{"type":"null"}],"description":"Registered postal address"},"industry":{"type":"array","items":{"type":"object","properties":{"native_code":{"type":"string","description":"Industry code, e.g. SNI \"62010\""},"native_system":{"type":"string","description":"Code system, e.g. \"SNI2007\""},"description":{"type":["string","null"]}},"required":["native_code","native_system","description"]}},"activity_description":{"description":"Registered activity description (verksamhetsbeskrivning), native language","type":["string","null"]}},"required":["identifier","country","names","legal_form","status","registration_date","deregistration_date","address","industry","activity_description"],"description":"Basic company record"},"source":{"type":"object","properties":{"name":{"type":"string","description":"Gateway source adapter that produced the data"},"attribution":{"type":"string","description":"Attribution text required by the data licence"},"retrieved_at":{"type":"string","description":"When the upstream data was fetched (ISO 8601 timestamp)"},"mock":{"type":"boolean","description":"true when the data is a labelled fixture rather than live register data"}},"required":["name","attribution","retrieved_at","mock"],"description":"Where the data came from"},"raw":{"description":"Native upstream payload (Bolagsverket värdefulla datamängder). Always present in responses; omitted from the published example."}},"required":["data","source"]}}}},"402":{"description":"Payment required — the PAYMENT-REQUIRED header carries the x402 challenge (scheme, network, amount, payTo)."},"404":{"description":"Not found"}},"x-x402":{"price_usd":0.005,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}},"/se/company/search":{"get":{"operationId":"se.company.search","summary":"Search Swedish companies by name","description":"Find a Swedish company's organisationsnummer from its name (e.g. /api/v1/se/company/search?name=spotify). Fuzzy trigram search over our own index of 1.9 million Swedish legal entities, rebuilt weekly from Bolagsverket's and SCB's bulk files — Bolagsverket's own API has no name search. Returns org.nr, name, legal form, city and active status per hit. Legal entities only; sole traders excluded for privacy.\n\nPaid endpoint: $0.01 per call via the x402 payment protocol (HTTP 402 challenge → signed USDC payment → response). Use an x402-capable client such as @x402/fetch.","parameters":[{"name":"name","in":"query","required":true,"description":"Company name or name fragment (min 2 characters)","schema":{"type":"string","pattern":"^.{2,100}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"Global identifier, e.g. \"SE:orgnr:5567037485\""},"name":{"type":"string","description":"Registered name"},"legal_form":{"type":"string","description":"Register code, e.g. \"AB\""},"city":{"type":["string","null"]},"active":{"type":"boolean"}},"required":["identifier","name","legal_form","city","active"],"description":"Name-search hit; look the identifier up for the full record"},"description":"Best matches first"},"source":{"type":"object","properties":{"name":{"type":"string","description":"Gateway source adapter that produced the data"},"attribution":{"type":"string","description":"Attribution text required by the data licence"},"retrieved_at":{"type":"string","description":"When the upstream data was fetched (ISO 8601 timestamp)"},"mock":{"type":"boolean","description":"true when the data is a labelled fixture rather than live register data"}},"required":["name","attribution","retrieved_at","mock"],"description":"Where the data came from"},"raw":{"description":"Always null for search. Always present in responses; omitted from the published example."}},"required":["data","source"]}}}},"402":{"description":"Payment required — the PAYMENT-REQUIRED header carries the x402 challenge (scheme, network, amount, payTo)."},"404":{"description":"Not found"}},"x-x402":{"price_usd":0.01,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}},"/se/company/{orgnr}/annual-report":{"get":{"operationId":"se.company.annual-report","summary":"Swedish annual report key figures (iXBRL), decoded","description":"Financials from a Swedish company's latest digitally filed annual report (årsredovisning, 2020+). We decode Bolagsverket's iXBRL (K2/K3) into net revenue, operating profit, profit after financial items, total assets, equity and average employees, with fiscal year and filing date. Example: /api/v1/se/company/5567647176/annual-report. Digital filing is voluntary — about 1 in 8 companies has one; a 404 is not charged.\n\nPaid endpoint: $0.02 per call via the x402 payment protocol (HTTP 402 challenge → signed USDC payment → response). Use an x402-capable client such as @x402/fetch.","parameters":[{"name":"orgnr","in":"path","required":true,"description":"Swedish organisationsnummer, 10 digits without hyphen","schema":{"type":"string","pattern":"^\\d{10}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"identifier":{"type":"string","description":"Global identifier, e.g. \"SE:orgnr:5567647176\""},"fiscal_year":{"type":"object","properties":{"from":{"type":"string","description":"Period start (ISO 8601 date, YYYY-MM-DD)"},"to":{"type":"string","description":"Period end (ISO 8601 date, YYYY-MM-DD)"}},"required":["from","to"]},"currency":{"type":"string","description":"ISO 4217, e.g. \"SEK\""},"key_figures":{"type":"object","properties":{"net_revenue":{"type":["number","null"]},"operating_profit":{"type":["number","null"]},"profit_after_financial_items":{"type":["number","null"]},"total_assets":{"type":["number","null"]},"equity":{"type":["number","null"]},"employees_avg":{"description":"Average number of employees","type":["number","null"]}},"required":["net_revenue","operating_profit","profit_after_financial_items","total_assets","equity","employees_avg"],"description":"Whole currency units; null when the filing lacks the figure"},"document":{"type":"object","properties":{"format":{"type":"string","description":"Format of the filed document package"},"filed_at":{"anyOf":[{"type":"string","description":"Filing date (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]}},"required":["format","filed_at"]}},"required":["identifier","fiscal_year","currency","key_figures","document"],"description":"Key figures from the latest filed annual report"},"source":{"type":"object","properties":{"name":{"type":"string","description":"Gateway source adapter that produced the data"},"attribution":{"type":"string","description":"Attribution text required by the data licence"},"retrieved_at":{"type":"string","description":"When the upstream data was fetched (ISO 8601 timestamp)"},"mock":{"type":"boolean","description":"true when the data is a labelled fixture rather than live register data"}},"required":["name","attribution","retrieved_at","mock"],"description":"Where the data came from"},"raw":{"description":"Native upstream document metadata (Bolagsverket dokumentlista). Always present in responses; omitted from the published example."}},"required":["data","source"]}}}},"402":{"description":"Payment required — the PAYMENT-REQUIRED header carries the x402 challenge (scheme, network, amount, payTo)."},"404":{"description":"Not found"}},"x-x402":{"price_usd":0.02,"scheme":"exact","network":"eip155:8453","asset":"USDC"}}},"/se/company/{orgnr}/representatives":{"get":{"operationId":"se.company.representatives","summary":"Board and signatory rule (styrelse + firmateckning)","description":"Register-published representatives (board members, CEO, liquidator) and the signatory rule. Licensed tier — Bolagsverket paid API. Names are register-published company roles.","parameters":[{"name":"orgnr","in":"path","required":true,"description":"Swedish organisationsnummer, 10 digits without hyphen","schema":{"type":"string","pattern":"^\\d{10}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"identifier":{"type":"string"},"representatives":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Register-published role holder"},"role":{"type":"string","description":"Normalized role, e.g. \"board_member\", \"ceo\""},"role_native":{"type":"string","description":"Role as published by the register"},"since":{"anyOf":[{"type":"string","description":"Appointed (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]}},"required":["name","role","role_native","since"]}},"signatory_rule":{"description":"Firmateckning, as published","type":["string","null"]}},"required":["identifier","representatives","signatory_rule"]},"source":{"type":"object","properties":{"name":{"type":"string","description":"Gateway source adapter that produced the data"},"attribution":{"type":"string","description":"Attribution text required by the data licence"},"retrieved_at":{"type":"string","description":"When the upstream data was fetched (ISO 8601 timestamp)"},"mock":{"type":"boolean","description":"true when the data is a labelled fixture rather than live register data"}},"required":["name","attribution","retrieved_at","mock"],"description":"Where the data came from"},"raw":{"description":"Native upstream payload (Bolagsverket licensed API). Always present in responses; omitted from the published example."}},"required":["data","source"]}}}},"404":{"description":"Not found"}}}},"/se/vehicle/{regnr}":{"get":{"operationId":"se.vehicle.lookup","summary":"Swedish vehicle data by registration number","description":"Technical data, inspection history with odometer readings, tax status, registration status and owner-change count for a Swedish vehicle. Never any owner identity.","parameters":[{"name":"regnr","in":"path","required":true,"description":"Swedish registration number, e.g. ABC123 or ABC12D","schema":{"type":"string","pattern":"^[A-Za-z]{3}[0-9]{2}[A-Za-z0-9]$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"identifier":{"type":"string","description":"Global identifier, e.g. \"SE:regnr:ABC123\""},"country":{"type":"string","description":"ISO 3166-1 alpha-2"},"make":{"type":"string"},"model":{"type":"string"},"model_year":{"type":"number"},"vehicle_class":{"type":"string"},"technical":{"type":"object","properties":{"fuel":{"type":["string","null"]},"engine_power_kw":{"type":["number","null"]},"co2_g_per_km":{"type":["number","null"]},"curb_weight_kg":{"type":["number","null"]},"total_weight_kg":{"type":["number","null"]},"color":{"type":["string","null"]},"euro_class":{"type":["string","null"]}},"required":["fuel","engine_power_kw","co2_g_per_km","curb_weight_kg","total_weight_kg","color","euro_class"]},"registration":{"type":"object","properties":{"first_registered":{"anyOf":[{"type":"string","description":"First registration (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]},"in_traffic":{"type":"boolean"},"deregistered":{"type":"boolean"},"import_vehicle":{"type":["boolean","null"]}},"required":["first_registered","in_traffic","deregistered","import_vehicle"]},"inspection":{"type":"object","properties":{"latest_date":{"anyOf":[{"type":"string","description":"Latest inspection (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]},"latest_result":{"anyOf":[{"type":"string","enum":["approved","rejected","approved_with_remarks"]},{"type":"null"}]},"next_deadline":{"anyOf":[{"type":"string","description":"Next inspection deadline (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]},"odometer_history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Reading date (ISO 8601 date, YYYY-MM-DD)"},"km":{"type":"number"}},"required":["date","km"]}}},"required":["latest_date","latest_result","next_deadline","odometer_history"]},"tax":{"type":"object","properties":{"annual_tax_sek":{"type":["number","null"]},"payment_months":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["annual_tax_sek","payment_months"]},"owner_changes_count":{"description":"Count only — owner identity is never exposed","type":["number","null"]}},"required":["identifier","country","make","model","model_year","vehicle_class","technical","registration","inspection","tax","owner_changes_count"],"description":"Vehicle record. Never contains owner identity."},"source":{"type":"object","properties":{"name":{"type":"string","description":"Gateway source adapter that produced the data"},"attribution":{"type":"string","description":"Attribution text required by the data licence"},"retrieved_at":{"type":"string","description":"When the upstream data was fetched (ISO 8601 timestamp)"},"mock":{"type":"boolean","description":"true when the data is a labelled fixture rather than live register data"}},"required":["name","attribution","retrieved_at","mock"],"description":"Where the data came from"},"raw":{"description":"Native upstream payload. Always present in responses; omitted from the published example."}},"required":["data","source"]}}}},"404":{"description":"Not found"}}}},"/se/vehicle/{regnr}/valuation":{"get":{"operationId":"se.vehicle.valuation","summary":"Market valuation for a Swedish vehicle","description":"Estimated market and trade-in value in SEK from a licensed valuation partner (partner selection pending, M3.4).","parameters":[{"name":"regnr","in":"path","required":true,"description":"Swedish registration number, e.g. ABC123 or ABC12D","schema":{"type":"string","pattern":"^[A-Za-z]{3}[0-9]{2}[A-Za-z0-9]$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"identifier":{"type":"string","description":"Global identifier, e.g. \"SE:regnr:ABC123\""},"currency":{"type":"string","description":"ISO 4217"},"market_value":{"type":["number","null"]},"trade_in_value":{"type":["number","null"]},"valuation_date":{"anyOf":[{"type":"string","description":"Valuation date (ISO 8601 date, YYYY-MM-DD)"},{"type":"null"}]},"basis":{"type":"string","description":"How the valuation was derived"}},"required":["identifier","currency","market_value","trade_in_value","valuation_date","basis"]},"source":{"type":"object","properties":{"name":{"type":"string","description":"Gateway source adapter that produced the data"},"attribution":{"type":"string","description":"Attribution text required by the data licence"},"retrieved_at":{"type":"string","description":"When the upstream data was fetched (ISO 8601 timestamp)"},"mock":{"type":"boolean","description":"true when the data is a labelled fixture rather than live register data"}},"required":["name","attribution","retrieved_at","mock"],"description":"Where the data came from"},"raw":{"description":"Native upstream payload. Always present in responses; omitted from the published example."}},"required":["data","source"]}}}},"404":{"description":"Not found"}}}}}}