Skip to main content

For developers

Public API

A small, read-only JSON API exposing published Elezzjoni data — parties, electoral districts and candidates. No API key required.

Format

JSON

Authentication

None

CORS

*

Rate limit

To keep the service responsive for everyone, public endpoints are throttled per client IP.

  • 60 requests per minute per IP, per endpoint
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
  • Exceeding the limit returns HTTP 429 with a Retry-After header.

Note: the limit is enforced per server instance and resets on restart, so it is a fair-use guard rather than a strict cap. If you need a higher, guaranteed limit, get in touch.

Endpoints

GET/api/public/v1/parties

List all published parties.

Example

curl https://elezzjonimalta.lovable.app/api/public/v1/parties
GET/api/public/v1/districts

List all 13 published electoral districts with their localities.

Example

curl https://elezzjonimalta.lovable.app/api/public/v1/districts
GET/api/public/v1/candidates

List published candidates. Filter by district number/UUID or party slug/UUID.

Query parameters

  • districtstringDistrict number 1–13 or district UUID. Filters by primary_district_id.
  • partystringParty slug (e.g. pn, pl, adpd) or party UUID.
  • limitinteger1–500 (default 100).

Example

curl "https://elezzjonimalta.lovable.app/api/public/v1/candidates?district=6&party=pl"

Response shape

All endpoints return a JSON envelope with a data array and a meta object describing the result.

{
  "data": [ /* records */ ],
  "meta": {
    "count": 13,
    "generatedAt": "2026-04-29T08:00:00.000Z"
  }
}

Attribution

Data is open and free to reuse. Please credit "Elezzjoni" with a link back to the site, and check the About page for sourcing details.

About