{"openapi":"3.1.0","info":{"title":"Bransjeradar Developer API","version":"1.0.0","description":"Read-only Norwegian company registry data. The server URL is relative so this contract applies unchanged on both Bransjeradar and Selskapsbasen. Live and sandbox requests use separate monthly allowances."},"servers":[{"url":"/","description":"Current Bransjeradar or Selskapsbasen host"}],"security":[{"ApiKey":[]},{"BearerAuth":[]}],"paths":{"/v1/search":{"get":{"operationId":"searchCompanies","summary":"Search the live company registry","description":"At least one filter is required. Cursors are opaque and must be reused with the same filters.","parameters":[{"$ref":"#/components/parameters/SearchQuery"},{"$ref":"#/components/parameters/Industry"},{"$ref":"#/components/parameters/Municipality"},{"$ref":"#/components/parameters/LegalForm"},{"$ref":"#/components/parameters/Status"},{"$ref":"#/components/parameters/EmployeesMin"},{"$ref":"#/components/parameters/EmployeesMax"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"A page of matching companies.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Cache-Control":{"$ref":"#/components/headers/CacheControl"},"X-Content-Type-Options":{"$ref":"#/components/headers/ContentTypeOptions"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/company/{orgNumber}":{"get":{"operationId":"getCompany","summary":"Get a live company profile","parameters":[{"$ref":"#/components/parameters/OrgNumber"}],"responses":{"200":{"description":"The company profile and up to five most recent available accounting years.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Cache-Control":{"$ref":"#/components/headers/CacheControl"},"X-Content-Type-Options":{"$ref":"#/components/headers/ContentTypeOptions"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/CompanyNotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/sandbox/search":{"get":{"operationId":"searchSandboxCompanies","summary":"Search synthetic sandbox company data","description":"Uses the same request and response formats as live search, but consumes the sandbox allowance and returns synthetic data.","parameters":[{"$ref":"#/components/parameters/SearchQuery"},{"$ref":"#/components/parameters/Industry"},{"$ref":"#/components/parameters/Municipality"},{"$ref":"#/components/parameters/LegalForm"},{"$ref":"#/components/parameters/Status"},{"$ref":"#/components/parameters/EmployeesMin"},{"$ref":"#/components/parameters/EmployeesMax"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"$ref":"#/components/responses/SandboxSearchSuccess"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/sandbox/company/{orgNumber}":{"get":{"operationId":"getSandboxCompany","summary":"Get a synthetic sandbox company profile","description":"Uses the same response format as live company lookup, but consumes the sandbox allowance and returns synthetic data.","parameters":[{"$ref":"#/components/parameters/OrgNumber"}],"responses":{"200":{"$ref":"#/components/responses/SandboxCompanySuccess"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/CompanyNotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Developer API key."},"BearerAuth":{"type":"http","scheme":"bearer","description":"Developer API key sent as `Authorization: Bearer <key>`."}},"parameters":{"SearchQuery":{"name":"q","in":"query","description":"Company name or a nine-digit organisation number. Spaces in an exact organisation number are ignored.","schema":{"type":"string","maxLength":200}},"Industry":{"name":"industry","in":"query","description":"Industry code prefix. `industryCode` is accepted as an alias.","schema":{"type":"string","pattern":"^\\d{1,2}(?:\\.\\d{1,3})?$","maxLength":12}},"Municipality":{"name":"municipality","in":"query","description":"Municipality name or code prefix.","schema":{"type":"string","maxLength":100}},"LegalForm":{"name":"legalForm","in":"query","description":"Legal form, such as `AS`. `organizationForm` is accepted as an alias.","schema":{"type":"string","maxLength":8}},"Status":{"name":"status","in":"query","schema":{"type":"string","enum":["active","bankrupt","dissolving","deleted"]}},"EmployeesMin":{"name":"employeesMin","in":"query","schema":{"type":"integer","minimum":0,"maximum":10000000}},"EmployeesMax":{"name":"employeesMax","in":"query","description":"Maximum employee count. When used with `employeesMin`, it must be greater than or equal to it.","schema":{"type":"integer","minimum":0,"maximum":10000000}},"Limit":{"name":"limit","in":"query","description":"Maximum results in this page. Defaults to the server-selected page size.","schema":{"type":"integer","minimum":1,"maximum":50}},"Cursor":{"name":"cursor","in":"query","description":"Opaque token from `nextCursor`. Reuse it only with the same filters.","schema":{"type":"string","maxLength":1000}},"OrgNumber":{"name":"orgNumber","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{9}$"}}},"headers":{"RateLimitLimit":{"description":"Monthly request allowance for the selected environment.","schema":{"type":"integer","minimum":0}},"RateLimitRemaining":{"description":"Requests left in the selected environment's current UTC-month allowance.","schema":{"type":"integer","minimum":0}},"RateLimitReset":{"description":"UTC-month allowance reset time as Unix seconds.","schema":{"type":"integer","minimum":0}},"RetryAfter":{"description":"Seconds until a request may be retried after quota exhaustion.","schema":{"type":"integer","minimum":1}},"SandboxEnvironment":{"description":"Identifies a response from the synthetic sandbox environment.","schema":{"type":"string","const":"sandbox"}},"CacheControl":{"description":"All API responses are not stored by shared or browser caches.","schema":{"type":"string","const":"no-store"}},"ContentTypeOptions":{"description":"Prevents MIME type sniffing.","schema":{"type":"string","const":"nosniff"}}},"responses":{"SandboxSearchSuccess":{"description":"A page of synthetic matching companies.","headers":{"X-Bedriftsbasen-Environment":{"$ref":"#/components/headers/SandboxEnvironment"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Cache-Control":{"$ref":"#/components/headers/CacheControl"},"X-Content-Type-Options":{"$ref":"#/components/headers/ContentTypeOptions"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"SandboxCompanySuccess":{"description":"A synthetic company profile and available accounting years.","headers":{"X-Bedriftsbasen-Environment":{"$ref":"#/components/headers/SandboxEnvironment"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Cache-Control":{"$ref":"#/components/headers/CacheControl"},"X-Content-Type-Options":{"$ref":"#/components/headers/ContentTypeOptions"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}},"BadRequest":{"description":"A query parameter, path parameter, cursor, or required filter is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"The API key is missing, malformed, invalid, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"CompanyNotFound":{"description":"No available company has the requested organisation number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"The monthly allowance for the selected environment is exhausted.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unavailable":{"description":"The developer API or its upstream registry data source is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"SearchResult":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"nextCursor":{"type":["string","null"],"description":"Opaque cursor for the next page, or null when no additional page exists."}}},"CompanyResponse":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CompanyProfile"}}},"CompanyProfile":{"type":"object","required":["company","accounts","source","accountingCoverage"],"properties":{"company":{"$ref":"#/components/schemas/Company"},"accounts":{"type":"array","description":"Available reported accounts, limited to the five most recent years.","items":{"$ref":"#/components/schemas/Account"}},"source":{"type":"string"},"accountingCoverage":{"type":"string","enum":["available","not-imported","not-reported"],"description":"`not-imported` and `not-reported` are successful responses. They indicate unavailable data coverage, not a missing company."},"accountingCheckedAt":{"type":["string","null"],"format":"date-time"}}},"Company":{"type":"object","required":["orgNumber","name","legalForm","municipality","municipalityCode","industryCode","industryName","address","employees","registeredOn","foundedOn","parentOrgNumber","bankrupt","dissolving","compulsoryDissolution","deleted","vatRegistered","businessRegistered","voluntaryRegistered"],"properties":{"orgNumber":{"type":"string","pattern":"^\\d{9}$"},"name":{"type":"string"},"legalForm":{"type":["string","null"]},"municipality":{"type":["string","null"]},"municipalityCode":{"type":["string","null"]},"industryCode":{"type":["string","null"]},"industryCodes":{"type":"array","items":{"type":"string"}},"industryName":{"type":["string","null"]},"address":{"type":["string","null"]},"employees":{"type":["integer","null"],"minimum":0},"registeredOn":{"type":["string","null"],"format":"date"},"foundedOn":{"type":["string","null"],"format":"date"},"parentOrgNumber":{"type":["string","null"],"pattern":"^\\d{9}$"},"bankrupt":{"type":"boolean"},"dissolving":{"type":"boolean"},"compulsoryDissolution":{"type":"boolean"},"deleted":{"type":"boolean"},"vatRegistered":{"type":"boolean"},"businessRegistered":{"type":"boolean"},"voluntaryRegistered":{"type":"boolean"}}},"Account":{"type":"object","required":["year","startDate","endDate","scope","currency","revenue","operatingProfit","netProfit","assets","equity","liabilities","filingDate","metrics"],"properties":{"year":{"type":"integer"},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"scope":{"type":"string","enum":["company","group"]},"currency":{"type":"string"},"revenue":{"type":["number","null"]},"operatingProfit":{"type":["number","null"]},"netProfit":{"type":["number","null"]},"assets":{"type":["number","null"]},"equity":{"type":["number","null"]},"liabilities":{"type":["number","null"]},"filingDate":{"type":["string","null"],"format":"date"},"source":{"type":"string"},"metrics":{"$ref":"#/components/schemas/FinancialRatios"}}},"FinancialRatios":{"type":"object","required":["operatingMargin","netMargin","equityRatio"],"properties":{"operatingMargin":{"type":["number","null"],"description":"Operating profit divided by revenue, as a percentage."},"netMargin":{"type":["number","null"],"description":"Net profit divided by revenue, as a percentage."},"equityRatio":{"type":["number","null"],"description":"Equity divided by assets, as a percentage."}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["invalid_parameter","invalid_cursor","missing_filter","invalid_key","company_not_found","quota_exceeded","unavailable","upstream_unavailable"]},"message":{"type":"string","description":"Human-readable Norwegian error message. Clients should branch on `code`, not this text."}}}}}}}}