{"source":"statsregnskapet","operation":"search_entities","description":"Find departments, agencies, chapters, posts and other entities in the\nstate accounts by name, with last year's totals. Signature: search_entities(query: string, required; types: list of string (comma-separated), optional, default None; limit: integer, items, optional, default 30; offset: integer, items, optional, default 0).","signature":"search_entities(query: string, required; types: list of string (comma-separated), optional, default None; limit: integer, items, optional, default 30; offset: integer, items, optional, default 0)","parameters":[{"name":"query","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"Name or part of a name, e.g. \"vegvesen\", \"Statens vegvesen\", \"riksveiinvesteringer\". Fuzzy: small typos still match.","unit":null},{"name":"types","type":"array","schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"required":false,"default":null,"description":"Optional list restricting the entity types: departement, virksomhet (agency), programomrade, programkategori, kapittel (chapter), post, kontoklasse, kontogruppe, artskonto, begrep (concept). Default: all.","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer"},"required":false,"default":30,"description":"Max entities to return, 1-30 (the upstream cap). Unit: items.","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet/search_entities?query={query}&types={types}&limit=30&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"total":{"type":"integer"},"returned":{"type":"integer"},"by_type":{"type":"object","additionalProperties":{"type":"integer"}},"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":["string","null"]},"id":{"type":["string","null"]},"uid":{"type":["string","null"]},"name":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"parent_name":{"type":["string","null"]},"first_year":{"type":["integer","null"]},"last_year":{"type":["integer","null"]},"expenses_last_year_nok":{"type":["number","null"]},"income_last_year_nok":{"type":["number","null"]},"fte":{"type":["number","null"]},"description":{"type":["string","null"]}},"additionalProperties":false}}},"additionalProperties":false,"required":["total","returned","by_type","items"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"502":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":true}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet/search_entities/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet/search_entities","source":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["total","returned","by_type","items","items[].type","items[].id","items[].uid","items[].name","items[].parent_id","items[].parent_name","items[].first_year","items[].last_year","items[].expenses_last_year_nok","items[].income_last_year_nok","items[].fte","items[].description"],"output_fields_truncated":false,"canonical_field_aliases":{"identifier":["items[].id"],"name":["items[].name"]},"response_example":{"source":"statsregnskapet","operation":"search_entities","parameters":{"query":"example value","types":["example value"],"limit":30},"data":{"total":1,"returned":1,"by_type":{"example_key":1},"items":[{"type":"example value","id":"example-id","uid":"example value","name":"Example","parent_id":"example-id","parent_name":"Example","first_year":1,"last_year":1,"expenses_last_year_nok":1.0,"income_last_year_nok":1.0,"fte":1.0,"description":"example value"}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"statsregnskapet","name":"Statsregnskapet (state accounts)","description":"Central-government accounts from DF\u00d8: entity search, actual spending and income per chapter, post, agency, department or month since 2014, and the appropriations Stortinget granted.","cache_ttl_seconds":3600,"documentation":"https://statsregnskapet.dfo.no/om-statsregnskapet"}]},"_provenance":{"data":{"source":"statsregnskapet","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet"},"entities":{"source":"statsregnskapet","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet/search_entities","source":"https://allemannsdata.com/wiki/api/v1/kilder/statsregnskapet","wiki":"https://allemannsdata.com/wiki/kilder/statsregnskapet/search_entities/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
