# Archivum > Archivum is a semantic search engine over the documents of the Danish > Parliament (Folketinget): roughly 690,000 files, OCR-scanned and read page by > page. It exposes a public JSON HTTP API and an MCP server for programmatic > search. AI agents and scripts should call the API or MCP directly instead of > driving the web UI. ## For AI agents and programmatic clients The website https://archivum.arostech.dk is a human search interface. Do NOT automate or scrape it. For any programmatic search, use MCP or the JSON API. - API base URL: https://api.archivum.arostech.dk - OpenAPI specification: https://api.archivum.arostech.dk/api/openapi.json - Human-readable guide: https://archivum.arostech.dk/api-adgang - Search, statistics, cases and metadata are open to any client today. - The documents' text (passages, whole pages, exports) needs an account. A program uses one with an API key, made on the account page and sent as `Authorization: Bearer `. A key can only read, under its account's limits. - All requests and responses are JSON (UTF-8). - The corpus is in Danish; semantic queries work in Danish or English. Each result is one file. A document can have several files (a letter and its enclosures, an answer and its appendix), and each is its own result with the document's title. ## MCP (recommended for agents) Archivum speaks the Model Context Protocol at POST https://api.archivum.arostech.dk/api/mcp JSON-RPC 2.0 in, JSON out, no SSE and no sessions. Protocol revision 2025-11-25 (2025-06-18 and 2025-03-26 also accepted). Every tool only reads. Tools: search, search_page, search_stats, topic_years, get_case_overview, get_document_actors, list_document_types, list_policy_areas, list_presets, list_sag_types, list_sagstrin_types, list_sag_statuses and corpus_stats. With an API key also get_page_snippet (a passage) and, for an approved account, get_page_text (a whole page). Each tool's description states what it costs and how long it takes; `initialize` returns instructions for the corpus as a whole. To add it: - ChatGPT: turn on developer mode in the settings under Apps, then create a new app with the URL above and no authentication. - Claude: add a custom connector with the URL above. - Claude Code: claude mcp add --transport http archivum https://api.archivum.arostech.dk/api/mcp - Claude Code with a key: claude mcp add --transport http archivum https://api.archivum.arostech.dk/api/mcp --header "Authorization: Bearer " (the ChatGPT and Claude connectors cannot send a key yet) ## Primary endpoint: search POST https://api.archivum.arostech.dk/api/search Content-Type: application/json Request body: ```json { "query": "boligpolitik i storbyerne", "mode": "semantic", "limit": 1000, "documentTypes": ["Lovforslag"], "dateFrom": "2015-01-01T00:00:00Z", "dateTo": "2020-12-31T00:00:00Z", "capCodes": ["1401"] } ``` Field notes: - `query` (string): the search text. Required for `semantic` and `exact`. - `mode`: `"semantic"` (meaning, recommended), `"exact"` (a literal string) or `"browse"` (filters only, empty query). - `limit`: semantic only, how many top-ranked files to rank. Default 1000, max 20000. A semantic search takes a few seconds: about 2-6 s at 1000, up to about 10 s at 20000. An exact search for a common word can take tens of seconds. - `threshold` (0..1): semantic only, an optional similarity cutoff. - `documentTypes`: values from GET /api/document-types. - `capCodes`: policy-area codes from GET /api/cap-codes. - `dateFrom` / `dateTo`: ISO 8601. - `caseSensitive`: exact mode only. - More filters (actors, case types, case steps, outcomes, presets) are in the OpenAPI specification and the MCP `search` tool's schema. Response body, abridged: ```json { "queryHash": "opaque-token-for-pagination", "totalCount": 1000, "totalApproximate": true, "results": [ { "filId": 3020745, "title": "BOU alm. del - svar på spm. 64", "date": "2024-05-01T00:00:00", "documentType": "Svar", "sourceUrl": "https://www.ft.dk/samling/20241/almdel/bou/spm/64/svar/2138785/3020745.pdf", "score": 0.71, "bestPage": 3, "case": { "sagId": 123456, "nummer": null, "titelKort": "BOU alm. del", "sagsType": "Alm. del", "caseCount": 1 }, "kind": "committeeAnswers", "pageCount": 4, "emneord": [], "capCodes": [] } ] } ``` - `totalApproximate: true` means `totalCount` is a top-K estimate, not exact. - `sourceUrl` is the file at Folketinget; cite it. - `score` is the similarity in semantic mode; exact mode adds `hitCount`. ## Pagination The first response holds the first page (about 400 results). Fetch more with the `queryHash`: POST https://api.archivum.arostech.dk/api/search/page ```json { "queryHash": "", "offset": 400 } ``` ## Limits and bulk access Archivum is for research, not bulk extraction. - Rate limits are per client; a 429 carries `Retry-After` in seconds. Wait, then retry. - Exports need an account. An account that is not yet approved gets each file's best passage, up to 1,000 rows in all; an approved account gets the full text of up to 30,000 files a month. Every export is a zip: the CSV or JSON, one row or object per file, beside a note on what each column holds. - Page passages are served only for files in the search's own results. - Larger extracts, or the whole corpus, are by arrangement: email anders@arostech.dk. Do not work around the limits. ## Citing Archivum If you use data from Archivum, cite Archivum and Anders Kozuch as the source, for example: Kozuch, Anders (2026). Archivum. Aros Tech. https://archivum.arostech.dk. Retrieved (the date you fetched the data). Cite Folketinget as the original source of the documents as well. The terms: https://archivum.arostech.dk/vilkaar#kildeangivelse