Optionalshared: EPSharedResourcesProtected ReadonlybaseEuropean Parliament API base URL.
Protected ReadonlycacheLRU cache for API responses.
Protected ReadonlyenableEnable automatic retry on transient failures.
Protected ReadonlymaxMaximum allowed response body size in bytes.
Protected ReadonlymaxMaximum number of retry attempts.
Protected ReadonlyrateToken bucket rate limiter.
Protected ReadonlytimeoutRequest timeout in milliseconds.
PrivatebuildBuilds EP API parameters for document search.
Clears all entries from the LRU cache.
ProtectedevictEvicts a single cache entry matching the given endpoint and params. Sub-clients use this when they detect that a successfully-fetched payload is a content-pending sentinel that must not be served from cache for the remainder of the TTL — eviction lets availability recover as soon as the upstream document is enriched.
PrivatefilterApplies client-side keyword, committee, and date-range filters to documents.
ProtectedgetExecutes a cached, rate-limited GET request to the EP API.
Expected response type (extends Record<string, unknown>)
API endpoint path (relative to baseURL)
Optionalparams: Record<string, unknown>Optional query parameters
OptionalminimumTimeoutMs: numberOptional per-request minimum timeout in milliseconds.
When provided, the effective timeout is Math.max(minimumTimeoutMs, this.timeoutMs),
so the global timeout (set via --timeout or EP_REQUEST_TIMEOUT_MS) can still
extend it beyond the per-endpoint minimum.
Use for known slow EP API endpoints such as procedures/feed.
Promise resolving to the typed API response
Returns cache statistics for monitoring and debugging.
{ size, maxSize, hitRate, hits, misses }
Returns a single committee document by ID.
EP API Endpoint: GET /committee-documents/{doc-id}
Returns committee documents.
EP API Endpoint: GET /committee-documents
Note: The EP API /committee-documents endpoint does not
support a year query parameter per the OpenAPI spec.
Only pagination (limit/offset) is supported.
Retrieves recently updated committee documents via the feed endpoint.
EP API Endpoint: GET /committee-documents/feed
Fixed-window feed — no timeframe parameter.
Extended timeout applied (120 s minimum).
Returns a single document by ID.
EP API Endpoint: GET /documents/{doc-id}
Retrieves recently updated documents via the feed endpoint.
EP API Endpoint: GET /documents/feed
This is a fixed-window feed — the EP API does NOT accept a
timeframe parameter. It returns updates from a server-defined
default window (typically one month). Response times can exceed
120 s, so an extended minimum timeout is applied automatically.
Returns a single external document by ID.
EP API Endpoint: GET /external-documents/{doc-id}
Returns all External Documents.
EP API Endpoint: GET /external-documents
Note: The EP API /external-documents endpoint does not
support a year query parameter per the OpenAPI spec.
Only pagination (limit/offset) is supported.
Retrieves recently updated external documents via the feed endpoint.
EP API Endpoint: GET /external-documents/feed
This is a configurable-window feed that accepts timeframe,
start-date, and work-type parameters.
Extended timeout applied for one-month timeframe.
Returns a single plenary document by ID.
EP API Endpoint: GET /plenary-documents/{doc-id}
Returns plenary documents.
EP API Endpoint: GET /plenary-documents
Retrieves recently updated plenary documents via the feed endpoint.
EP API Endpoint: GET /plenary-documents/feed
Fixed-window feed — no timeframe parameter.
Extended timeout applied (120 s minimum).
Returns a single plenary session document by ID.
EP API Endpoint: GET /plenary-session-documents/{doc-id}
Returns all Plenary Session Document Items.
EP API Endpoint: GET /plenary-session-documents-items
Returns plenary session documents.
EP API Endpoint: GET /plenary-session-documents
Retrieves recently updated plenary session documents via the feed endpoint.
EP API Endpoint: GET /plenary-session-documents/feed
Fixed-window feed — no timeframe parameter.
Extended timeout applied (120 s minimum).
Searches legislative documents by keyword, type, date, and committee.
EP API Endpoint: GET /documents
keyword, documentType, dateFrom, dateTo, committee, limit, offset
Paginated legislative documents list
Privatetransform
Sub-client for document EP API endpoints.