# Class EuropeanParliamentClient

European Parliament API Client.

Provides type-safe, high-performance access to the European Parliament Open Data Portal with comprehensive caching, rate limiting, and GDPR-compliant audit logging.

Architecture Note: This class is a thin facade; all logic lives in the bounded-context sub-clients under `src/clients/ep/`. The facade owns the shared LRU cache and rate-limiter and passes them to every sub-client so they all operate within the same resource budget.

Performance Targets:

- P50 latency: <100ms (cached responses)
- P95 latency: <200ms (cached responses)
- P99 latency: <2000ms (uncached API calls)

Features:

- LRU caching with 15-minute TTL (500 entry max)
- Token bucket rate limiting (100 requests/minute)
- GDPR Article 30 compliant audit logging
- Automatic JSON-LD to internal format transformation
- Type-safe API with branded types

ISMS Policy Compliance:

- SC-002: Secure coding with input validation and error handling
- PE-001: Performance monitoring and optimization (<200ms P95)
- AU-002: Comprehensive audit logging for GDPR compliance
- DP-001: Data protection and privacy by design

#### Example

    const client = new EuropeanParliamentClient();
    const meps = await client.getMEPs({ country: 'SE', limit: 20 });
    console.log(`Found ${meps.total} Swedish MEPs`);

#### Security

- All personal data access is audit logged per GDPR Article 30
- Rate limiting prevents API abuse and DoS attacks
- No credentials stored (EP API is public)
- Cache entries sanitized to prevent injection attacks
- TLS 1.3 enforced for all API communications

#### See

- https://data.europarl.europa.eu/api/v2/ - EP Open Data Portal API
- https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md
- https://gdpr-info.eu/art-30-gdpr/ - GDPR Article 30

- Defined in clients/europeanParliamentClient.ts:144

##### Index

### Constructors

constructor

### Properties

committeeClient
documentClient
legislativeClient
mepClient
plenaryClient
questionClient
vocabularyClient
votingClient

### Methods

clearCache
getAdoptedTextById
getAdoptedTexts
getAdoptedTextsFeed
getCacheStats
getCommitteeDocumentById
getCommitteeDocuments
getCommitteeDocumentsFeed
getCommitteeInfo
getControlledVocabularies
getControlledVocabulariesFeed
getControlledVocabularyById
getCorporateBodiesFeed
getCurrentCorporateBodies
getCurrentMEPs
getDocumentById
getDocumentsFeed
getEventById
getEvents
getEventsFeed
getExternalDocumentById
getExternalDocuments
getExternalDocumentsFeed
getHomonymMEPs
getIncomingMEPs
getMeetingActivities
getMeetingById
getMeetingDecisions
getMeetingForeseenActivities
getMeetingPlenarySessionDocumentItems
getMeetingPlenarySessionDocuments
getMEPDeclarationById
getMEPDeclarations
getMEPDeclarationsFeed
getMEPDetails
getMEPs
getMEPsFeed
getOutgoingMEPs
getParliamentaryQuestionById
getParliamentaryQuestions
getParliamentaryQuestionsFeed
getPlenaryDocumentById
getPlenaryDocuments
getPlenaryDocumentsFeed
getPlenarySessionDocumentById
getPlenarySessionDocumentItems
getPlenarySessionDocuments
getPlenarySessionDocumentsFeed
getPlenarySessions
getProcedureById
getProcedureEventById
getProcedureEvents
getProcedures
getProceduresFeed
getSpeechById
getSpeeches
getVotingRecords
searchDocuments
buildShared

## Constructors

### constructor

- new EuropeanParliamentClient(config?: EPClientConfig): EuropeanParliamentClient

  Creates a new European Parliament API client.

  Builds shared LRU cache and rate-limiter, then wires all sub-clients to use them so the whole facade operates within one resource budget.

  #### Parameters

  - config: EPClientConfig = {}

    Optional client configuration

  #### Returns EuropeanParliamentClient

  - Defined in clients/europeanParliamentClient.ts:162

## Properties

### `Private` `Readonly` committeeClient

committeeClient: CommitteeClient

- Defined in clients/europeanParliamentClient.ts:148

### `Private` `Readonly` documentClient

documentClient: DocumentClient

- Defined in clients/europeanParliamentClient.ts:149

### `Private` `Readonly` legislativeClient

legislativeClient: LegislativeClient

- Defined in clients/europeanParliamentClient.ts:150

### `Private` `Readonly` mepClient

mepClient: MEPClient

- Defined in clients/europeanParliamentClient.ts:145

### `Private` `Readonly` plenaryClient

plenaryClient: PlenaryClient

- Defined in clients/europeanParliamentClient.ts:146

### `Private` `Readonly` questionClient

questionClient: QuestionClient

- Defined in clients/europeanParliamentClient.ts:151

### `Private` `Readonly` vocabularyClient

vocabularyClient: VocabularyClient

- Defined in clients/europeanParliamentClient.ts:152

### `Private` `Readonly` votingClient

votingClient: VotingClient

- Defined in clients/europeanParliamentClient.ts:147

## Methods

### clearCache

- clearCache(): void

  Clears all entries from the LRU cache.

  #### Returns void

  #### Example

      client.clearCache();
      const freshData = await client.getMEPs({ country: 'SE' });

  - Defined in clients/europeanParliamentClient.ts:220

### getAdoptedTextById

- getAdoptedTextById(docId: string): Promise<AdoptedText>

  Returns a single adopted text by document ID. EP API Endpoint: `GET /adopted-texts/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<AdoptedText>

  - Defined in clients/europeanParliamentClient.ts:790

### getAdoptedTexts

- getAdoptedTexts(
  params?: { limit?: number; offset?: number; year?: number },
  ): Promise<PaginatedResponse<AdoptedText>>

  Returns adopted texts. EP API Endpoint: `GET /adopted-texts`

  #### Parameters

  - params: { limit?: number; offset?: number; year?: number } = {}

  #### Returns Promise<PaginatedResponse<AdoptedText>>

  - Defined in clients/europeanParliamentClient.ts:778

### getAdoptedTextsFeed

- getAdoptedTextsFeed(
  params?: { startDate?: string; timeframe?: string; workType?: string },
  ): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated adopted texts via the feed endpoint. EP API Endpoint: `GET /adopted-texts/feed`

  #### Parameters

  - params: { startDate?: string; timeframe?: string; workType?: string } = {}

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:810

### getCacheStats

- getCacheStats(): {
  hitRate: number;
  hits: number;
  maxSize: number;
  misses: number;
  size: number;
  }

  Returns cache statistics for monitoring and debugging.

  All sub-clients share the same LRU cache and hit/miss counters (via EPSharedResources), so delegating to any single sub-client returns aggregate statistics across the entire facade.

  #### Returns { hitRate: number; hits: number; maxSize: number; misses: number; size: number }

  `{ size, maxSize, hitRate, hits, misses }`

  - Defined in clients/europeanParliamentClient.ts:234

### getCommitteeDocumentById

- getCommitteeDocumentById(docId: string): Promise<LegislativeDocument>

  Returns a single committee document by ID. EP API Endpoint: `GET /committee-documents/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<LegislativeDocument>

  - Defined in clients/europeanParliamentClient.ts:680

### getCommitteeDocuments

- getCommitteeDocuments(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns committee documents. EP API Endpoint: `GET /committee-documents`

  Note: The EP API `/committee-documents` endpoint does not support `year`. Only pagination (limit/offset) is supported.

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:609

### getCommitteeDocumentsFeed

- getCommitteeDocumentsFeed(): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated committee documents via the feed endpoint. EP API Endpoint: `GET /committee-documents/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:715

### getCommitteeInfo

- getCommitteeInfo(
  params: { abbreviation?: string; id?: string },
  ): Promise<Committee>

  Retrieves committee (corporate body) information by ID or abbreviation.

  #### Parameters

  - params: { abbreviation?: string; id?: string }

    id or abbreviation

  #### Returns Promise<Committee>

  Committee information

  #### Security

  Audit logged per GDPR Article 30

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/corporate-bodies

  - Defined in clients/europeanParliamentClient.ts:542

### getControlledVocabularies

- getControlledVocabularies(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<Record<string, unknown>>>

  Returns EP controlled vocabularies. EP API Endpoint: `GET /controlled-vocabularies`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:874

### getControlledVocabulariesFeed

- getControlledVocabulariesFeed(): Promise<
  JSONLDResponse<Record<string, unknown>>,
  >

  Retrieves recently updated controlled vocabularies via the feed endpoint. EP API Endpoint: `GET /controlled-vocabularies/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:896

### getControlledVocabularyById

- getControlledVocabularyById(vocId: string): Promise<Record<string, unknown>>

  Returns a single EP Controlled Vocabulary by ID. EP API Endpoint: `GET /controlled-vocabularies/{voc-id}`

  #### Parameters

  - vocId: string

  #### Returns Promise<Record<string, unknown>>

  - Defined in clients/europeanParliamentClient.ts:885

### getCorporateBodiesFeed

- getCorporateBodiesFeed(): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated corporate bodies via the feed endpoint. EP API Endpoint: `GET /corporate-bodies/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:565

### getCurrentCorporateBodies

- getCurrentCorporateBodies(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<Committee>>

  Returns the list of all current EP Corporate Bodies for today's date. EP API Endpoint: `GET /corporate-bodies/show-current`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<Committee>>

  - Defined in clients/europeanParliamentClient.ts:553

### getCurrentMEPs

- getCurrentMEPs(
  params?: {
  country?: string;
  group?: string;
  limit?: number;
  offset?: number;
  },
  ): Promise<PaginatedResponse<MEP>>

  Returns all currently active MEPs for today's date.

  Unlike `getMEPs()`, this uses `GET /meps/show-current` which returns `api:country-of-representation` and `api:political-group` in responses. Optional `country` and `group` filters are applied client-side after fetch.

  EP API Endpoint: `GET /meps/show-current`

  #### Parameters

  - params: { country?: string; group?: string; limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<MEP>>

  - Defined in clients/europeanParliamentClient.ts:283

### getDocumentById

- getDocumentById(docId: string): Promise<LegislativeDocument>

  Returns a single document by ID. EP API Endpoint: `GET /documents/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<LegislativeDocument>

  - Defined in clients/europeanParliamentClient.ts:656

### getDocumentsFeed

- getDocumentsFeed(): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated documents via the feed endpoint. EP API Endpoint: `GET /documents/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:697

### getEventById

- getEventById(eventId: string): Promise<EPEvent>

  Returns a single EP event by ID. EP API Endpoint: `GET /events/{event-id}`

  #### Parameters

  - eventId: string

  #### Returns Promise<EPEvent>

  - Defined in clients/europeanParliamentClient.ts:470

### getEvents

- getEvents(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<EPEvent>>

  Returns EP events (hearings, conferences, etc.). EP API Endpoint: `GET /events`

  Note: The EP API `/events` endpoint has no date filtering. Only pagination (limit/offset) is supported.

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<EPEvent>>

  - Defined in clients/europeanParliamentClient.ts:459

### getEventsFeed

- getEventsFeed(
  params?: {
  activityType?: string;
  startDate?: string;
  timeframe?: string;
  },
  ): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated events via the feed endpoint. EP API Endpoint: `GET /events/feed`

  #### Parameters

  - params: { activityType?: string; startDate?: string; timeframe?: string } = {}

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:478

### getExternalDocumentById

- getExternalDocumentById(docId: string): Promise<LegislativeDocument>

  Returns a single external document by ID. EP API Endpoint: `GET /external-documents/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<LegislativeDocument>

  - Defined in clients/europeanParliamentClient.ts:688

### getExternalDocuments

- getExternalDocuments(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns all External Documents. EP API Endpoint: `GET /external-documents`

  Note: The EP API `/external-documents` endpoint does not support `year`. Only pagination (limit/offset) is supported.

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:645

### getExternalDocumentsFeed

- getExternalDocumentsFeed(
  params?: { startDate?: string; timeframe?: string; workType?: string },
  ): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated external documents via the feed endpoint. EP API Endpoint: `GET /external-documents/feed`

  #### Parameters

  - params: { startDate?: string; timeframe?: string; workType?: string } = {}

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:732

### getHomonymMEPs

- getHomonymMEPs(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<MEP>>

  Returns homonym MEPs for the current parliamentary term. EP API Endpoint: `GET /meps/show-homonyms`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<MEP>>

  - Defined in clients/europeanParliamentClient.ts:318

### getIncomingMEPs

- getIncomingMEPs(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<MEP>>

  Returns all incoming MEPs for the current parliamentary term. EP API Endpoint: `GET /meps/show-incoming`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<MEP>>

  - Defined in clients/europeanParliamentClient.ts:296

### getMeetingActivities

- getMeetingActivities(
  sittingId: string,
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<MeetingActivity>>

  Returns activities linked to a specific meeting (plenary sitting). EP API Endpoint: `GET /meetings/{sitting-id}/activities`

  #### Parameters

  - sittingId: string
  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<MeetingActivity>>

  - Defined in clients/europeanParliamentClient.ts:393

### getMeetingById

- getMeetingById(eventId: string): Promise<PlenarySession>

  Returns a single EP meeting by ID. EP API Endpoint: `GET /meetings/{event-id}`

  #### Parameters

  - eventId: string

  #### Returns Promise<PlenarySession>

  - Defined in clients/europeanParliamentClient.ts:448

### getMeetingDecisions

- getMeetingDecisions(
  sittingId: string,
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns decisions made in a specific meeting (plenary sitting). EP API Endpoint: `GET /meetings/{sitting-id}/decisions`

  #### Parameters

  - sittingId: string
  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:404

### getMeetingForeseenActivities

- getMeetingForeseenActivities(
  sittingId: string,
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<MeetingActivity>>

  Returns foreseen activities linked to a specific meeting. EP API Endpoint: `GET /meetings/{sitting-id}/foreseen-activities`

  #### Parameters

  - sittingId: string
  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<MeetingActivity>>

  - Defined in clients/europeanParliamentClient.ts:415

### getMeetingPlenarySessionDocumentItems

- getMeetingPlenarySessionDocumentItems(
  sittingId: string,
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns plenary session document items for a specific meeting. EP API Endpoint: `GET /meetings/{sitting-id}/plenary-session-document-items`

  #### Parameters

  - sittingId: string
  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:437

### getMeetingPlenarySessionDocuments

- getMeetingPlenarySessionDocuments(
  sittingId: string,
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns plenary session documents for a specific meeting. EP API Endpoint: `GET /meetings/{sitting-id}/plenary-session-documents`

  #### Parameters

  - sittingId: string
  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:426

### getMEPDeclarationById

- getMEPDeclarationById(docId: string): Promise<MEPDeclaration>

  Returns a single MEP declaration by document ID. EP API Endpoint: `GET /meps-declarations/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<MEPDeclaration>

  #### Gdpr

  Declarations contain personal financial data – access is audit-logged

  - Defined in clients/europeanParliamentClient.ts:343

### getMEPDeclarations

- getMEPDeclarations(
  params?: { limit?: number; offset?: number; year?: number },
  ): Promise<PaginatedResponse<MEPDeclaration>>

  Returns MEP declarations of financial interests. EP API Endpoint: `GET /meps-declarations`

  #### Parameters

  - params: { limit?: number; offset?: number; year?: number } = {}

  #### Returns Promise<PaginatedResponse<MEPDeclaration>>

  #### Gdpr

  Declarations contain personal financial data – access is audit-logged

  - Defined in clients/europeanParliamentClient.ts:330

### getMEPDeclarationsFeed

- getMEPDeclarationsFeed(
  params?: { startDate?: string; timeframe?: string; workType?: string },
  ): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated MEP declarations via the feed endpoint. EP API Endpoint: `GET /meps-declarations/feed`

  #### Parameters

  - params: { startDate?: string; timeframe?: string; workType?: string } = {}

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:362

### getMEPDetails

- getMEPDetails(id: string): Promise<MEPDetails>

  Retrieves detailed information about a specific MEP.

  Supports numeric ID ("124936"), person URI ("person/124936"), or MEP-prefixed ID ("MEP-124936").

  #### Parameters

  - id: string

    MEP identifier in any supported format

  #### Returns Promise<MEPDetails>

  Detailed MEP information

  #### Security

  Personal data access logged per GDPR Article 30

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/meps/{id}

  - Defined in clients/europeanParliamentClient.ts:270

### getMEPs

- getMEPs(
  params: {
  active?: boolean;
  committee?: string;
  country?: string;
  group?: string;
  limit?: number;
  offset?: number;
  },
  ): Promise<PaginatedResponse<MEP>>

  Retrieves Members of the European Parliament with filtering and pagination.

  #### Parameters

  - params: {
    active?: boolean;
    committee?: string;
    country?: string;
    group?: string;
    limit?: number;
    offset?: number;
    }

    country, group, committee, active, limit, offset

  #### Returns Promise<PaginatedResponse<MEP>>

  Paginated MEP list

  #### Security

  Personal data access logged per GDPR Article 30

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/meps

  - Defined in clients/europeanParliamentClient.ts:247

### getMEPsFeed

- getMEPsFeed(
  params?: { startDate?: string; timeframe?: string },
  ): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated MEPs via the feed endpoint. EP API Endpoint: `GET /meps/feed`

  #### Parameters

  - params: { startDate?: string; timeframe?: string } = {}

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:351

### getOutgoingMEPs

- getOutgoingMEPs(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<MEP>>

  Returns all outgoing MEPs for the current parliamentary term. EP API Endpoint: `GET /meps/show-outgoing`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<MEP>>

  - Defined in clients/europeanParliamentClient.ts:307

### getParliamentaryQuestionById

- getParliamentaryQuestionById(docId: string): Promise<ParliamentaryQuestion>

  Returns a single parliamentary question by document ID. EP API Endpoint: `GET /parliamentary-questions/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<ParliamentaryQuestion>

  - Defined in clients/europeanParliamentClient.ts:855

### getParliamentaryQuestions

- getParliamentaryQuestions(
  params: {
  author?: string;
  dateFrom?: string;
  dateTo?: string;
  limit?: number;
  offset?: number;
  status?: "PENDING" | "ANSWERED";
  topic?: string;
  type?: "WRITTEN" | "ORAL";
  },
  ): Promise<PaginatedResponse<ParliamentaryQuestion>>

  Retrieves parliamentary questions with filtering by type, author, and status.

  #### Parameters

  - params: {
    author?: string;
    dateFrom?: string;
    dateTo?: string;
    limit?: number;
    offset?: number;
    status?: "PENDING" | "ANSWERED";
    topic?: string;
    type?: "WRITTEN" | "ORAL";
    }

    type, author, topic, status, dateFrom, dateTo, limit, offset

  #### Returns Promise<PaginatedResponse<ParliamentaryQuestion>>

  Paginated parliamentary questions list

  #### Security

  Audit logged per GDPR Article 30

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/parliamentary-questions

  - Defined in clients/europeanParliamentClient.ts:838

### getParliamentaryQuestionsFeed

- getParliamentaryQuestionsFeed(): Promise<
  JSONLDResponse<Record<string, unknown>>,
  >

  Retrieves recently updated parliamentary questions via the feed endpoint. EP API Endpoint: `GET /parliamentary-questions/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:866

### getPlenaryDocumentById

- getPlenaryDocumentById(docId: string): Promise<LegislativeDocument>

  Returns a single plenary document by ID. EP API Endpoint: `GET /plenary-documents/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<LegislativeDocument>

  - Defined in clients/europeanParliamentClient.ts:664

### getPlenaryDocuments

- getPlenaryDocuments(
  params?: { limit?: number; offset?: number; year?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns plenary documents. EP API Endpoint: `GET /plenary-documents`

  #### Parameters

  - params: { limit?: number; offset?: number; year?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:594

### getPlenaryDocumentsFeed

- getPlenaryDocumentsFeed(): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated plenary documents via the feed endpoint. EP API Endpoint: `GET /plenary-documents/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:706

### getPlenarySessionDocumentById

- getPlenarySessionDocumentById(docId: string): Promise<LegislativeDocument>

  Returns a single plenary session document by ID. EP API Endpoint: `GET /plenary-session-documents/{doc-id}`

  #### Parameters

  - docId: string

  #### Returns Promise<LegislativeDocument>

  - Defined in clients/europeanParliamentClient.ts:672

### getPlenarySessionDocumentItems

- getPlenarySessionDocumentItems(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns all Plenary Session Document Items. EP API Endpoint: `GET /plenary-session-documents-items`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:631

### getPlenarySessionDocuments

- getPlenarySessionDocuments(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Returns plenary session documents. EP API Endpoint: `GET /plenary-session-documents`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  - Defined in clients/europeanParliamentClient.ts:620

### getPlenarySessionDocumentsFeed

- getPlenarySessionDocumentsFeed(): Promise<
  JSONLDResponse<Record<string, unknown>>,
  >

  Retrieves recently updated plenary session documents via the feed endpoint. EP API Endpoint: `GET /plenary-session-documents/feed` Fixed-window feed — no parameters per OpenAPI spec.

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:724

### getPlenarySessions

- getPlenarySessions(
  params: {
  dateFrom?: string;
  dateTo?: string;
  limit?: number;
  location?: string;
  offset?: number;
  year?: number;
  },
  ): Promise<PaginatedResponse<PlenarySession>>

  Retrieves plenary sessions with date and location filtering.

  #### Parameters

  - params: {
    dateFrom?: string;
    dateTo?: string;
    limit?: number;
    location?: string;
    offset?: number;
    year?: number;
    }

    year, dateFrom, dateTo, location, limit, offset

  #### Returns Promise<PaginatedResponse<PlenarySession>>

  Paginated plenary session list

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/meetings

  - Defined in clients/europeanParliamentClient.ts:378

### getProcedureById

- getProcedureById(processId: string): Promise<Procedure>

  Returns a single procedure by ID. EP API Endpoint: `GET /procedures/{process-id}`

  #### Parameters

  - processId: string

  #### Returns Promise<Procedure>

  #### Throws

  When the procedure is not found (404)

  - Defined in clients/europeanParliamentClient.ts:759

### getProcedureEventById

- getProcedureEventById(processId: string, eventId: string): Promise<EPEvent>

  Returns a single event within a procedure by event ID. EP API Endpoint: `GET /procedures/{process-id}/events/{event-id}`

  #### Parameters

  - processId: string

    Procedure process ID

  - eventId: string

    Event identifier within the procedure

  #### Returns Promise<EPEvent>

  - Defined in clients/europeanParliamentClient.ts:825

### getProcedureEvents

- getProcedureEvents(
  processId: string,
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<EPEvent>>

  Returns events linked to a procedure. EP API Endpoint: `GET /procedures/{process-id}/events`

  #### Parameters

  - processId: string
  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<EPEvent>>

  - Defined in clients/europeanParliamentClient.ts:767

### getProcedures

- getProcedures(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<Procedure>>

  Returns legislative procedures. EP API Endpoint: `GET /procedures`

  Note: The EP API `/procedures` endpoint does not support `year`. Only pagination (limit/offset) is supported.

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<Procedure>>

  - Defined in clients/europeanParliamentClient.ts:747

### getProceduresFeed

- getProceduresFeed(
  params?: {
  processType?: string;
  startDate?: string;
  timeframe?: string;
  },
  ): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated procedures via the feed endpoint. EP API Endpoint: `GET /procedures/feed`

  #### Parameters

  - params: { processType?: string; startDate?: string; timeframe?: string } = {}

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/europeanParliamentClient.ts:798

### getSpeechById

- getSpeechById(speechId: string): Promise<Speech>

  Returns a single speech by ID. EP API Endpoint: `GET /speeches/{speech-id}`

  #### Parameters

  - speechId: string

  #### Returns Promise<Speech>

  - Defined in clients/europeanParliamentClient.ts:529

### getSpeeches

- getSpeeches(
  params?: {
  dateFrom?: string;
  dateTo?: string;
  limit?: number;
  offset?: number;
  },
  ): Promise<PaginatedResponse<Speech>>

  Returns plenary speeches. EP API Endpoint: `GET /speeches`

  Note: The EP API `/speeches` endpoint does not support `year`. Use `dateFrom`/`dateTo` (mapped to `sitting-date`/`sitting-date-end`).

  #### Parameters

  - params: { dateFrom?: string; dateTo?: string; limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<Speech>>

  - Defined in clients/europeanParliamentClient.ts:516

### getVotingRecords

- getVotingRecords(
  params: {
  dateFrom?: string;
  dateTo?: string;
  limit?: number;
  offset?: number;
  sessionId?: string;
  topic?: string;
  },
  ): Promise<PaginatedResponse<VotingRecord>>

  Retrieves voting records with filtering by session, topic, and date.

  The EP API returns only aggregate vote counts; per-MEP vote positions are not available from this endpoint.

  #### Parameters

  - params: {
    dateFrom?: string;
    dateTo?: string;
    limit?: number;
    offset?: number;
    sessionId?: string;
    topic?: string;
    }

    sessionId, topic, dateFrom, dateTo, limit, offset

  #### Returns Promise<PaginatedResponse<VotingRecord>>

  Paginated voting records list

  #### Security

  Audit logged per GDPR Article 30

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/meetings/{sitting-id}/vote-results

  - Defined in clients/europeanParliamentClient.ts:498

### searchDocuments

- searchDocuments(
  params: {
  keyword: string;
  committee?: string;
  dateFrom?: string;
  dateTo?: string;
  documentType?: string;
  limit?: number;
  offset?: number;
  },
  ): Promise<PaginatedResponse<LegislativeDocument>>

  Searches legislative documents by keyword, type, date, and committee.

  #### Parameters

  - params: {
    keyword: string;
    committee?: string;
    dateFrom?: string;
    dateTo?: string;
    documentType?: string;
    limit?: number;
    offset?: number;
    }

    keyword, documentType, dateFrom, dateTo, committee, limit, offset

  #### Returns Promise<PaginatedResponse<LegislativeDocument>>

  Paginated legislative documents list

  #### Security

  Audit logged per GDPR Article 30

  #### Performance

  Cached: <100ms P50, <200ms P95. Uncached: <2s P99

  #### See

  https://data.europarl.europa.eu/api/v2/documents

  - Defined in clients/europeanParliamentClient.ts:578

### `Private` `Static` buildShared

- buildShared(config: EPClientConfig): EPSharedResources

  Builds the shared resources object that is passed to all sub-clients. Extracted to keep the constructor complexity within ESLint limits.

  #### Parameters

  - config: EPClientConfig

    Client configuration options

  #### Returns EPSharedResources

  Shared resources for all EP sub-clients

  #### Private

  - Defined in clients/europeanParliamentClient.ts:182