Download datasets
Here you can download the full content of the APIs as ready-made JSON files without an API key. The files are refreshed automatically every night and served compressed (gzip), so they decompress themselves in the browser and in ordinary HTTP clients. The counts and file sizes below are approximate and grow slowly over time as new content is published.
Government content (content.json)
Metadata about all published documents from regjeringen.no – propositions, white papers, reports, press releases and news – with title, date, document type, page type, owner/topic and a link to the source. Retrieved from /content/GetDocList with all detail flags enabled.
curl
curl --compressed -o content.json \
https://api.test.data.regjeringen.no/exports/content.json
# Array of documents (with owner/topic/hierarchy): { documentId, title, date, documentUrl, pageType, documentType, ... }JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/content.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("content.json"));
// Array of documents (with owner/topic/hierarchy): { documentId, title, date, documentUrl, pageType, documentType, ... }Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/content.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("content.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array of documents (with owner/topic/hierarchy): { documentId, title, date, documentUrl, pageType, documentType, ... }Ministry information (organisations.json)
Contains the current ministry structure: the ministries and the Office of the Prime Minister (SMK) with names and subordinate units/departments. Retrieved from /organisations/all.
curl
curl --compressed -o organisations.json \
https://api.test.data.regjeringen.no/exports/organisations.json
# Array of ministries: { id, name: [{ id, text }], departments: [ ... ] }JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/organisations.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("organisations.json"));
// Array of ministries: { id, name: [{ id, text }], departments: [ ... ] }Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/organisations.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("organisations.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array of ministries: { id, name: [{ id, text }], departments: [ ... ] }Official Records from the Council of State (councilofstate.json)
All «Official Records from the Council of State» announcements (propositions, reports to the Storting, sanctions and entries into force, regulations, appointments, etc.), each enriched with full detail content. Retrieved from /councilofstate/getlist + /councilofstate/get.
curl
curl --compressed -o councilofstate.json \
https://api.test.data.regjeringen.no/exports/councilofstate.json
# Array (full history): { id, tittel, ingress, datoPublisert, utgiver, detalj }JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/councilofstate.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("councilofstate.json"));
// Array (full history): { id, tittel, ingress, datoPublisert, utgiver, detalj }Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/councilofstate.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("councilofstate.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array (full history): { id, tittel, ingress, datoPublisert, utgiver, detalj }Consultations – overview (consultationresponse-consultations.json)
Overview of all published consultations – title, responsible ministry, date, status and link. One row per consultation. Retrieved from /consultationresponse/GetPublished?type=H.
curl
curl --compressed -o consultationresponse-consultations.json \
https://api.test.data.regjeringen.no/exports/consultationresponse-consultations.json
# Array of consultations: { documentId, title, date, depName, type, status, documentUrl }JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/consultationresponse-consultations.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("consultationresponse-consultations.json"));
// Array of consultations: { documentId, title, date, depName, type, status, documentUrl }Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/consultationresponse-consultations.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("consultationresponse-consultations.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array of consultations: { documentId, title, date, depName, type, status, documentUrl }Submissions – overview (consultationresponse-input.json)
The same layout as consultations, but lists cases where citizens, organisations and businesses have submitted input. Retrieved from /consultationresponse/GetPublished?type=I.
curl
curl --compressed -o consultationresponse-input.json \
https://api.test.data.regjeringen.no/exports/consultationresponse-input.json
# Array of submissions: { documentId, title, date, depName, type, status, documentUrl }JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/consultationresponse-input.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("consultationresponse-input.json"));
// Array of submissions: { documentId, title, date, depName, type, status, documentUrl }Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/consultationresponse-input.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("consultationresponse-input.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array of submissions: { documentId, title, date, depName, type, status, documentUrl }Consultation documents (consultationresponse-documents.json)
The full content for each consultation/submission – for consultations incl. the consultation letter, consultation memo and consultation bodies; for submissions incl. the invitation, attachments and recipients. Retrieved from /consultationresponse/GetDocument?consultationId= per case.
curl
curl --compressed -o consultationresponse-documents.json \
https://api.test.data.regjeringen.no/exports/consultationresponse-documents.json
# Array: { horingId, dokument } – one document per consultation/submission (GetDocument)JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/consultationresponse-documents.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("consultationresponse-documents.json"));
// Array: { horingId, dokument } – one document per consultation/submission (GetDocument)Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/consultationresponse-documents.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("consultationresponse-documents.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array: { horingId, dokument } – one document per consultation/submission (GetDocument)Consultation responses (consultationresponse-responses.json)
All published consultation responses grouped by consultation – around 170,000 response entries in total across approx. 7,300 consultations (without per-response detail/attachments). Retrieved from /consultationresponse/GetPublishedAnswerItems?id= per consultation.
curl
curl --compressed -o consultationresponse-responses.json \
https://api.test.data.regjeringen.no/exports/consultationresponse-responses.json
# Array: { horingId, svar: [ ... ] } – published response entries per consultation (without per-response detail)JavaScript
// Node.js 18+: fetch decodes gzip, and the body is streamed straight to disk.
import { createWriteStream } from "node:fs";
import { Readable } from "node:stream";
import { pipeline } from "node:stream/promises";
const res = await fetch("https://api.test.data.regjeringen.no/exports/consultationresponse-responses.json");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await pipeline(Readable.fromWeb(res.body), createWriteStream("consultationresponse-responses.json"));
// Array: { horingId, svar: [ ... ] } – published response entries per consultation (without per-response detail)Python
import requests
# iter_content decodes gzip; the file is written in chunks.
with requests.get("https://api.test.data.regjeringen.no/exports/consultationresponse-responses.json", stream=True, timeout=300) as res:
res.raise_for_status()
with open("consultationresponse-responses.json", "wb") as f:
for chunk in res.iter_content(chunk_size=1 << 20):
f.write(chunk)
# Array: { horingId, svar: [ ... ] } – published response entries per consultation (without per-response detail)DCAT-AP-NO catalogue
DCAT-AP-NO compatible catalogue of all the datasets, for automatic harvesting to data.norge.no. Retrieved from /dcat.
curl
# DCAT catalogue (JSON-LD)
curl -H "Accept: application/ld+json" \
https://api.test.data.regjeringen.no/dcatJavaScript
const res = await fetch("https://api.test.data.regjeringen.no/dcat", {
headers: { Accept: "application/ld+json" },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const catalog = await res.json();
console.log(catalog);Python
import requests
res = requests.get(
"https://api.test.data.regjeringen.no/dcat",
headers={"Accept": "application/ld+json"},
timeout=30,
)
res.raise_for_status()
catalog = res.json()
print(catalog)The URLs point to the test gateway. On the production portal, api.test.data.regjeringen.no is replaced with api.data.regjeringen.no.