{"source":"stortinget","operation":"search_questions","description":"Search parliamentary questions in a session.","parameters":[{"name":"session_id","schema":{"type":"string"},"required":true,"default":null,"description":"Session from list_sessions(), e.g. \"2025-2026\"."},{"name":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional text matched against the question, representative, minister title and topics."},{"name":"question_type","schema":{"type":"string"},"required":false,"default":"written","description":"\"written\", \"interpellation\" or \"question_time\"."},{"name":"status","schema":{"type":"string"},"required":false,"default":"all","description":"Upstream status filter: \"all\", \"answered\", \"pending\", \"withdrawn\", \"lapsed\" or \"postponed\". English values are mapped to Stortinget's documented Norwegian API values."},{"name":"limit","schema":{"type":"integer"},"required":false,"default":50,"description":"Maximum results to return, 1-100."},{"name":"offset","schema":{"type":"integer"},"required":false,"default":0,"description":"Number of matching results to skip."}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget/search_questions?session_id={session_id}&query={query}&question_type=written&status=all&limit=50&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"session_id":{"type":["string","null"]},"question_type":{"type":"string"},"total":{"type":"integer"},"offset":{"type":"integer"},"returned":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":["integer","null"]},"legacy_id":{"type":["integer","null"]},"number":{"type":["integer","null"]},"title":{"type":["string","null"]},"type_code":{"type":["string","null"]},"status_code":{"type":["string","null"]},"sent_date":{"type":["string","null"],"format":"date-time"},"answered_date":{"type":["string","null"],"format":"date-time"},"asked_by":{"anyOf":[{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"party":{"type":["string","null"]}},"additionalProperties":false},{"type":"null"}]},"addressed_to":{"type":"object","properties":{"person":{"anyOf":[{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"party":{"type":["string","null"]}},"additionalProperties":false},{"type":"null"}]},"minister_id":{"type":["string","null"]},"minister_title":{"type":["string","null"]}},"additionalProperties":false},"topics":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false,"required":["question_type","total","offset","returned","questions"]},"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/stortinget/search_questions/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget/search_questions","source":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["session_id","question_type","total","offset","returned","questions","questions[].id","questions[].legacy_id","questions[].number","questions[].title","questions[].type_code","questions[].status_code","questions[].sent_date","questions[].answered_date","questions[].asked_by","questions[].asked_by.id","questions[].asked_by.name","questions[].asked_by.party","questions[].addressed_to","questions[].addressed_to.person","questions[].addressed_to.person.id","questions[].addressed_to.person.name","questions[].addressed_to.person.party","questions[].addressed_to.minister_id","questions[].addressed_to.minister_title","questions[].topics"],"output_fields_truncated":false,"canonical_field_aliases":{"identifier":["questions[].id","questions[].asked_by.id","questions[].addressed_to.person.id"],"name":["questions[].title","questions[].asked_by.name","questions[].addressed_to.person.name"]},"response_example":{"source":"stortinget","operation":"search_questions","parameters":{"session_id":"example-id","query":"example value","question_type":"written","status":"all","limit":50,"offset":0},"data":{"session_id":"example-id","question_type":"example value","total":1,"offset":1,"returned":1,"questions":[{"id":1,"legacy_id":1,"number":1,"title":"Example","type_code":"example value","status_code":"example value","sent_date":"2026-01-15T12:00:00Z","answered_date":"2026-01-15T12:00:00Z","asked_by":{"id":"example-id","name":"Example","party":"example value"},"addressed_to":{"person":{"id":"example-id","name":"Example","party":"example value"},"minister_id":"example-id","minister_title":"example value"},"topics":["example value"]}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"stortinget","name":"Stortinget open data","description":"Parliamentary representatives, questions, hearings, meetings, cases, votes and election results.","cache_ttl_seconds":300,"documentation":"https://data.stortinget.no/"}]},"_provenance":{"data":{"source":"stortinget","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget"},"entities":{"source":"stortinget","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget/search_questions","source":"https://allemannsdata.com/wiki/api/v1/kilder/stortinget","wiki":"https://allemannsdata.com/wiki/kilder/stortinget/search_questions/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
