{"source":"ssb","operation":"get_table_data","description":"Get data from an SSB table in JSON-stat2 format using a safe GET query. Signature: get_table_data(table_id: string, required; value_codes: JSON object, optional, default None; lang: one of: no, en, optional, default 'no').","signature":"get_table_data(table_id: string, required; value_codes: JSON object, optional, default None; lang: one of: no, en, optional, default 'no')","parameters":[{"name":"table_id","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"Five-digit Statbank table id, e.g. \"07459\".","unit":null},{"name":"value_codes","type":"object","schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"required":false,"default":null,"description":"Optional JSON object mapping dimension ids to selections, for example {\"Region\":\"0301\",\"Tid\":\"top(3)\",\"ContentsCode\":\"*\"}. Omit it for SSB's small default extract. Values may be strings or lists. Use the exact dimension and value codes returned by get_table_metadata; display prefixes from the Statbank UI are not API value codes.","unit":null},{"name":"lang","type":"string","schema":{"enum":["no","en"],"type":"string"},"required":false,"default":"no","description":"Result language, \"no\" or \"en\".","unit":null}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/ssb/get_table_data?table_id={table_id}&value_codes={value_codes}&lang=no","not_paged":"Returns one JSON-stat dataset; choose rows with value_codes.","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/ssb/get_table_data?table_id=07459&value_codes=%7B%22Region%22%3A%220301%22%2C%22Tid%22%3A%222025%22%2C%22ContentsCode%22%3A%22%2A%22%7D","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"version":{"type":["string","null"]},"class":{"type":["string","null"]},"label":{"type":["string","null"]},"source":{"type":["string","null"]},"updated":{"type":["string","null"],"format":"date-time"},"note":{"type":["array","null"],"items":{"type":"string"}},"role":{"type":["object","null"]},"id":{"type":"array","items":{"type":"string"}},"size":{"type":"array","items":{"type":"integer"}},"dimension":{"type":"object"},"value":{"type":["array","null"],"items":{"type":["number","null"]}},"extension":{"type":["object","null"]},"link":{"type":["object","null"]}},"required":["class","dimension"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"projected","entity_types":["statistical_table"],"description":"Recognized records and stable operation identifiers are projected; an empty array means the successful payload contained no recognizable entity."},"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","ENDPOINT_NOT_FOUND"],"retryable":false},"405":{"codes":["METHOD_NOT_ALLOWED"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":false}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/ssb/get_table_data/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/ssb/get_table_data","source":"https://allemannsdata.com/wiki/api/v1/kilder/ssb","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["version","class","label","source","updated","note","role","id","size","dimension","value","extension","link"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["label"],"identifier":["id"]},"temporal_conventions":{"timezone":"explicit_offset","join_guidance":"date-time fields are RFC 3339 with an explicit offset (Z, +00:00 or the Europe/Oslo offset); compare absolute instants, not clock text. date fields are calendar dates without a time zone.","datetime_fields":["updated"]},"response_example":{"source":"ssb","operation":"get_table_data","parameters":{"table_id":"07459","value_codes":"{\"Region\":\"0301\",\"Tid\":\"2025\",\"ContentsCode\":\"*\"}"},"data":{"version":"example value","class":"example value","label":"Example","source":"example value","updated":"2026-01-15T12:00:00Z","note":["example value"],"role":{},"id":["example-id"],"size":[1],"dimension":{},"value":[1.0],"extension":{},"link":{}},"entities":[{"type":"statistical_table","id":"07459","source":"ssb","description":"Statistical table used as the operation input."}],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"ssb","name":"Statistics Norway","description":"Search Statbank and fetch table metadata, dimensions, units and statistics in JSON-stat2.","publisher":"Statistisk sentralbyr\u00e5 (SSB)","license":"https://creativecommons.org/licenses/by/4.0/","cache_ttl_seconds":300,"documentation":"https://www.ssb.no/api/pxwebapiv2"}]},"_provenance":{"data":{"source":"ssb","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/ssb"},"entities":{"source":"ssb","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/ssb","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/ssb/get_table_data","source":"https://allemannsdata.com/wiki/api/v1/kilder/ssb","wiki":"https://allemannsdata.com/wiki/kilder/ssb/get_table_data/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
