Skip to content
API documentation

Get Lottery Draw Years

Returns available history years for a game so clients can build archive filters.

On this page

Request

Use before requesting yearly archives or building customer history filters. The canonical route keeps the game code in the path; /v1/results/years?game_code=... is a compatibility alias for SDKs or older docs that prefer query-shaped result helpers.

GET https://api.lotteryfeedapi.com/v1/lotteries/md-pick3-midday/draw-years

Compatibility alias

The alias uses the same bounded read model, lotteries:read scope, sandbox behavior, and response shape. It does not scan full history on request.

GET https://api.lotteryfeedapi.com/v1/results/years?game_code=md-pick3-midday

Response

When indexed history is available, the response returns years, date range, and draw count. If the index has no rows yet, it falls back to the latest visible draw year and marks the response as limited.

{
  "game_code": "md-pick3-midday",
  "years": [2026, 2025],
  "limited": false,
  "source": "indexed_history",
  "date_range": { "from": "2025-12-31", "to": "2026-06-21" },
  "draw_count": 42
}

Endpoints

GET
/v1/lotteries/{game_code}/draw-years

Canonical draw-year index endpoint.

GET
/v1/results/years

Compatibility query endpoint using game_code.


Next: Lottery results