# European Parliament Scraper (`crawlerbros/european-parliament-scraper`) Actor

Scrape European Parliament open data - list current MEPs by country and political group, fetch detailed MEP profiles, and browse plenary sitting days. Powered by the official data.europarl.europa.eu API. No login or API key.

- **URL**: https://apify.com/crawlerbros/european-parliament-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## European Parliament Scraper

Scrape the **European Parliament** open data service at `data.europarl.europa.eu`. List every current **Member of the European Parliament (MEP)** filtered by country and political group, pull detailed **MEP profiles** (email, birth date, photo, social accounts, committee memberships), and browse **plenary sitting days** by year. HTTP-only via the official open data API. No login, no API key, no proxy.

### What this actor does

- **Three modes:** `meps` (list & filter current MEPs), `mepDetails` (full profile by ID), `meetings` (plenary sitting days by year)
- **Filters:** country of representation (27 EU member states) and political group (all 9 groups of the current 10th term)
- **Rich profiles:** email, gender, citizenship, birth place & date, official portrait, homepage, social media accounts, and current committee / delegation / group memberships
- **Portrait images:** official MEP photo URL on every MEP record
- **Empty fields are omitted** — you never get `null`s

### Output: MEP (mode = `meps`)

- `mepId` — European Parliament person ID (e.g. `197494`)
- `name`, `familyName`, `givenName`
- `country` — ISO country of representation (e.g. `FR`)
- `politicalGroup` — group code (e.g. `Renew`)
- `photoUrl` — official portrait image (JPEG)
- `recordType: "mep"`, `sourceUrl`, `scrapedAt`

### Output: MEP profile (mode = `mepDetails`)

- `mepId`, `name`, `familyName`, `givenName`
- `email`, `gender`, `honorificPrefix`
- `citizenship` — ISO-3 code (e.g. `LUX`)
- `placeOfBirth`, `dateOfBirth`
- `photoUrl` — official portrait image (JPEG)
- `homepage` — the MEP's personal website
- `socialAccounts[]` — `{ platform, url }` for Twitter, Facebook, Instagram, YouTube, LinkedIn, Telegram, …
- `currentMemberships[]` — `{ classification, role, organizationId, startDate }` for current committees, delegations and groups
- `recordType: "mep"`, `sourceUrl`, `scrapedAt`

### Output: plenary meeting (mode = `meetings`)

- `meetingId` — activity ID (e.g. `MTG-PL-2024-01-15`)
- `date` — sitting day (calendar date)
- `startDateTime`, `endDate` — start and end timestamps of the sitting
- `label` — English label (e.g. `Monday, 15 January 2024`)
- `location` — `Strasbourg` or `Brussels`
- `term` — parliamentary term (e.g. `ep-10`)
- `attendeeCount` — number of MEPs recorded as present
- `excusedCount` — number of MEPs recorded as excused
- `agendaItemCount` — number of agenda items / votes on the sitting day
- `activityType` — activity classification
- `documents[]` — official document URLs (agenda, minutes, verbatim report, roll-call votes)
- `recordType: "meeting"`, `sourceUrl`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `meps` | `meps` / `mepDetails` / `meetings` |
| `country` | select | – | EU member state (ISO code) to restrict the MEP list (mode=meps) |
| `politicalGroup` | select | – | Political group of the current term (mode=meps) |
| `mepIds` | array | – | MEP IDs or `europarl.europa.eu` profile URLs (mode=mepDetails) |
| `year` | int | `2024` | Calendar year of plenary sitting days (mode=meetings) |
| `maxItems` | int | `50` | Hard cap on records (1–1000) |

#### Example: all French MEPs in Renew Europe

```json
{ "mode": "meps", "country": "FR", "politicalGroup": "Renew", "maxItems": 50 }
````

#### Example: full profiles for two MEPs

```json
{ "mode": "mepDetails", "mepIds": ["1294", "840"] }
```

#### Example: every current MEP (no filter)

```json
{ "mode": "meps", "maxItems": 1000 }
```

#### Example: plenary sitting days in 2024

```json
{ "mode": "meetings", "year": 2024, "maxItems": 100 }
```

### Use cases

- **Civic-tech & transparency** — mirror the full roster of sitting MEPs with contact details and portraits
- **Political research** — analyse Parliament composition by country and group over the current term
- **Journalism** — build MEP contact sheets with email, homepage and social accounts
- **Advocacy & public affairs** — identify committee and delegation memberships for outreach
- **Attendance analysis** — track plenary sitting days and recorded attendance by year

### Political groups (10th term)

`PPE` (EPP), `S&D`, `Renew`, `Verts/ALE` (Greens/EFA), `ECR`, `PfE` (Patriots for Europe), `ESN` (Europe of Sovereign Nations), `The Left` (GUE/NGL), `NI` (Non-attached).

### FAQ

**Do I need an account or API key?**
No. All data comes from the free, public European Parliament open data API.

**Where does the data come from?**
The official `data.europarl.europa.eu` open data service published by the European Parliament (JSON-LD).

**How do I find an MEP's ID?**
Open the MEP on `europarl.europa.eu/meps` — the number in the URL is the ID — or run `meps` first and reuse the `mepId`. You can also paste the full profile URL into `mepIds`.

**Which MEPs are covered?**
The `meps` mode lists all current, sitting MEPs. Use `mepDetails` to fetch any MEP (current or former) by ID.

**Why is the political group filter applied on the results rather than the query?**
Group filtering is applied to the full current-MEP list to guarantee correct, complete results — the group codes match exactly what the Parliament publishes.

**Are email and social accounts always present?**
No. They are included only when the MEP publishes them. Empty fields are omitted from the record.

**How far back do meetings go?**
Plenary sitting days are available for recent parliamentary years; older years may return no results.

### Data source

This actor uses the European Parliament's official open data API, which is free and publicly accessible without authentication.

# Actor input Schema

## `mode` (type: `string`):

What to fetch.

## `country` (type: `string`):

Restrict the MEP list to a single EU member state.

## `politicalGroup` (type: `string`):

Restrict the MEP list to a single political group of the current (10th) term.

## `mepIds` (type: `array`):

European Parliament MEP IDs to fetch full profiles for (e.g. `1294`). Accepts numeric IDs or europarl.europa.eu MEP profile URLs.

## `year` (type: `integer`):

Calendar year of plenary sitting days to fetch.

## `maxItems` (type: `integer`):

Hard cap on the number of records emitted.

## Actor input object example

```json
{
  "mode": "meps",
  "country": "",
  "politicalGroup": "",
  "mepIds": [
    "1294",
    "840"
  ],
  "year": 2024,
  "maxItems": 20
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing all scraped European Parliament records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "meps",
    "mepIds": [
        "1294",
        "840"
    ],
    "year": 2024,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/european-parliament-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "meps",
    "mepIds": [
        "1294",
        "840",
    ],
    "year": 2024,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/european-parliament-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "meps",
  "mepIds": [
    "1294",
    "840"
  ],
  "year": 2024,
  "maxItems": 20
}' |
apify call crawlerbros/european-parliament-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/european-parliament-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "European Parliament Scraper",
        "description": "Scrape European Parliament open data - list current MEPs by country and political group, fetch detailed MEP profiles, and browse plenary sitting days. Powered by the official data.europarl.europa.eu API. No login or API key.",
        "version": "1.0",
        "x-build-id": "xhIN5IFkNIYCjmdCP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~european-parliament-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-european-parliament-scraper",
                "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/crawlerbros~european-parliament-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-european-parliament-scraper",
                "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/crawlerbros~european-parliament-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-european-parliament-scraper",
                "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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "meps",
                            "mepDetails",
                            "meetings"
                        ],
                        "type": "string",
                        "description": "What to fetch.",
                        "default": "meps"
                    },
                    "country": {
                        "title": "Country of representation (meps)",
                        "enum": [
                            "",
                            "AT",
                            "BE",
                            "BG",
                            "HR",
                            "CY",
                            "CZ",
                            "DK",
                            "EE",
                            "FI",
                            "FR",
                            "DE",
                            "GR",
                            "HU",
                            "IE",
                            "IT",
                            "LV",
                            "LT",
                            "LU",
                            "MT",
                            "NL",
                            "PL",
                            "PT",
                            "RO",
                            "SK",
                            "SI",
                            "ES",
                            "SE"
                        ],
                        "type": "string",
                        "description": "Restrict the MEP list to a single EU member state.",
                        "default": ""
                    },
                    "politicalGroup": {
                        "title": "Political group (meps)",
                        "enum": [
                            "",
                            "PPE",
                            "S&D",
                            "Renew",
                            "Verts/ALE",
                            "ECR",
                            "PfE",
                            "ESN",
                            "The Left",
                            "NI"
                        ],
                        "type": "string",
                        "description": "Restrict the MEP list to a single political group of the current (10th) term.",
                        "default": ""
                    },
                    "mepIds": {
                        "title": "MEP IDs (mepDetails)",
                        "type": "array",
                        "description": "European Parliament MEP IDs to fetch full profiles for (e.g. `1294`). Accepts numeric IDs or europarl.europa.eu MEP profile URLs.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "year": {
                        "title": "Year (meetings)",
                        "minimum": 1979,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "Calendar year of plenary sitting days to fetch.",
                        "default": 2024
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Hard cap on the number of records emitted.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
