- name
- althingi
- description
- Alþingi XML — MPs, per-MP vote records, bills, committees, speeches, ministers, lobbying submissions. Use for Icelandic parliamentary analysis.
# Alþingi — Parliament XML
**Requires:** Tier 0 (core).
Open XML feeds from the Alþingi database: every MP since 1875, per-MP roll-call
votes, the parliamentary matter catalogue, committee membership, speeches, ministerial
appointments and consultation submissions.
## API
**Base URL:** `https://www.althingi.is/altext/xml/`
No authentication, no rate limit published. Plain `GET`, no query language —
each endpoint is a fixed path with query-string filters. Responses are
`text/xml; charset=utf-8`.
**Send a User-Agent.** The site returns **403 Forbidden** to httpx's default
UA. Any identifying string is accepted — sending none, or a default library
UA, is the failure mode. `curl` works out of the box, so this bites only when
moving from a shell probe to code.
Responses are served through Cloudflare and come back `cf-cache-status: HIT`
with an `age` of up to ~10 minutes. Combined with the daily refresh, treat
anything you read as up to a day old.
Data refreshes **once per day** ("Gögnin uppfærast að öllu jöfnu einu sinni á
sólarhring"), so there is nothing to gain from polling faster.
### There is no schema
Alþingi states outright: *"Ekki er til xml-skema fyrir gögnin, nema
Alþingistíðindi"* and *"Framsetningin á gögnunum geta tekið breytingum án
fyrirvara"* — no XSD except for Alþingistíðindi, and the shape may change
without notice.
In practice there is **no schema at all**. The two XSDs the index page links
for the record proper —
`http://skema.althingi.is/skema/althingi_{gerdabok,raedur}.xsd` — are dead:
`skema.althingi.is` returns no DNS answer (checked 2026-08-15, while
`www.althingi.is` resolves normally). Do not plan on validating against them.
So everything here is shape-by-observation. That is what the health probe
guards, and it is why it asserts Icelandic element *names* rather than values.
### Element names are Icelandic
Tags are `<þingmaður>`, `<atkvæðagreiðsla>`, `<þingflokkur>`, `<kjördæmi>` —
non-ASCII, which is legal XML but unusual. Both `lxml` and stdlib
`xml.etree.ElementTree` handle it; this repo uses the stdlib parser, so no new
dependency. Parse from **bytes** (`resp.content`), never `resp.text` — the
documents carry their own encoding declaration and a `str` input trips
`ValueError: Unicode strings with encoding declaration are not supported`.
## Common parameters
| Parameter | Applies to | Example | Notes |
|-----------|-----------|---------|-------|
| `lthing` | most list endpoints | `?lthing=156` | Parliament (löggjafarþing) number |
| `dagur` | rosters, votes, speeches | `?dagur=14.2.2013` or `?dagur=20190916` | **Two date formats in the wild** — `D.M.YYYY` for rosters, `YYYYMMDD` for votes/speeches |
| `dagar` | votes, speeches | `?dagar=100` | Trailing window in days |
| `malnr` | matter detail | `?lthing=156&malnr=1` | Only unique *within* a `málsflokkur` — see caveat 3 |
| `nr` | per-person detail | `?nr=1547` | Person id, stable across parliaments |
| `nnefnd` | committee members | `?lthing=156&nnefnd=201` | Committee id |
## Endpoints
### Core — what `scripts/althingi.py` fetches
| Endpoint | Root element | Purpose |
|----------|-------------|---------|
| `loggjafarthing/` | `löggjafarþing` | Every parliament 1..N with dates and per-þing index links |
| `loggjafarthing/yfirstandandi/` | `löggjafarþing` | The **current** parliament — resolve this at runtime, never hardcode |
| `thingmenn/?lthing=N` | `þingmannalisti` | Everyone who sat during þing N (members *and* substitutes) |
| `thingmenn/thingmadur/thingseta/?nr=N` | `þingmaður` | **Party + constituency + seat, per parliament.** The only route to party affiliation |
| `atkvaedagreidslur/?lthing=N` | `atkvæðagreiðslur` | All vote events of a parliament |
| `atkvaedagreidslur/atkvaedagreidsla/?numer=N` | `atkvæðagreiðsla` | One vote **with the per-MP ballot** (`<atkvæðaskrá>`) |
| `thingmalalisti/?lthing=N` | `málaskrá` | All matters (bills, resolutions, questions) of a parliament |
| `nefndir/nefndarmenn/?lthing=N` | `nefndarmenn` | Committee membership with start/end dates |
| `thingfundir/?lthing=N` | `þingfundir` | Sittings: number, title, start/end timestamps |
| `raedulisti/?lthing=N` | `ræðulisti` | Speech **metadata** — speaker, times, links. Not the text |
### Also available — documented, not yet scripted
| Endpoint | Root element | What it holds |
|----------|-------------|---------------|
| `thingmenn/thingmadur/?nr=N` | `þingmaður` | One MP: name, birth date, links |
| `thingmalalisti/thingmal/?lthing=N&malnr=M` | `þingmál` | A-matter detail: sponsors, stages, documents |
| `thingmalalisti/bmal/?lthing=N&malnr=M` | `bmál` | **B-matter detail — a separate route**, see caveat 3 |
| `nefndir/?lthing=N` | `nefndir` | Committees active in þing N |
| `thingmenn/thingmadur/hagsmunir/?nr=N` | `þingmaður` | **Declarations of interest** — an MP's directorships, shareholdings, paid roles. Joins to `skatturinn` ownership data by company name |
| `erindi/?lthing=N` | `erindaskrá` | **Consultation submissions** to committees — the lobbying trail. ~800 KB per parliament |
| `erindi/sendandi/?lthing=N` | `sendendur` | Who submitted, aggregated by sender |
| `thingmenn/thingmadur/lifshlaup/?nr=N` | `þingmaður` | Biography — education, career, offices |
| `thingmenn/thingmadur/nefndaseta/?nr=N` | `þingmaður` | One MP's committee history |
| `thingskjol/?lthing=N` | `þingskjöl` | Parliamentary documents index |
| `thingskjol/thingskjal/?lthing=N&skjalnr=N` | `þingskjal` | One document |
| `samantektir/?lthing=N` | `samantektir` | Plain-language summaries of matters |
| `samantektir/samantekt/?lthing=N&malnr=M` | `samantekt` | One summary (often empty — 87 bytes) |
| `efnisflokkar/` | `efnisflokkar` | Subject taxonomy, two levels (`yfirflokkur` → `efnisflokkur`) |
| `efnisflokkar/efnisflokkur/?lthing=N&efnisflokkur=K` | `efnisflokkar` | Matters in a subject category |
| `nefndarfundir/` | `nefndarfundir` | Committee meetings. **Trailing slash required** — without it, 301 to HTML |
| `dagskra/thingfundur/?lthing=N&fundur=M` | `dagskráþingfundar` | Order paper for one sitting |
| `forsetar/?lthing=N` | `forsetalisti` | Speaker and deputy speakers |
| `framsogumenn/?lthing=N` | `framsögumannaskrá` | Committee rapporteurs per matter |
| `thingflokkar/?lthing=N` | `þingflokkar` | Parliamentary groups with abbreviations |
| `thingflokksformenn/?lthing=N` | `þingflokksformenn` | Group chairs |
| `kjordaemi/?lthing=N` | `kjördæmin` | Constituencies |
| `radherrar/?dagur=D.M.YYYY` | `ráðherralisti` | Ministers on a given date |
| `radherrar/radherraseta/?nr=N` | `einstaklingur` | One person's ministerial terms |
| `radherraembaetti/` | `ráðherrar` | Ministerial offices over time |
| `saetaskipan/?timi=ISO` | `sætaskipun` | Chamber seating. Seat numbers only — **no party** |
## Historical depth
Coverage starts at a different parliament per dataset — this is the first thing
to check before any long-run series:
| Dataset | From | Roughly |
|---------|------|---------|
| MPs (`þingmenn`) | þing 1 | 1875 |
| Matters, documents, speeches | þing 20 | 1907 |
| Committees | þing 74 | 1954 |
| Submissions (`erindi`) | þing 111 | 1988 |
## Request examples
```bash
# Which parliament is sitting right now
curl -s "https://www.althingi.is/altext/xml/loggjafarthing/yfirstandandi/"
# Everyone who sat in þing 156
curl -s "https://www.althingi.is/altext/xml/thingmenn/?lthing=156"
# One MP's party and constituency, per parliament
curl -s "https://www.althingi.is/altext/xml/thingmenn/thingmadur/thingseta/?nr=1261"
# A single vote, with every MP's ballot
curl -s "https://www.althingi.is/altext/xml/atkvaedagreidslur/atkvaedagreidsla/?numer=67566"
# Votes on one matter / on one day / in the last 100 days
curl -s "https://www.althingi.is/altext/xml/atkvaedagreidslur/?lthing=150&malnr=1"
curl -s "https://www.althingi.is/altext/xml/atkvaedagreidslur/?dagur=20190916"
curl -s "https://www.althingi.is/altext/xml/atkvaedagreidslur/?dagar=100"
```
## Schema
### Vote event — `atkvaedagreidslur/?lthing=N`
```xml
<atkvæðagreiðsla málsnúmer='104' þingnúmer='156' málsflokkur='A' atkvæðagreiðslunúmer='67566'>
<mál málsnúmer='104' þingnúmer='156' málsflokkur='A'>
<málsheiti>ráðstöfun útvarpsgjalds</málsheiti>
</mál>
<tími>2025-02-18T14:09:52</tími>
<fundur>7</fundur>
<tegund tegund='as'>Of skammt var liðið frá útbýtingu --- Afbrigði</tegund>
<samantekt>
<aðferð>atkvæðagreiðslukerfi</aðferð>
<já><fjöldi>44</fjöldi></já>
<nei><fjöldi>0</fjöldi></nei>
<greiðirekkiatkvæði><fjöldi>0</fjöldi></greiðirekkiatkvæði>
<afgreiðsla>samþykkt</afgreiðsla>
</samantekt>
<nánar><xml>.../atkvaedagreidsla/?numer=67566</xml></nánar>
</atkvæðagreiðsla>
```
| Field | XML | Type | Example |
|-------|-----|------|---------|
| `atkvgr_nr` | `@atkvæðagreiðslunúmer` | INT | `67566` — globally unique, the join key |
| `thing` | `@þingnúmer` | INT | `156` |
| `malsnumer` | `@málsnúmer` | INT | `104` |
| `malsflokkur` | `@málsflokkur` | STR | `A` or `B` |
| `malsheiti` | `mál/málsheiti` | STR | `ráðstöfun útvarpsgjalds` |
| `timi` | `tími` | DATETIME | `2025-02-18T14:09:52` (ISO) |
| `fundur` | `fundur` | INT | `7` — sitting number |
| `tegund` | `tegund` | STR | What was voted on |
| `tegund_kodi` | `tegund/@tegund` | STR | `as`, `v2`, `n2` … |
| `adferd` | `samantekt/aðferð` | STR | See vote-method table |
| `ja` / `nei` / `greidir_ekki` | `samantekt/{já,nei,greiðirekkiatkvæði}/fjöldi` | INT | Null when no ballot was taken |
| `afgreidsla` | `samantekt/afgreiðsla` | STR | `samþykkt` / `fellt` |
### Per-MP ballot — `atkvaedagreidsla/?numer=N`
```xml
<atkvæðaskrá>
<þingmaður id='1004'><nafn>Arna Lára Jónsdóttir</nafn><atkvæði>já</atkvæði></þingmaður>
<þingmaður id='1510'><nafn>Alma D. Möller</nafn><atkvæði>fjarverandi</atkvæði></þingmaður>
</atkvæðaskrá>
```
`<atkvæði>` values, with Alþingi's own gloss from the XML comments:
| Value | n (þing 156) | Meaning |
|-------|---|---------|
| `já` | 12,258 | Yes |
| `nei` | 1,676 | No |
| `greiðir ekki atkvæði` | 1,324 | Abstain — *present in the chamber and pressed the abstain button* |
| `fjarverandi` | 3,160 | Absent, not notified — pressed no button |
| `boðaði fjarvist` | 482 | Absent, notified — illness, or on parliamentary business |
**The abstain string is spaced here and unspaced in the summary block.** The
`<samantekt>`/`<niðurstaða>` count element is `<greiðirekkiatkvæði>` (one
word); the `<atkvæði>` value inside `<atkvæðaskrá>` is `greiðir ekki atkvæði`
(three words). Matching the element spelling against ballot values silently
returns nothing — and because plenty of votes are unanimous, a spot check can
easily miss it.
The distinction between the last two matters: `boðaði fjarvist` is an excused
absence, `fjarverandi` is not. Collapsing them loses the signal.
### Vote methods — `aðferð`
Observed across þing 156 (598 vote events):
| `aðferð` | Count | Carries `<atkvæðaskrá>`? |
|----------|-------|--------------------------|
| `atkvæðagreiðslukerfi` | 299 | **yes** — electronic voting |
| `yfirlýsing forseta/mál gengur` | 297 | no — Speaker's declaration, no ballot |
| `nafnakall` | 1 | **yes** — roll call |
| `handaupprétting` | 1 | no — show of hands, count only |
View on GitHub