{
  "openapi": "3.0.1",
  "info": {
    "title": "Swiss Parliament Affairs Tracker (Curia Vista)",
    "description": "Track Swiss federal parliament affairs from the official Curia Vista database: motions, postulates, interpellations, parliamentary initiatives and bills with status, author, party, department, Federal Council response and full texts. Monitoring of changes. DE/FR/IT.",
    "version": "1.0",
    "x-build-id": "QxqVU9m4po06ilmEz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dach-open-data~swiss-parliament-affairs/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dach-open-data-swiss-parliament-affairs",
        "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/dach-open-data~swiss-parliament-affairs/runs": {
      "post": {
        "operationId": "runs-sync-dach-open-data-swiss-parliament-affairs",
        "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/dach-open-data~swiss-parliament-affairs/run-sync": {
      "post": {
        "operationId": "run-sync-dach-open-data-swiss-parliament-affairs",
        "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": {
          "query": {
            "title": "Words in the title",
            "type": "string",
            "description": "All words must appear in the title of the affair, e.g. \"Energie\", \"Netzanschluss\", \"KI\" (titles are in the selected language; case-insensitive).",
            "default": ""
          },
          "types": {
            "title": "Types of affair",
            "type": "array",
            "description": "E.g. \"Mo.\" (motion), \"Po.\" (postulate), \"Ip.\" (interpellation), \"Pa. Iv.\" (parliamentary initiative), \"Kt. Iv.\" (cantonal initiative), \"BRG\" (Federal Council bill), \"Fra.\" (question time). Names like \"Motion\" also work. Empty = all types except petitions.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Policy areas assigned by the Parliamentary Services, e.g. \"Energie\", \"Gesundheit\", \"Landwirtschaft\", \"Verkehr\", \"Wirtschaft\" (in the selected language; part of the word is enough).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "departments": {
            "title": "Responsible department",
            "type": "array",
            "description": "Federal department in charge: EDA, EDI, EJPD, VBS, EFD, WBF, UVEK, BK (Federal Chancellery) or Parl.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "councils": {
            "title": "Submitted in council",
            "type": "array",
            "description": "NR (National Council) or SR (Council of States).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "submittedAfter": {
            "title": "Submitted on or after",
            "type": "string",
            "description": "Only affairs submitted on or after this date (YYYY-MM-DD).",
            "default": ""
          },
          "submittedBefore": {
            "title": "Submitted on or before",
            "type": "string",
            "description": "Only affairs submitted on or before this date (YYYY-MM-DD).",
            "default": ""
          },
          "modifiedSince": {
            "title": "Changed since",
            "type": "string",
            "description": "Only affairs changed since this date or time (e.g. 2026-09-01 or 2026-09-01T06:00:00Z). Use it in a scheduled run to monitor new statements, status changes and decisions.",
            "default": ""
          },
          "author": {
            "title": "Author contains",
            "type": "string",
            "description": "Part of the author's name as written in Curia Vista (\"Lastname Firstname\"), e.g. \"Grossen\".",
            "default": ""
          },
          "onlyOpen": {
            "title": "Only open affairs",
            "type": "boolean",
            "description": "Skip affairs that are completed, written off or withdrawn.",
            "default": false
          },
          "includeTexts": {
            "title": "Include full texts",
            "type": "boolean",
            "description": "Submitted text, reasoning, the Federal Council's response and the bill's initial situation as plain text. Switch off for a compact table.",
            "default": true
          },
          "includeUntitled": {
            "title": "Include affairs without title yet",
            "type": "boolean",
            "description": "Brand-new affairs are listed for a few days with the placeholder \"Titel folgt\" and no text. They are skipped by default and appear in later runs (use \"Changed since\") once the title is published.",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "DE",
              "FR",
              "IT",
              "EN"
            ],
            "type": "string",
            "description": "Language of titles, statuses and texts. Affairs are published in German, French and Italian.",
            "default": "DE"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on affairs returned and charged in this run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}