{
  "openapi": "3.0.1",
  "info": {
    "title": "Swedish Case Law Search (Rättspraxis, Domstolsverket)",
    "description": "Search Swedish case law (HD, HFD, courts of appeal, Labour Court…) via the official rättspraxis API: summaries, statutes by SFS number, preparatory works.",
    "version": "0.1",
    "x-build-id": "26t48aNVfyYrUdmz5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/legaltech~domstol-se/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-legaltech-domstol-se",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/legaltech~domstol-se/runs": {
      "post": {
        "operationId": "runs-sync-legaltech-domstol-se",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/legaltech~domstol-se/run-sync": {
      "post": {
        "operationId": "run-sync-legaltech-domstol-se",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One search per item, in Swedish. Syntax: words (implicit AND; also OCH), \"exact phrase\", OR / ELLER, NOT / INTE, parentheses and * wildcard.",
            "items": {
              "type": "string"
            }
          },
          "caseNumbers": {
            "title": "Case or report numbers",
            "type": "array",
            "description": "Retrieve decisions by case number (\"T 557-24\") or report number (\"NJA 2020 s. 123\", \"RH 2026:19\").",
            "items": {
              "type": "string"
            }
          },
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "Supreme Court, Supreme Administrative Court, courts of appeal, administrative courts of appeal, Labour Court, Migration Court of Appeal… Empty = all. Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.",
            "items": {
              "type": "string",
              "enum": [
                "PBR",
                "MOD",
                "HYOD",
                "HVS",
                "HON",
                "HFD",
                "HNN",
                "HSV",
                "KGG",
                "DOV",
                "ADO",
                "KSU",
                "KST",
                "MMOD",
                "HGO",
                "KJO",
                "HDO",
                "MIOD",
                "HSB",
                "PMOD",
                "REGR",
                "MDO",
                "RHN"
              ],
              "enumTitles": [
                "Patentbesvärsrätten",
                "Miljööverdomstolen",
                "Svea hovrätts hyresrättsliga avgöranden",
                "Hovrätten för Västra Sverige",
                "Hovrätten för Övre Norrland",
                "Högsta förvaltningsdomstolen",
                "Hovrätten för Nedre Norrland",
                "Svea hovrätt",
                "Kammarrätten i Göteborg",
                "Domstolsverket",
                "Arbetsdomstolen",
                "Kammarrätten i Sundsvall",
                "Kammarrätten i Stockholm",
                "Mark- och miljööverdomstolen",
                "Göta hovrätt",
                "Kammarrätten i Jönköping",
                "Högsta domstolen",
                "Migrationsöverdomstolen",
                "Hovrätten över Skåne och Blekinge",
                "Patent- och marknadsöverdomstolen",
                "Regeringsrätten",
                "Marknadsdomstolen",
                "Rättshjälpsnämnden"
              ]
            }
          },
          "decisionTypes": {
            "title": "Precedent value",
            "type": "array",
            "description": "Binding precedent, guiding, etc. Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.",
            "items": {
              "type": "string",
              "enum": [
                "PREJUDIKAT",
                "VAGLEDANDE_MEN_EJ_PREJUDICERANDE",
                "EJ_VAGLEDANDE",
                "PROVNINGSTILLSTAND",
                "FORHANDSAVGORANDE"
              ],
              "enumTitles": [
                "Prejudikat (binding precedent)",
                "Guiding, not a precedent",
                "Not guiding",
                "Leave to appeal",
                "Preliminary ruling"
              ]
            }
          },
          "publicationForms": {
            "title": "Publication form",
            "type": "array",
            "description": "Report (referat, with summary), notice (notis) or judgment. Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.",
            "items": {
              "type": "string",
              "enum": [
                "REFERAT",
                "NOTIS",
                "DOM_ELLER_BESLUT"
              ],
              "enumTitles": [
                "Referat",
                "Notis",
                "Dom eller beslut"
              ]
            }
          },
          "sfsNumbers": {
            "title": "Applied statutes (SFS number)",
            "type": "array",
            "description": "Only decisions applying these statutes, e.g. \"1970:994\" (Land Code).",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Decision date, start of range (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Decision date, end of range (YYYY-MM-DD)."
          },
          "sortOrder": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Relevance (default): the official API only sorts by date and matches inflected forms anywhere in long judgments, so the actor fetches up to 500 matches and ranks them, putting first the decisions whose summary and keywords contain the terms and where the terms appear together. Without search terms it falls back to newest first. Newest / Oldest: decision date.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum per search term.",
            "default": 20
          },
          "passages": {
            "title": "Relevant passages",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Number of paragraphs containing the search terms returned in `passages` (0 = none). Ideal for LLM analysis.",
            "default": 3
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Adds the `text` field with the full decision. Greatly increases output size; enable only if needed.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The source usually works without a proxy. If it blocks, use Apify RESIDENTIAL (SE) or your own proxyUrls; requests then use sticky sessions, IP rotation and a Chrome TLS fingerprint.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}