{
  "openapi": "3.0.1",
  "info": {
    "title": "European Parliament Votes API – MEP Roll-Call Voting Records",
    "description": "Every roll-call vote of the European Parliament as clean JSON from the official EP Open Data API: results, political group breakdown and how each MEP voted. Filter by topic, MEP, group, country and date; only-new mode for alerts.",
    "version": "1.0",
    "x-build-id": "5f1QuOJv69zyTx8SN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benelux-signals~european-parliament-votes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benelux-signals-european-parliament-votes",
        "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/benelux-signals~european-parliament-votes/runs": {
      "post": {
        "operationId": "runs-sync-benelux-signals-european-parliament-votes",
        "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/benelux-signals~european-parliament-votes/run-sync": {
      "post": {
        "operationId": "run-sync-benelux-signals-european-parliament-votes",
        "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": {
          "keywords": {
            "title": "Topic keywords",
            "type": "array",
            "description": "Only votes whose agenda item, report, amendment label or document reference mention one of these words (case- and accent-insensitive, whole words; end with * for a prefix, e.g. \"climat*\"). Always searched in English plus your output language. Leave empty for all votes.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Whether a vote must mention any or all of the keywords.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip votes that mention any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lastDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Look back this many days when no start date is set. Parliament holds plenary sessions about 12 times a year (4 days each), so 30–45 days usually covers 1–2 sessions.",
            "default": 30
          },
          "dateFrom": {
            "title": "From date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$|^\\d{1,4}\\s*(day|days|week|weeks|month|months)$",
            "type": "string",
            "description": "Start date (YYYY-MM-DD) or a relative period like \"90 days\". Overrides 'Last N days'. Data starts in July 2019 (9th term). Group/country breakdowns are most accurate for the current 10th term (since 16 July 2024)."
          },
          "dateTo": {
            "title": "To date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$|^\\d{1,4}\\s*(day|days|week|weeks|month|months)$",
            "type": "string",
            "description": "End date (YYYY-MM-DD) or relative period. Default: today."
          },
          "voteKinds": {
            "title": "Vote kinds",
            "type": "array",
            "description": "Which kinds of votes to include. Choose only 'main' to get one decisive vote per file. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "main",
                "amendment",
                "other"
              ],
              "enumTitles": [
                "Main / final votes (text as a whole, Commission proposal, provisional agreement, resolution)",
                "Amendments",
                "Other split / paragraph votes"
              ]
            },
            "default": []
          },
          "outcome": {
            "title": "Outcome",
            "enum": [
              "any",
              "adopted",
              "rejected"
            ],
            "type": "string",
            "description": "Filter by result.",
            "default": "any"
          },
          "meps": {
            "title": "MEPs to track",
            "type": "array",
            "description": "Optional MEP names (e.g. \"Roberta Metsola\") or numeric MEP ids from europarl.europa.eu/meps. In 'Votes' mode each vote gets a mepPositions list with how these MEPs voted; in 'MEP votes' mode you get one row per MEP per vote.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "votes",
              "mepVotes"
            ],
            "type": "string",
            "description": "'Votes' is best for monitoring and analysis; 'MEP votes' gives individual voting records (cheaper per row). Combine 'MEP votes' with MEPs, groups or countries to keep it small (~650 rows per vote otherwise).",
            "default": "votes"
          },
          "groups": {
            "title": "Political groups (MEP votes mode)",
            "type": "array",
            "description": "Only MEP rows for these political groups, e.g. PPE, S&D, Renew, Verts/ALE, ECR, PfE, The Left, ESN, NI.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries (MEP votes mode)",
            "type": "array",
            "description": "Only MEP rows for these countries (ISO-2 codes, e.g. NL, BE, DE, FR).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeGroupBreakdown": {
            "title": "Political group breakdown",
            "type": "boolean",
            "description": "Add for/against/abstain counts per political group to each vote.",
            "default": true
          },
          "includeCountryBreakdown": {
            "title": "Country breakdown",
            "type": "boolean",
            "description": "Add for/against/abstain counts per member state to each vote.",
            "default": false
          },
          "includeVoterLists": {
            "title": "Full voter name lists",
            "type": "boolean",
            "description": "Add the names of all MEPs who voted for, against and abstained to each vote (large rows).",
            "default": false
          },
          "includeHandVotes": {
            "title": "Include show-of-hands votes",
            "type": "boolean",
            "description": "Also include votes by show of hands / electronic votes without roll call. These only have an outcome (adopted/rejected), no counts or names.",
            "default": false
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr",
              "de",
              "nl",
              "it",
              "es",
              "pt",
              "pl",
              "ro",
              "el",
              "cs",
              "hu",
              "sv",
              "bg",
              "da",
              "fi",
              "sk",
              "hr",
              "lt",
              "sl",
              "lv",
              "et",
              "ga",
              "mt"
            ],
            "type": "string",
            "description": "Language for titles and labels (falls back to English).",
            "default": "en"
          },
          "onlyNew": {
            "title": "Only new votes",
            "type": "boolean",
            "description": "Skip votes (or MEP vote rows) delivered in earlier runs with the same state key. Use with a schedule for alerts; skipped rows are free.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name for the only-new memory, so different schedules don't share it.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum rows to save (newest first).",
            "default": 200
          },
          "maxRunSeconds": {
            "title": "Time budget (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop scanning older sittings after this many seconds (the API asks for 2 s between requests; one sitting day takes ~4–8 s). 0 = no limit.",
            "default": 220
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}