Seadused ja valitsemine
Riigi arengu- ja strateegiadokumendid
Arengukavad, Eesti 2035 ja valitsuse tegevusprogramm Riigikantselei tabelitest.
Riigikantselei avaldab valitsus.ee-l riigi strateegiakihi: kehtivad arengukavad, koostamisel olevad arengukavad, poliitika põhialused, Eesti 2035 tegevuskava versioonid ja valitsuse tegevusprogrammi. Iga rida on fail koos avaldamise kuupäeva, vormingu ja suurusega või viide Riigi Teatajale. Praeguse tegevusprogrammi kohta faili ei olegi: selle täitmist näidatakse ainult veebis olevatel töölaudadel, mida masinloetavalt kätte ei saa.
Mida su agent peab oskama
GETPiisab lehe tõmbamisest. Kõik vajalikud päringud on tavalised HTTPS-päringud. Iga agent, kes oskab veebilehe alla laadida, saab selle juhendi läbi teha.
Juhend ise
Inglise keeles, sest seda loeb mudel.
Government Strategy Documents
Riigikantselei (Government Office) publishes the state's strategy layer on valitsus.ee: the
registry of development plans in force, plans in preparation, policy fundamentals, the versioned
Estonia 2035 action plan, and the current government's action programme.
Access
- Development plans in force:
https://www.valitsus.ee/strateegia-eesti-2035-arengukavad-ja-planeering/strateegilised-arengudokumendid/kehtivad - Development plans in preparation:
https://www.valitsus.ee/strateegia-eesti-2035-arengukavad-ja-planeering/strateegilised-arengudokumendid/koostamisel - Policy fundamentals (
poliitika põhialused):https://www.valitsus.ee/strateegia-eesti-2035-arengukavad-ja-planeering/strateegilised-arengudokumendid/poliitika - Estonia 2035 action-plan versions:
https://www.valitsus.ee/strateegia-eesti-2035-arengukavad-ja-planeering/eesti-2035-tegevuskava - Government action programme:
https://www.valitsus.ee/valitsuse-eesmargid-ja-tegevused/valitsemise-alused/tegevusprogramm-0 - Public server-rendered HTML and files; no authentication is required.
Retrieve
Every document page above except the action programme uses one identical embedded-table contract:
- Fetch the page HTML.
- Find
scriptelements whosetypeisapplication/jsonand whose generatedidstarts withdatatable-. The baredatatable-<hash>block is an array of rows;datatable-<hash>-optionsis the column configuration (titlesNimetus/Sisestamise kuupäev) — ignore it. - JSON-decode the array first. Each row is three cells whose values are HTML strings: title with file metadata, publication date, and the download action link. Parse the HTML only after decoding.
- From cell 1 take the anchor text and
hrefplus the trailing| 8.36 MB | pdfsize/format suffix; from cell 2 taketime[datetime]. Classify eachhrefas a Government Office file (/sites/default/files/...or/media/<id>/download) or ariigiteataja.eelegal reference. pagingisfalsein the options block, so the array already holds every row — there is no pagination and no request parameters to vary. Filter and sort locally.- On the Estonia 2035 page, label each row's language from its title (Estonian rows read
tegevuskava (uuendatud …), English ones'Estonia 2035' Action Plan (approved by Government …)) and separate action-plan versions from implementation-overview attachments.
The action programme page carries no table. Read its lead text for scope, the monitoring cadence and
the date the government confirmed the programme; take task-level execution status from the two
embedded PowerBI dashboards, whose iframe src values are
https://app.powerbi.com/view?r=eyJrIjoiYzUxMTg3MWUtN2M4My00N2E5LWExMzItZWFhMzEzYmQzMmJhIiwidCI6IjhmZTA5OGQyLTQyOGQtNGJkNC05ODAzLTcxOTVmZTk2ZjBlMiIsImMiOjl9&pageName=06bb907844ed3bab3769&iframe=1&langcode=et
and the same URL with pageName=80b7f5658c06fa5ad0c1; and collect the Seotud viited sidebar links
to the coalition agreement and to earlier governments' programme files.
Return
- Return the source page URL, document title, publication timestamp, document URL, URL type
(
fileorriigiteataja), file format and size when present, and retrieval time. Preserve the absolute host each row supplies — both bare andwwwforms occur. - Keep the registry a row carries with it: in force, in preparation, and policy fundamentals are separate pages and must not be merged into one undated list.
- For Estonia 2035, return a chronological version table with language and record type, not a single "current" file.
- For the action programme, return the confirmation date, the monitoring description, both dashboard URLs, and the linked earlier programme files. State task, responsible body, deadline or status only when they appear in output you actually printed.
Limits
- These tables are the current published state, not a historical archive; files are point-in-time
snapshots, so compare
time[datetime]values instead of assuming one canonical latest file. - The generated
datatable-id and the file hostname change when a page is republished. Never hard-code either — rediscover the block by itsdatatable-prefix on every run. - The PowerBI dashboards have no public export API and are not machine-readable at all; the embed URL returns the viewer shell, not task rows. Treat them as a link for the citizen, and do not state programme task statuses that you have not printed from a source.
claim The PowerBI dashboards have no public export API
reason no-such-route
because Executing this would mean showing that no endpoint of the report serves its rows to an anonymous caller, and PowerBI's own export API is tenant-authenticated, so every request we can send answers the same way whether or not such a route exists for someone holding the tenant's credentials.
- The action programme page publishes no downloadable file for the current programme — only the
dashboards. A PDF exists for the previous (53rd) government's programme at
https://www.valitsus.ee/media/6721/download. - The page's
töödeldaval kujul(machine-readable) link for the previous programme points athttps://pilv.riigikantselei.ee/index.php/s/DMesdRA5AQRExwL, which returns HTTP 404 (probed 2026-07-27). Government Office cloud-storage links expire; do not cite that link as retrievable.
claim `https://pilv.riigikantselei.ee/index.php/s/DMesdRA5AQRExwL`, which returns **HTTP 404**
GET https://pilv.riigikantselei.ee/index.php/s/DMesdRA5AQRExwL
expect-status 404
expect /This share does not exist or is no longer available/
# The share page says which kind of 404 this is — an expired share, not a
# mistyped host — and that is the sentence the guide is built on.
# The control is the cloud host's own front page, which must answer. Without
# it, the day pilv.riigikantselei.ee is down every share link "expires" and
# this claim confirms itself.
control GET https://pilv.riigikantselei.ee/
- Content is predominantly Estonian. Only the Estonia 2035 table reliably carries English versions, and older translated titles are named inconsistently.
Verify
- Require a non-empty array of three-cell rows from a
datatable-block, with a parsabletime[datetime]in cell 2 and a resolvablehrefin cell 1. - Require at least one file link to return HTTP 200 with a
%PDFsignature before treating a row as a retrievable document; the in-force registry must also expose at least oneriigiteataja.eereference.
Known-good acceptance check, run against the live page by scripts/check-sources.mjs (issue #82):
GET https://www.valitsus.ee/strateegia-eesti-2035-arengukavad-ja-planeering/strateegilised-arengudokumendid/kehtivad
expect /id="datatable-[a-f0-9]{64}"/
expect /riigiteataja\.ee/
# 25 rows on 2026-08-01 — 24 Government Office files and 1 Riigi Teataja
# reference (Eesti keskkonnastrateegia aastani 2030). The id is a 64-character
# content hash that changes whenever the page is republished, so only its shape
# may be relied on; rediscover the block by its `datatable-` prefix every run.
#
# The counter is the action-programme page, which is the same site and the same
# layout but carries NO table at all. A parse that reported rows from it would
# be reporting rows that are not there — and this page is the one a question
# about government tasks lands on first.
counter GET https://www.valitsus.ee/valitsuse-eesmargid-ja-tegevused/valitsemise-alused/tegevusprogramm-0
- For the action programme, require both PowerBI
pageNameiframes to be present on the page and the lead text to state a confirmation date; if either is missing, the page has been restructured — re-verify rather than reporting stale figures.
Module API
strategyDocuments(registry) -> {source, page, registry, label, totals, rows, note} actionProgramme() -> {source, page, confirmed, lead, totals, dashboards, files, note}