---
title: "Gets election data between two Timestamps"
method: GET
path: "/api/mayor"
tags: ["Mayor"]
---

# Gets election data between two Timestamps

`GET /api/mayor`

## Request

- Base URL: `https://sky.coflnet.com` (the document declares no server; this is the origin it was published from)
- URL: `https://sky.coflnet.com/api/mayor`
- Auth: none declared

## Query parameters

- `from` string, date-time
- `to` string, date-time

## Response `200`

OK

- CoflnetSkyMayorModelsModelElectionPeriod[]
  - `candidates` CoflnetSkyMayorModelsModelCandidate[], nullable
    - `key` string, nullable
    - `name` string, nullable
    - `perks` CoflnetSkyMayorModelsModelPerk[], nullable
      - `description` string, nullable
      - `name` string, nullable
      - `minister` boolean, required
    - `votes` integer, required
  - `end` string, nullable
  - `id` string, nullable
  - `start` string, nullable
  - `winner` CoflnetSkyMayorModelsModelWinner
    - `minister` CoflnetSkyMayorModelsMinister
      - `key` string, nullable
      - `name` string, nullable
      - `perk` CoflnetSkyMayorModelsPerk
        - `name` string, nullable
        - `description` string, nullable
        - `minister` boolean, required
    - `key` string, nullable
    - `name` string, nullable
    - `perks` CoflnetSkyMayorModelsModelPerk[], nullable
      - `description` string, nullable
      - `name` string, nullable
      - `minister` boolean, required
    - `votes` integer, required
  - `year` integer, required

## Changes

- **2026-08-04** `41f7cdd4406b`: 18 info
  - added the optional property `items/winner/minister` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/winner/minister` to the response with the `200` status (media type: application/json)
  - added the optional property `items/winner/minister` to the response with the `200` status (media type: text/json)
  - the response property `items/year` became required for the status `200` (media type: text/plain)
  - …14 more

[Operation history](https://skmtc.dev/coflnet/apis/skyapi/changes/api/mayor/get.md)

---

[API](https://skmtc.dev/coflnet/apis/skyapi.md) - [All operations](https://skmtc.dev/coflnet/apis/skyapi/llms.txt) - [OpenAPI document](https://skmtc.dev/coflnet/apis/skyapi/revisions/c787372dc7a2?raw)
