{
  "openapi": "3.0.1",
  "info": {
    "title": "Danish Parliament Cases & Documents (Folketinget)",
    "description": "Cases and documents from Folketingets Åbne Data with type and status resolved to names, date and keyword filters, and an only-changed mode for daily polling.",
    "version": "0.1",
    "x-build-id": "4cfC4CdHpIF7lNQxt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arcuate_owl~ft-case-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arcuate_owl-ft-case-watch",
        "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/arcuate_owl~ft-case-watch/runs": {
      "post": {
        "operationId": "runs-sync-arcuate_owl-ft-case-watch",
        "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/arcuate_owl~ft-case-watch/run-sync": {
      "post": {
        "operationId": "run-sync-arcuate_owl-ft-case-watch",
        "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": {
          "lookbackDays": {
            "title": "Changed in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "How far back to look for cases that changed. Ignored when you set an explicit 'Changed since' date.",
            "default": 7
          },
          "updatedSince": {
            "title": "Changed since",
            "type": "string",
            "description": "Only cases whose last update is after this date (YYYY-MM-DD). Overrides the look-back setting."
          },
          "updatedUntil": {
            "title": "Changed before",
            "type": "string",
            "description": "Only cases whose last update is before this date (YYYY-MM-DD)."
          },
          "caseTypeIds": {
            "title": "Case types",
            "type": "array",
            "description": "Folketinget case type ids. 1 UMF-del, 2 Forespørgsel, 3 Lovforslag, 4 Alm. del, 5 Beslutningsforslag, 6 Rådsmøde, 7 Kommissionsforslag, 8 Aktstykke, 9 Forslag til vedtagelse, 10 § 20-spørgsmål, 11 Redegørelse, 12 Indkaldelse af stedfortræder, 13 Statsrevisorerne. Leave empty for all types."
          },
          "statusIds": {
            "title": "Status ids",
            "type": "array",
            "description": "Folketinget status ids, for example 1 Afsluttet, 2 Afgivet, 3 Forkastet. The full list is at https://oda.ft.dk/api/Sagsstatus?$format=json. Leave empty for all statuses."
          },
          "periodIds": {
            "title": "Parliamentary period ids",
            "type": "array",
            "description": "Restrict to one or more sessions. The list is at https://oda.ft.dk/api/Periode?$format=json. Leave empty for all periods."
          },
          "titleContains": {
            "title": "Title contains",
            "type": "string",
            "description": "Only cases whose Danish title contains this text. Case-sensitive, as the upstream service matches it."
          },
          "includeDocuments": {
            "title": "Include attached documents",
            "type": "boolean",
            "description": "Attach each case's documents, including question text where there is one. This is billed per document on top of the per-case charge, and it makes runs slower.",
            "default": false
          },
          "maxDocumentsPerCase": {
            "title": "Maximum documents per case",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Caps how many documents are attached to each case, which also caps what the documents can cost you.",
            "default": 20
          },
          "onlyNew": {
            "title": "Only cases that changed since my last run",
            "type": "boolean",
            "description": "Remembers each case together with its update timestamp, so a case you have already seen is delivered again only when it actually changes. Turn this on for a daily schedule.",
            "default": false
          },
          "stateStoreName": {
            "title": "Name of the store holding seen cases",
            "type": "string",
            "description": "Only used with the only-changed mode. Change it to keep separate watchlists apart. It is a named key-value store on your own account, because the run's default store is wiped between runs.",
            "default": "ft-case-watch-state"
          },
          "maxCases": {
            "title": "Maximum cases per run",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on delivered cases, which is also a hard cap on what the run can cost you. There is no upstream ceiling: the service pages with $skip without limit, so a full backfill of the whole archive is possible if you ask for it.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}