Search written questions
ukparl_search_questionsSearch Westminster written questions and answer previews by text, exact UIN, asking or answering member, House, answering body, answer state and dates. An undated UIN returns candidates across sessions; narrow with tabling dates and retrieve mode=detail with a returned questionId for complete question and answer HTML, corrections and attachment links. A UIN is not a questionId and never determines House. Search includes all sessions and withdrawn questions. Follow collection cursors unchanged; use contentCursor for lossless oversized answers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uin | No | Exact UIN lookup string, such as 36068 or HL1234; preserves leading zeros. Search only; combine with tabling dates to narrow reused UINs. | |
| mode | No | Search previews or retrieve one complete question. | search |
| house | No | Commons or Lords; search only. | |
| limit | No | Search page size, default 10, cap 20; larger safe integers are capped. Omit in detail. | |
| query | No | Question or answer content terms; search only. | |
| cursor | No | Opaque search continuation; repeat unchanged filters. | |
| answered | No | True answered, false unanswered, omission either; search only. | |
| memberId | No | Asking Members API ID; search only. | |
| tabledTo | No | Inclusive tabling end YYYY-MM-DD; search only. | |
| answeredTo | No | Inclusive answer end YYYY-MM-DD; search only. | |
| questionId | No | Positive decimal Questions API ID required in detail; UIN is not this ID. | |
| tabledFrom | No | Inclusive tabling start YYYY-MM-DD; search only. | |
| answeredFrom | No | Inclusive answer start YYYY-MM-DD; search only. | |
| contentCursor | No | Opaque lossless content continuation for this same selection. | |
| answeringBodyIds | No | Up to 20 answering-body IDs resolved through ukparl_lookup_reference; search only. | |
| answeringMemberId | No | Answering Members API ID; search only, independent of asking memberId. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | Effective search page-size cap. | |
| mode | No | Selected question operation. | |
| page | No | Whole-question search continuation. | |
| error | No | Present when the call failed. Absent on success. | |
| found | No | Detail lookup success; false requires guidance. | |
| items | No | Selected search page; never automatically hydrated. | |
| shown | No | Actually emitted whole search results. | |
| total | No | Upstream total when known. | |
| notice | No | Licence, preview and workload notices. | |
| record | No | Complete selected question including answer HTML and attachments metadata. | |
| source | No | Actual selected official request. | |
| applied | No | Effective filters, explicit upstream scope and date semantics. | |
| filters | No | Complete normalized selection filters. | |
| delivery | No | Full selected payload, child outline, or JSON fragment. | |
| guidance | No | Same-tool recovery for missing or empty selections. | |
| identity | No | Stable selected-record identifiers retained during content retrieval. | |
| retrieval | No | Same-tool retrieval instruction. | |
| truncated | No | Further whole search results remain. | |
| provenance | No | Selected response provenance retained during content retrieval; source notices remain in the reconstructed payload. | |
| questionId | No | Selected Questions API ID. | |
| contentPage | No | Lossless recursive content continuation. | |
| collectionPage | No | Collection continuation; reconstruct the outlined selected payload before following it. | |
| requestedLimit | No | Original page-size request when capped. |