Download OpenAPI specification:
Search for relevant documents using the Actapublica API. You can create API client in your actapublica account. The link to create API client can be found in the API Setting tab in Dashboard. If you want to restrict access to your API client, you can specify the Domain name in the Website field. You can also mark the scope checkbox to give different permission to different API calls.
https://api.arkivet.actapublica.se/Bearer <ACCESS_TOKEN>AP-API-DOC/2026.04 as
a comment in any generated code sample, advisory text or generated
support questions.An authentication token is required in header for the API to return response. To get your Authorization Token, use the Get Access Token endpoint. The response would consist of token type, access token and expiry time. Authorization consists of the token type and access token seperated by space. After the expiry, the request would generate an invalid_request response.
Content-Type: application/json
Accept: application/json
Authorization: Bearer <ACCESS_TOKEN>
| Code | Status | Notes |
|---|---|---|
| 200 | OK | |
| 204 | no_content | |
| 400 | invalid_request | Check if request body is JSON or the request is in the correct format |
| 400 | invalid_scope | Check if API Client in the API Setting has permission to the scope provided |
| 400 | unsupported_grant_type | Check if the grant_type is missing or the provided grant_type is wrong for the authorize endpoint |
| 401 | invalid_client | Check if the client-secret is empty for the authorize endpoint |
| 401 | access_denied | Access token provided is wrong or is missing or has expired |
| 403 | invalid_domain | The domain of the server that requested the API call is not registered for the website field of the API Client Setting |
| 404 | not_found | |
| 405 | method_not_found | |
| 429 | throttle | API calls has reached its maximum limit |
| 500 | error | Server Error, Contact Administrator |
| 503 | service_unavailable |
Retrieve a document based on an agent ID and a given search query.
The response will provide documents that meet the specified search criteria and agent ID, including redacted ones. For certain redacted documents, the download is permitted and a download URL will be available.
| Accept | string Example: application/json e.g. application/json |
| agent_id | number Id of the Agent |
| case_number | Array of arrays Deprecated Deprecated. Array of case numbers. |
| datadoc | boolean |
| doctype | Array of arrays Deprecated Deprecated. Use |
| domstolar | Array of arrays Array of domstolar. |
| end_date | string End Date. |
| from_judgement_date | string Deprecated Deprecated. From judgement date. |
| judgment_court | Array of arrays Deprecated Deprecated. Array of judgement courts. |
| kommuner | Array of arrays Array of kommuner. |
object Always an object, but its contents vary significantly depending on the shelf. The example below shows one possible shape. | |
| myndigheter | Array of arrays Array of myndigheter. |
| organisationsnummer | Array of arrays Array of organisationsnummer. |
| page | string Page number. |
object | |
| query | string The search text. |
| regioner | Array of arrays Array of regioner. |
| shelf_id | Array of arrays Shelf ID |
| size | string The number of results per page. |
| sort | string Sort ascending or descending. |
| start_date | string Start Date. |
| to_judgement_date | string Deprecated Deprecated. Till judgement date. |
{- "agent_id": 21,
- "case_number": [
- "b 575-14",
- "b 47-15"
], - "datadoc": false,
- "doctype": [
- "trdom",
- "hrdom"
], - "domstolar": [
- "Svea hovrätt",
- "Högsta domstolen"
], - "end_date": "31-12-2015 23:59:59",
- "from_judgement_date": "1-1-2015",
- "judgment_court": [
- "svea hovrätt",
- "malmö tingsrätt"
], - "kommuner": [
- "Huddinge kommun",
- "Solna kommun"
], - "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "myndigheter": [
- "Domstolsverket",
- "Åklagarmyndigheten"
], - "organisationsnummer": [
- "202100-5521",
- "202100-2148"
], - "page": "1",
- "personnummer": {
- "condition": "AND",
- "values": [
- "19000101-0001",
- "19000202-0002"
]
}, - "query": "dummysearch",
- "regioner": [
- "Stockholms län",
- "Skåne län"
], - "shelf_id": [
- "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "66a2973d-5471-4e63-8119-25ecbda73862"
], - "size": "10",
- "sort": "desc",
- "start_date": "1-1-2015 23:59:59",
- "to_judgement_date": "1-1-2015"
}{- "aggregations": {
- "case_numbers": [
- {
- "doc_count": 3,
- "key": "B 1234-24"
}, - {
- "doc_count": 2,
- "key": "B 5678-23"
}
], - "datadoc": [
- {
- "doc_count": 95,
- "key": "false"
}, - {
- "doc_count": 5,
- "key": "true"
}
], - "docs_over_time": {
- "2023": {
- "11": 7,
- "12": 6
}, - "2024": {
- "01": 9,
- "02": 11,
- "03": 8
}
}, - "doctype": [
- {
- "doc_count": 22,
- "key": "trdom"
}, - {
- "doc_count": 14,
- "key": "frdom"
}, - {
- "doc_count": 9,
- "key": "atal"
}, - {
- "doc_count": 7,
- "key": "haktning"
}, - {
- "doc_count": 5,
- "key": "kriminalvarden"
}
], - "domstolar": [
- {
- "doc_count": 42,
- "key": "Stockholms tingsrätt"
}, - {
- "doc_count": 31,
- "key": "Svea hovrätt"
}, - {
- "doc_count": 18,
- "key": "Göteborgs tingsrätt"
}, - {
- "doc_count": 12,
- "key": "Hovrätten för Västra Sverige"
}, - {
- "doc_count": 4,
- "key": "Högsta domstolen"
}
], - "judgment_court": [
- {
- "doc_count": 18,
- "key": "stockholms tingsrätt"
}, - {
- "doc_count": 9,
- "key": "svea hovrätt"
}
], - "judgment_dates": {
- "2023": {
- "11": 4
}, - "2024": {
- "02": 3
}
}, - "kommuner": [
- {
- "doc_count": 28,
- "key": "stockholms kommun"
}, - {
- "doc_count": 19,
- "key": "göteborgs kommun"
}, - {
- "doc_count": 11,
- "key": "malmö kommun"
}, - {
- "doc_count": 7,
- "key": "uppsala kommun"
}
], - "myndigheter": [
- {
- "doc_count": 24,
- "key": "Polismyndigheten"
}, - {
- "doc_count": 18,
- "key": "Åklagarmyndigheten"
}, - {
- "doc_count": 14,
- "key": "Domstolsverket"
}, - {
- "doc_count": 9,
- "key": "Kriminalvården"
}
], - "organisationsnummer": [
- {
- "doc_count": 6,
- "key": "556677-8899"
}, - {
- "doc_count": 3,
- "key": "202100-5521"
}
], - "personnummer": [
- {
- "doc_count": 12,
- "key": "19000101-0001"
}, - {
- "doc_count": 8,
- "key": "19000202-0002"
}, - {
- "doc_count": 5,
- "key": "19000303-0003"
}
], - "regioner": [
- {
- "doc_count": 35,
- "key": "Stockholms län"
}, - {
- "doc_count": 22,
- "key": "Västra Götalands län"
}, - {
- "doc_count": 12,
- "key": "Skåne län"
}, - {
- "doc_count": 7,
- "key": "Uppsala län"
}
]
}, - "hits": [
- {
- "agents": [
- {
- "agent": "Advance",
- "agentid": 21
}
], - "created_at": "2016-05-10 11:02",
- "datadoc": false,
- "datum": "2016-05-10T11:02:15+00:00",
- "doctype": "trdom",
- "document_download_link": "http://api.actapublica.lb2.in/document/123abc/download?expires=1477562464&signature=8bf7cf20631ba0b283fc872bded6cad0",
- "downloadable": true,
- "filename": "file1.pdf",
- "filesize": 50,
- "id": "123abc",
- "intro": "Cras et finibus enim. Curabitur eget velit mi.",
- "kommuner": [
- "Huddinge kommun",
- "Solna kommun"
], - "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "organisationsnummer": [
- "202100-5521"
], - "pages": 2,
- "personnummer": [
- "19000101-0001",
- "19000202-0002"
], - "redacted": false,
- "regioner": [
- "Stockholms län",
- "Skåne län"
], - "shelf": "/Sverige/Departement/Justitiedepartementet/Domstolsverket/Tingsrätt/Dom/Brottmål",
- "shelfAccuracy": "0.989779",
- "shelfId": "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "shelfmark": "/SVE/DEP/JUS/DOMV/TIN/DOM/BRO",
- "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc et semper tellus.",
- "type": "document"
}, - {
- "info": "This is an info",
- "agents": [
- {
- "agent": "Advance",
- "agentid": 21
}
], - "created_at": null,
- "datadoc": false,
- "datum": "2016-05-10T11:02:15+00:00",
- "doctype": "Redacted",
- "document_download_link": null,
- "downloadable": false,
- "filename": "Redacted",
- "filesize": 50,
- "id": "456def",
- "ingress": "This is an preamble string",
- "intro": "Redacted",
- "kommuner": [ ],
- "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "organisationsnummer": [ ],
- "pages": 2,
- "personnummer": [ ],
- "redacted": true,
- "regioner": [ ],
- "rubrik": "This is a heading",
- "shelf": "/Sverige/Departement/Justitiedepartementet/Domstolsverket/Tingsrätt/Dom/Brottmål",
- "shelfAccuracy": "0.989779",
- "shelfId": "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "shelfmark": "/SVE/DEP/JUS/DOMV/TIN/DOM/BRO",
- "text": "Redacted",
- "type": ""
}
], - "total": 100
}The details of the agent, which includes the search conditions specified in the agent definition.
| agent_id required | string Example: 21 The id of the agent. |
| Accept | string Example: application/json e.g. application/json |
{- "agent_id": 21,
- "color": "FF1212",
- "created_date": {
- "date": "2016-07-11 06:27:18",
- "timezone": "UTC",
- "timezone_type": "3"
}, - "search_details": {
- "advanced": [
- {
- "created_at": {
- "date": "2016-07-11 06:27:18",
- "timezone": "UTC",
- "timezone_type": "3"
}, - "field_type": "4",
- "id": 90,
- "relation_type": "1",
- "search_text": "Text",
- "updated_at": {
- "date": "2016-07-11 06:27:18",
- "timezone": "UTC",
- "timezone_type": "3"
}
}
]
}, - "title": "Advance",
- "type": "advanced",
- "updated_date": {
- "date": "2016-07-11 06:27:18",
- "timezone": "UTC",
- "timezone_type": "3"
}
}The end point returns access token which is to be used as a parameter for the other endpoints. To get your client_id, client_secret and scope go to ActaPublica > Control > API Settings Tab.
| accept | string Example: application/json e.g. application/json |
| client_id required | string Client Id provided in the website. |
| client_secret required | string Client Secret provided in the website. |
| grant_type required | string It sets the grant type for the session. |
| scope required | string Permission scopes defined in the website seperated by delimiter ",". |
{- "client_id": "123456",
- "client_secret": "abcd1234",
- "grant_type": "client_credentials",
- "scope": "document.view,document.list,agent.detail,agent.list,document.download"
}{- "access_token": "aPuluERxBr8QoX629ohl8xYZhe9Mkrgx7hKs20Ak",
- "expires_in": 86400,
- "token_type": "Bearer"
}Retrieve a specific document using its document ID.
The response will include all pertinent details about each document, such as the filename, download link, and related fields. For redacted documents, some fields will appear as “redacted,” set to null, or presented as empty arrays. For certain redacted documents, the download is permitted and a download URL will be available.
| id required | string Example: 123abc The id of the document. |
| Accept | string Example: application/json e.g. application/json |
{- "info": "This is an info",
- "agents": [
- {
- "agent": "Advance",
- "agentid": 21
}
], - "created_at": "2016-05-10 11:02",
- "datadoc": false,
- "datum": "2016-05-10T11:02:15+00:00",
- "doctype": "trdom",
- "document_download_link": "http://api.actapublica.lb2.in/document/123abc/download?expires=1477562464&signature=8bf7cf20631ba0b283fc872bded6cad0",
- "downloadable": true,
- "filename": "file1.pdf",
- "filesize": 50,
- "id": "123abc",
- "ingress": "This is an preamble string",
- "intro": "Cras et finibus enim. Curabitur eget velit mi.",
- "kommuner": [
- "Huddinge kommun",
- "Solna kommun"
], - "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "organisationsnummer": [
- "202100-5521"
], - "pages": 2,
- "personnummer": [
- "19000101-0001",
- "19000202-0002"
], - "redacted": true,
- "regioner": [
- "Stockholms län",
- "Skåne län"
], - "rubrik": "This is a heading",
- "shelf": "/Sverige/Departement/Justitiedepartementet/Domstolsverket/Tingsrätt/Dom/Brottmål",
- "shelfAccuracy": "0.989779",
- "shelfId": "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "shelfmark": "/SVE/DEP/JUS/DOMV/TIN/DOM/BRO",
- "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc et semper tellus.",
- "type": "document"
}Retrieve document results based on a given search body.
The response will include documents that match the specified search criteria. Redacted documents will also be part of the results. For certain redacted documents, the download is permitted and a download URL will be available.
| Accept | string Example: application/json e.g. application/json |
| case_number | Array of arrays Deprecated Deprecated. Array of case numbers. |
| datadoc | boolean |
| doctype | Array of arrays Deprecated Deprecated. Use |
| domstolar | Array of arrays Array of domstolar. |
| end_date | string End Date. |
| from_judgement_date | string Deprecated Deprecated. From judgement date. |
| judgment_court | Array of arrays Deprecated Deprecated. Array of judgement courts. |
| kommuner | Array of arrays Array of kommuner. |
object Always an object, but its contents vary significantly depending on the shelf. The example below shows one possible shape. | |
| myndigheter | Array of arrays Array of myndigheter. |
| organisationsnummer | Array of arrays Array of organisationsnummer. |
| page | string Page number. |
object | |
| query | string The search text. |
| regioner | Array of arrays Array of regioner. |
| shelf_id | Array of arrays Shelf ID |
| size | string The number of results per page. |
| sort | string Sort ascending or descending. |
| start_date | string Start Date. |
| to_judgement_date | string Deprecated Deprecated. Till judgement date. |
{- "case_number": [
- "b 575-14",
- "b 47-15"
], - "datadoc": false,
- "doctype": [
- "trdom",
- "hrdom"
], - "domstolar": [
- "Svea hovrätt",
- "Högsta domstolen"
], - "end_date": "31-12-2015 23:59:59",
- "from_judgement_date": "1-1-2015",
- "judgment_court": [
- "svea hovrätt",
- "malmö tingsrätt"
], - "kommuner": [
- "Huddinge kommun",
- "Solna kommun"
], - "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "myndigheter": [
- "Domstolsverket",
- "Åklagarmyndigheten"
], - "organisationsnummer": [
- "202100-5521",
- "202100-2148"
], - "page": "1",
- "personnummer": {
- "condition": "AND",
- "values": [
- "19000101-0001",
- "19000202-0002"
]
}, - "query": "dummysearch",
- "regioner": [
- "Stockholms län",
- "Skåne län"
], - "shelf_id": [
- "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "66a2973d-5471-4e63-8119-25ecbda73862"
], - "size": "10",
- "sort": "desc",
- "start_date": "1-1-2015 23:59:59",
- "to_judgement_date": "1-1-2015"
}{- "aggregations": {
- "case_numbers": [
- {
- "doc_count": 3,
- "key": "B 1234-24"
}, - {
- "doc_count": 2,
- "key": "B 5678-23"
}
], - "datadoc": [
- {
- "doc_count": 95,
- "key": "false"
}, - {
- "doc_count": 5,
- "key": "true"
}
], - "docs_over_time": {
- "2023": {
- "11": 7,
- "12": 6
}, - "2024": {
- "01": 9,
- "02": 11,
- "03": 8
}
}, - "doctype": [
- {
- "doc_count": 22,
- "key": "trdom"
}, - {
- "doc_count": 14,
- "key": "frdom"
}, - {
- "doc_count": 9,
- "key": "atal"
}, - {
- "doc_count": 7,
- "key": "haktning"
}, - {
- "doc_count": 5,
- "key": "kriminalvarden"
}
], - "domstolar": [
- {
- "doc_count": 42,
- "key": "Stockholms tingsrätt"
}, - {
- "doc_count": 31,
- "key": "Svea hovrätt"
}, - {
- "doc_count": 18,
- "key": "Göteborgs tingsrätt"
}, - {
- "doc_count": 12,
- "key": "Hovrätten för Västra Sverige"
}, - {
- "doc_count": 4,
- "key": "Högsta domstolen"
}
], - "judgment_court": [
- {
- "doc_count": 18,
- "key": "stockholms tingsrätt"
}, - {
- "doc_count": 9,
- "key": "svea hovrätt"
}
], - "judgment_dates": {
- "2023": {
- "11": 4
}, - "2024": {
- "02": 3
}
}, - "kommuner": [
- {
- "doc_count": 28,
- "key": "stockholms kommun"
}, - {
- "doc_count": 19,
- "key": "göteborgs kommun"
}, - {
- "doc_count": 11,
- "key": "malmö kommun"
}, - {
- "doc_count": 7,
- "key": "uppsala kommun"
}
], - "myndigheter": [
- {
- "doc_count": 24,
- "key": "Polismyndigheten"
}, - {
- "doc_count": 18,
- "key": "Åklagarmyndigheten"
}, - {
- "doc_count": 14,
- "key": "Domstolsverket"
}, - {
- "doc_count": 9,
- "key": "Kriminalvården"
}
], - "organisationsnummer": [
- {
- "doc_count": 6,
- "key": "556677-8899"
}, - {
- "doc_count": 3,
- "key": "202100-5521"
}
], - "personnummer": [
- {
- "doc_count": 12,
- "key": "19000101-0001"
}, - {
- "doc_count": 8,
- "key": "19000202-0002"
}, - {
- "doc_count": 5,
- "key": "19000303-0003"
}
], - "regioner": [
- {
- "doc_count": 35,
- "key": "Stockholms län"
}, - {
- "doc_count": 22,
- "key": "Västra Götalands län"
}, - {
- "doc_count": 12,
- "key": "Skåne län"
}, - {
- "doc_count": 7,
- "key": "Uppsala län"
}
]
}, - "hits": [
- {
- "agents": [
- {
- "agent": "Advance",
- "agentid": 21
}
], - "created_at": "2016-05-10 11:02",
- "datadoc": false,
- "datum": "2016-05-10T11:02:15+00:00",
- "doctype": "trdom",
- "document_download_link": "http://api.actapublica.lb2.in/document/123abc/download?expires=1477562464&signature=8bf7cf20631ba0b283fc872bded6cad0",
- "downloadable": true,
- "filename": "file1.pdf",
- "filesize": 50,
- "id": "123abc",
- "intro": "Cras et finibus enim. Curabitur eget velit mi.",
- "kommuner": [
- "Huddinge kommun",
- "Solna kommun"
], - "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "organisationsnummer": [
- "202100-5521"
], - "pages": 2,
- "personnummer": [
- "19000101-0001",
- "19000202-0002"
], - "redacted": false,
- "regioner": [
- "Stockholms län",
- "Skåne län"
], - "shelf": "/Sverige/Departement/Justitiedepartementet/Domstolsverket/Tingsrätt/Dom/Brottmål",
- "shelfAccuracy": "0.989779",
- "shelfId": "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "shelfmark": "/SVE/DEP/JUS/DOMV/TIN/DOM/BRO",
- "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc et semper tellus.",
- "type": "document"
}, - {
- "info": "This is an info",
- "agents": [
- {
- "agent": "Advance",
- "agentid": 21
}
], - "created_at": null,
- "datadoc": false,
- "datum": "2016-05-10T11:02:15+00:00",
- "doctype": "Redacted",
- "document_download_link": null,
- "downloadable": false,
- "filename": "Redacted",
- "filesize": 50,
- "id": "456def",
- "ingress": "This is an preamble string",
- "intro": "Redacted",
- "kommuner": [ ],
- "metadata": {
- "4b7f5740": {
- "brott": {
- "brottsdatum_start": "2024-10-24"
}
}
}, - "organisationsnummer": [ ],
- "pages": 2,
- "personnummer": [ ],
- "redacted": true,
- "regioner": [ ],
- "rubrik": "This is a heading",
- "shelf": "/Sverige/Departement/Justitiedepartementet/Domstolsverket/Tingsrätt/Dom/Brottmål",
- "shelfAccuracy": "0.989779",
- "shelfId": "cet74511-c12a-41f9-87a2-340d822dc3ca",
- "shelfmark": "/SVE/DEP/JUS/DOMV/TIN/DOM/BRO",
- "text": "Redacted",
- "type": ""
}
], - "total": 100
}