Shard schema
Record shard
A single public record — written question, ministerial statement, oral evidence session, debate contribution, bill, division vote, committee report. Carries title, body text, source URL, breadcrumbs, named entities, system metadata, optional ParliamentTV block for broadcast records, and the full provenance chain back to the official source.
This page is the field reference for developers and AI clients. If you came here looking for a specific record, browse the search instead.
Required fields
10
Optional fields
7
Dialect
JSON Schema draft 2020-12
Version
Required fields
Every shard validating against record@0.4.0 ships these fields. Provenance lines show where each value comes from — the load-bearing column for the structured-evidence promise.
-
stableIdstringCTR-stable record identifier; survives source-side ID churn.
Provenance: Generated at intake from recordType + publication date + source officialId.
-
officialIdstringIdentifier in the authoritative source system.
Provenance: Taken verbatim from the per-source identifier field (Hansard contributionId, Written Questions questionId, Members API memberId, Bills API billId).
-
recordTypeenum (7 values)Record-type bucket.
written_questionwritten_statementoral_contributionoral_evidencedivision_votebillcommittee_report
Provenance: Determined at intake from the source endpoint that supplied the record.
-
titlestringTitle or question text.
Provenance: Verbatim from the source heading (WQ heading, statement title, Hansard contribution heading).
-
publishedAtstring<ISO 8601>When the source published this record.
Provenance: Source-provided publication timestamp; normalised to UTC.
-
sourceUrlstring<URL>Canonical URL on the official source.
Provenance: Constructed at intake from the per-source officialId via the documented URL template; checked for HTTP 200 at fetch time.
-
parserVersionstringParser name + version that emitted this record.
Provenance: Pinned by the intake pipeline; each parser carries its own semver.
-
licenceAttributionstringRequired licence-attribution line for derivative use.
Provenance: Static per source family — e.g. Open Parliament Licence v3.0 for Parliamentary material.
-
contentCompletenessStatusenum [content_complete | content_partial | content_unavailable]Did we capture the full content?
Provenance: Set by the intake parser based on whether body extraction succeeded, was partial, or failed.
-
provenanceobjectCryptographic provenance for the bytes we fetched.
Provenance: Emitted by intake fetcher at retrieval time.
Nested fields (6)
-
sourceEvidenceIdintegerInternal evidence-store row identifier for ops debugging.
Provenance: Intake evidence-store row id; useful for ops but not load-bearing for verification (the SHA-256 below is).
-
evidenceSha256string<SHA-256>SHA-256 hash of the retained raw bytes.
Provenance: Computed at fetch over the raw response body; load-bearing for the trust contract.
-
requestUrlstring<URL>Exact URL the fetcher requested (often a sibling API endpoint).
Provenance: Logged at fetch time; may differ from the canonical sourceUrl when intake uses an API alongside the HTML page.
-
fetchedAtstring<ISO 8601>When the fetcher retrieved the bytes.
Provenance: Fetcher wallclock at retrieval; UTC.
-
parserVersionstringParser version that produced this shard (echoed for chain-verification).
Provenance: Same as the top-level parserVersion above; duplicated so a single shard line in a JSONL bundle is self-contained.
-
retainedBytesAvailablebooleanWhether the archived envelope is still retrievable from the evidence store.
Provenance: Set by the retention manager; false if the bytes were pruned under retention policy.
-
Optional fields
Present where the source carries the value or the derivation succeeds. Code consuming this schema should treat them as nullable.
-
houseenum [Commons | Lords | Joint] · optionalHouse the record belongs to.
Provenance: Source endpoint or explicit house field on the source response.
-
sessionstring · optionalParliamentary session.
Provenance: Source field; conventional `YYYY-YY` form.
-
bodyTextstring · optionalFull body text of the record where licence permits.
Provenance: Extracted from the source API JSON or the HTML body element; whitespace-normalised but never paraphrased.
-
excerptstring · optionalShort excerpt for list views (≤300 chars).
Provenance: Programmatically truncated from bodyText at a word boundary; never paraphrased.
-
parliamentTVobject · optionalBroadcast metadata for debate-derived records.
Provenance: Joined at intake from ParliamentLive metadata where the source carries a broadcast reference.
Nested fields (4)
-
eventIdstringParliamentLive event identifier.
Provenance: Parliament TV API event reference.
-
inSecondsintegerStart offset of this contribution.
Provenance: Hansard contribution → ParliamentLive timestamp join performed at intake.
-
outSecondsintegerEnd offset of this contribution.
Provenance: Same as inSeconds.
-
embedUrlstring<URL> · optionalDirect embed URL with in/out params.
Provenance: Constructed at intake from the ParliamentLive URL template.
-
-
entitiesarray<object> · optionalNamed entities linked to this record.
Provenance: Per-record entity links produced at intake from speaker / addressee / mentioned-entity fields in the source feed; never inferred from body text by LLM.
-
systemMetadataarray<object> · optionalMetadata strip rendered on the record-detail page.
Provenance: Composed from record fields at shard-build time.
Source families for planned record data
The following real source-family taxonomy is associated with record@0.4.0. Click through for metadata and publication status.
Related schemas
Entities referenced by this shard kind. A record shard's entities[] / nested references resolve to shards of these kinds.
Versioning + dialect
Each planned schema follows semver. Patch bumps are additive and backwards-compatible. Minor bumps may add required fields or change validation rules. Major bumps will use a new URL path once canonical files are published.
Published structured data will declare its version in a $schema field. AI clients should respect that version when files become available.