Search and read parliamentary speeches
riksdag_search_speechesSearch speeches within a required parliamentary session, optionally by member, party, reply exclusion and heading tokens. Heading matching searches debate headings only, never body text. Search hydrates one text page by default; use get mode with an item speechId to read all remaining text and retain the returned revision for continuation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Search by default; get reads one retrieval speechId. | |
| limit | No | Search only: requested rows, default 5 and applied maximum 20. | |
| party | No | Search only: official party code or exact reference label. | |
| offset | No | Search only: local row offset, default 0. | |
| session | No | Required in search mode; parliamentary session such as 2024/25. | |
| memberId | No | Search only: numeric memberId from riksdag_search_members, retaining leading zeros. | |
| revision | No | Search candidate revision or get textRevision copied from the preceding page. | |
| speechId | No | Required in get mode: retrieval ID copied from a search item, never the source UUID. | |
| textCount | No | Search only: maximum speeches to request text for, default 1 and applied maximum 5; 0 returns metadata. | |
| speechType | No | Search only: all by default; speech excludes replies. | |
| textLength | No | Get only: requested Unicode code points; defaults start at 8000 and fit the complete response; explicit lengths are honored. | |
| textOffset | No | Get only: Unicode code-point offset, default 0. | |
| headingContains | No | Search only: all-token local heading and subheading filter, ignoring case and diacritics; never body search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | Get mode: exact speech metadata and text page. | |
| mode | No | Applied search or detail mode. | |
| error | No | Present when the call failed. Absent on success. | |
| found | No | Get mode: whether the retrieval ID exists. | |
| items | No | Search mode: local speech page after heading filtering. | |
| limit | No | Applied search page size after clamp and response fitting. | |
| offset | No | Applied local row offset. | |
| source | No | Required attribution to the Swedish Parliament. | |
| hasMore | No | Whether filtered speech rows remain. | |
| notices | No | All applicable notices, including an empty list. | |
| guidance | No | Recovery guidance for an expected detail miss. | |
| nextCall | No | Complete next local search-page call. | |
| revision | No | Search candidate-set revision or complete get detail revision. | |
| speechId | No | Get mode: requested retrieval ID. | |
| textCount | No | Applied maximum speeches selected for text retrieval. | |
| truncated | No | Whether response fitting shortened the local row page. | |
| totalCount | No | Exact local heading-filtered match count. | |
| retrievedAt | No | Source fetch time, retained unchanged on cache hits. | |
| returnedCount | No | Speech rows returned on this page. | |
| upstreamQuery | No | Upstream query echo; not proof that a filter was applied. | |
| candidateCount | No | Complete validated upstream candidate count. | |
| effectiveQuery | No | Deterministic normalized input, applied defaults and local filters. | |
| requestedLimit | No | Original requested search page size. | |
| upstreamWarnings | No | Warnings supplied by the source. |