API
ECI Monitor exposes a small public API for the same data used by the dashboard.
Scope
The API is read-oriented. It exposes selected initiative metadata, snapshot history, cached initiative logos, and a refresh endpoint that may run the tracker only when the cached source data is due for an update.
All timestamps returned by the API are Unix seconds in UTC.
The API is intended for lightweight reuse and transparency, not as a guaranteed long-term public contract. Field names may evolve while the project is still being developed.
Where the data comes from
Raw initiative details and signature totals come from the official European Citizens’ Initiative public register. ECI Monitor does not collect signatures and is not the official signing system.
For selected initiatives, the tracker periodically checks the official source. When the source reports a newer update time, ECI Monitor stores a local snapshot of the totals and country breakdown.
The displayed charts, short-term rates, targets, ETAs, and country momentum lists are derived by ECI Monitor from those stored snapshots. They should be read as estimates or analysis, not as official ECI metrics.
National threshold values are the official ECI country thresholds used to determine whether an initiative has met the minimum spread requirement across EU countries.
API responses are derived from public ECI register data. See Legal for source attribution and reuse notes.
List tracked initiatives
Always returns an initiatives array. Without ids, it contains all initiatives selected by the site administrator. With ids, it contains only the requested initiatives.
The fields parameter is orthogonal to filtering. Use it to attach heavier subobjects to every returned initiative.
GET /api.php?action=initiatives
GET /api.php?action=initiatives&fields=details
GET /api.php?action=initiatives&ids=2025-000005&fields=details,state
List fields
initiatives[]
|
Array of selected initiative objects. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional fields
initiatives[]
|
Array of selected initiative objects. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Snapshot stream
Returns initiative snapshots as newline-delimited JSON. The browser uses this stream to build the charts client-side.
Use the after parameter to request only snapshots newer than a known source update timestamp. Timestamps are Unix seconds in UTC. When a version is supplied, immutable cache headers and an ETag are emitted for that stream URL.
GET /api.php?action=snapshots&id=2025-000005
GET /api.php?action=snapshots&id=2025-000005&after=1776420000&version=1776421200
Fields
sourceUpdatedAt
|
Official source update time as Unix seconds in UTC. | ||||
|---|---|---|---|---|---|
fetchedAt
|
Time when ECI Monitor fetched and stored the snapshot, as Unix seconds in UTC. | ||||
total
|
Initiative-wide signature total used by the app. | ||||
countryTotals
|
Country signature totals keyed by two-letter country code. | ||||
|
|||||
Logo images
Returns a cached logo for the initiative. PNG is the fallback format. Add format=webp to request a WebP version when the server can encode it. The default variant is trimmed for display in the page. The social variant is padded to a Facebook-friendly 1.91:1 PNG image for link previews.
The logo query value is a cache buster based on the ECI logo id. The optional v query value is also a cache buster and is ignored by the API logic.
GET /api.php?action=initiative-logo&id=2025-000005&logo=9055
GET /api.php?action=initiative-logo&id=2025-000005&logo=9055&format=webp&v=php-244
GET /api.php?action=initiative-logo&id=2025-000005&logo=9055&variant=social&v=php-244
Refresh
Checks whether the initiative is due for a tracker run. If the cached data is still fresh, it returns the cached state without contacting the official ECI source. If the data is due, one request obtains the per-initiative tracker lock and performs the refresh.
If another request is already refreshing the same initiative, the response reports that a refresh is already running instead of starting a second job.
GET /api.php?action=refresh&id=2025-000005
Fields
status
|
What happened, for example cached data was used, a refresh ran, or another refresh was already running. | |
|---|---|---|
reason
|
Machine-readable reason when no refresh was run or when an error-like condition occurred. | |
refreshIntervalMinutes
|
Tracker refresh interval for this initiative in minutes. | |
snapshotAppended
|
Whether a new local snapshot was stored during the refresh, when applicable. | |
lastSourceUpdatedAt
|
Newest official source update known after the refresh decision, as Unix seconds in UTC. | |
checkedAt
|
Time when the refresh decision was made or the source was checked. |