Written Questions Service API
This API provides data on written parliamentary questions and their answers, as well as written ministerial statements, published by UK Parliament. It covers material submitted and answered in the House of Commons and House of Lords, allowing access to the text of questions, responses, and statements along with related metadata such as dates and members involved. The service is freely accessible without authentication and supports national-level coverage of UK parliamentary proceedings, useful for tracking government responses and ministerial announcements over time.Data around written questions and answers, as well as written ministerial statements.
Trust score
How is this computed?Weighted across five axes. Tap a ring for what it measures.
Data schema (89 fields)
| Field | Type | Description |
|---|---|---|
| dateFromDate from | string (date-time) | Filters daily reports to those on or after this date.Daily report with report date on or after the date specified. Date format yyyy-mm-dd |
| dateToDate to | string (date-time) | Filters daily reports to those on or before this date.Daily report with report date on or before the date specified. Date format yyyy-mm-dd |
| house | string | Filters by parliamentary House; defaults to both Houses.Daily report relating to the House specified. Defaults to Bicameral |
| skip | integer (int32) | Number of records to skip for pagination, default 0.Number of records to skip, default is 0 |
| take | integer (int32) | Number of records to return, default 20.Number of records to take, default is 20 |
| askingMemberIdAsking member id | integer (int32) | Filters written questions by the ID of the asking member.Written questions asked by member with member ID specified |
| answeringMemberIdAnswering member id | integer (int32) | Filters written questions by the ID of the answering member.Written questions answered by member with member ID specified |
| tabledWhenFromTabled when from | string (date-time) | Filters written questions tabled on or after this date.Written questions tabled on or after the date specified. Date format yyyy-mm-dd |
| dateForAnswerWhenFromDate for answer when from | string (date-time) | Filters questions with a due answer date on or after this date.Written questions DateForAnswer on or after the date specified format yyyy-mm-dd |
| dateForAnswerWhenToDate for answer when to | string (date-time) | Filters questions with a due answer date on or before this date.Written questions DateForAnswer on or before the date specified format yyyy-mm-dd |
| tabledWhenToTabled when to | string (date-time) | Filters written questions tabled on or before this date.Written questions tabled on or before the date specified. Date format yyyy-mm-dd |
| answered | string | Filters questions by answered, unanswered, or either status.Written questions that have been answered, unanswered or either. |
| answeredWhenFromAnswered when from | string (date-time) | Filters written questions answered on or after this date.Written questions answered on or after the date specified. Date format yyyy-mm-dd |
| answeredWhenToAnswered when to | string (date-time) | Filters written questions answered on or before this date.Written questions answered on or before the date specified. Date format yyyy-mm-dd |
| questionStatusQuestion status | string | Filters written questions by their status.Written questions with the status specified |
| includeWithdrawnInclude withdrawn | boolean | Whether to include withdrawn written questions in results.Include written questions that have been withdrawn |
| expandMemberExpand member | boolean | Whether to include full member details in results.Expand the details of Members in the results |
| correctedWhenFromCorrected when from | string (date-time) | Filters written questions corrected on or after this date.Written questions corrected on or after the date specified. Date format yyyy-mm-dd |
| correctedWhenToCorrected when to | string (date-time) | Filters written questions corrected on or before this date.Written questions corrected on or before the date specified. Date format yyyy-mm-dd |
| sessionStatusSession status | string | Filters questions by parliamentary session status.The Session status for which the Questions data will be returned |
| searchTermSearch term | string | Filters written questions or statements by text search term.Written questions / statements containing the search term specified, searches item content |
| uINU in | string | Filters written questions or statements by their unique identifying number.Written questions / statements with the uin specified |
| answeringBodiesAnswering bodies | array | Filters by IDs of the government bodies answering the questions.Written questions / statements relating to the answering bodies with the IDs specified |
| members | array | Filters by IDs of members related to the questions or statements.Written questions / statements relating to the members with the IDs specified |
| id | integer (int32) | Identifier of the written question.written question with ID specified |
| date | string (date-time) | Filters written questions by a specific date.Written question on date specified |
| uin | string | Unique identifying number of the written question.Written question with uid specified |
| madeWhenFromMade when from | string (date-time) | Filters written statements made on or after this date.Written statements made on or after the date specified. Date format yyyy-mm-dd |
| madeWhenToMade when to | string (date-time) | Filters written statements made on or before this date.Written statements made on or before the date specified. Date format yyyy-mm-dd |
| urlAttachmentViewModel | string | URL to download the attachment file.URL to download the attachment file. |
| titleAttachmentViewModel | string | Title of the attachment.Title of the attachment. |
| fileTypeAttachmentViewModel | string | File format of the attachment.File format of the attachment. |
| fileSizeBytesAttachmentViewModel | integer (int64) | Size of the attachment file in bytes.Size of the attachment file in bytes. |
| valueDailyReportViewModelItem | object | Content of the daily report item.Content of the daily report item. |
| linksDailyReportViewModelItem | array<object> | Related hyperlinks associated with the daily report item.Related hyperlinks associated with the daily report item. |
| totalResultsDailyReportViewModelSearchResult | integer (int32) | Total number of matching daily report results.Total number of matching daily report results. |
| resultsDailyReportViewModelSearchResult | array<object> | List of daily report items matching the search.List of daily report items matching the search. |
| questionUinGroupedQuestionViewModel | string | Unique identifying number of a grouped question.Unique identifying number of a grouped question. |
| dateTabledGroupedQuestionViewModel | string (date-time) | Date the grouped question was tabled.Date the grouped question was tabled. |
| linkedStatementIdLinkedStatements | integer (int32) | Identifier of a statement linked to this record.Identifier of a statement linked to this record. |
| linkTypeLinkedStatements | object | Type of relationship between linked statements.Type of relationship between linked statements. |
| linkDateLinkedStatements | string (date-time) | Date the linked statement relationship was created.Date the linked statement relationship was created. |
| listAsMemberViewModel | string | Name format used to list the member.Name format used to list the member. |
| nameMemberViewModel | string | Full name of the member.Full name of the member. |
| partyMemberViewModel | string | Political party of the member.Political party of the member. |
| partyColourMemberViewModel | string | Colour associated with the member's political party.Colour associated with the member's political party. |
| partyAbbreviationMemberViewModel | string | Abbreviated name of the member's political party.Abbreviated name of the member's political party. |
| memberFromMemberViewModel | string | Constituency or region the member represents.Constituency or region the member represents. |
| thumbnailUrlMemberViewModel | string | URL to the member's thumbnail image.URL to the member's thumbnail image. |
| askingMemberQuestionsViewModel | object | Details of the member who asked the question.Details of the member who asked the question. |
| memberHasInterestQuestionsViewModel | boolean | Whether the asking member has a declared interest.Whether the asking member has a declared interest. |
| dateForAnswerQuestionsViewModel | string (date-time) | Due date by which the question is to be answered.Due date by which the question is to be answered. |
| questionTextQuestionsViewModel | string | Full text of the written question.Full text of the written question. |
| answeringBodyIdQuestionsViewModel | integer (int32) | Identifier of the government body answering the question.Identifier of the government body answering the question. |
| answeringBodyNameQuestionsViewModel | string | Name of the government body answering the question.Name of the government body answering the question. |
| isWithdrawnQuestionsViewModel | boolean | Whether the question has been withdrawn.Whether the question has been withdrawn. |
| isNamedDayQuestionsViewModel | boolean | Whether the question was tabled for a named day answer.Whether the question was tabled for a named day answer. |
| groupedQuestionsQuestionsViewModel | array<string> | UINs of other questions grouped with this one.UINs of other questions grouped with this one. |
| answerIsHoldingQuestionsViewModel | boolean | Whether the answer given is a holding answer.Whether the answer given is a holding answer. |
| answerIsCorrectionQuestionsViewModel | boolean | Whether the answer is a correction of a previous answer.Whether the answer is a correction of a previous answer. |
| answeringMemberQuestionsViewModel | object | Details of the member who answered the question.Details of the member who answered the question. |
| correctingMemberIdQuestionsViewModel | integer (int32) | Identifier of the member who corrected the answer.Identifier of the member who corrected the answer. |
| correctingMemberQuestionsViewModel | object | Details of the member who corrected the answer.Details of the member who corrected the answer. |
| dateAnsweredQuestionsViewModel | string (date-time) | Date the question was answered.Date the question was answered. |
| answerTextQuestionsViewModel | string | Full text of the answer given.Full text of the answer given. |
| originalAnswerTextQuestionsViewModel | string | Original answer text before any correction.Original answer text before any correction. |
| comparableAnswerTextQuestionsViewModel | string | Normalised answer text used for comparison purposes.Normalised answer text used for comparison purposes. |
| dateAnswerCorrectedQuestionsViewModel | string (date-time) | Date the answer was corrected.Date the answer was corrected. |
| dateHoldingAnswerQuestionsViewModel | string (date-time) | Date a holding answer was given.Date a holding answer was given. |
| attachmentCountQuestionsViewModel | integer (int32) | Number of attachments associated with the question.Number of attachments associated with the question. |
| headingQuestionsViewModel | string | Subject heading of the question.Subject heading of the question. |
| attachmentsQuestionsViewModel | array<object> | List of files attached to the question.List of files attached to the question. |
| groupedQuestionsDatesQuestionsViewModel | array<object> | Tabled dates of questions grouped with this one.Tabled dates of questions grouped with this one. |
| memberIdStatementsViewModel | integer (int32) | Identifier of the member who made the statement.Identifier of the member who made the statement. |
| memberStatementsViewModel | object | Details of the member who made the statement.Details of the member who made the statement. |
| memberRoleStatementsViewModel | string | Ministerial or other role held by the member.Ministerial or other role held by the member. |
| dateMadeStatementsViewModel | string (date-time) | Date the statement was made.Date the statement was made. |
| textStatementsViewModel | string | Full text of the statement.Full text of the statement. |
| noticeNumberStatementsViewModel | integer (int32) | Notice number assigned to the statement.Notice number assigned to the statement. |
| hasAttachmentsStatementsViewModel | boolean | Whether the statement has associated attachments.Whether the statement has associated attachments. |
| hasLinkedStatementsStatementsViewModel | boolean | Whether the statement has linked statements.Whether the statement has linked statements. |
| linkedStatementsStatementsViewModel | array<object> | List of statements linked to this one.List of statements linked to this one. |
| relLink | string | Relationship type of the link.Relationship type of the link. |
| hrefLink | string | URL target of the link.URL target of the link. |
| methodLink | string | HTTP method used for the link.HTTP method used for the link. |
| typeProblemDetails | string | URI identifying the type of error.URI identifying the type of error. |
| statusProblemDetails | integer (int32) | HTTP status code of the error response.HTTP status code of the error response. |
| detailProblemDetails | string | Human-readable explanation of the error.Human-readable explanation of the error. |
| instanceProblemDetails | string | URI identifying the specific occurrence of the error.URI identifying the specific occurrence of the error. |
Schema captured from openapi 20 days ago.
Verification Status
Using the API
Configuration
- Base URL
- https://writtenquestions-api.parliament.uk
- Version
- v1
- Format
- openapi
- Endpoints
- 7
Try the API
/api/dailyreports/dailyreportsReturns a list of daily reports
/api/writtenquestions/questionsReturns a list of written questions
/api/writtenquestions/questions/{id}Returns a written question
/api/writtenquestions/questions/{date}/{uin}Returns a written question
/api/writtenstatements/statementsReturns a list of written statements
Requests are proxied through our servers. Only GET endpoints are testable.
Endpoints (7)
/api7 endpoints
/api/dailyreports/dailyreportsReturns a list of daily reports
/api/writtenquestions/questionsReturns a list of written questions
/api/writtenquestions/questions/{id}Returns a written question
/api/writtenquestions/questions/{date}/{uin}Returns a written question
/api/writtenstatements/statementsReturns a list of written statements
/api/writtenstatements/statements/{id}Returns a written statement
/api/writtenstatements/statements/{date}/{uin}Returns a written statemnet
Query examples
curl -s 'https://writtenquestions-api.parliament.uk/swagger/v1/swagger.json' -H 'Accept: application/json'Machine-readable API description (use it to generate clients).
Machine-readable & source
Embed this badge in a README or wiki — it always shows the latest verification state and quality tier.