API & MCP

Everything a person can do on Bridge-Day Leave Optimizer, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Bridge-Day Leave Optimizer

Takes your number of leave days, the public holidays of your country and region and your weekend, and finds the leave days that give the most days off in breaks — computed exactly, not by trial and error — plus a list of the best bridge days around each holiday.

Inputs of Bridge-Day Leave Optimizer
FieldTypeDefaultDescription
countryselect (DE, AT, CH, US, GB, FR, NL, BE, ES, IT, PL, SE, DK, IE, CA, AU)"DE"Country
subdivisiontext—State or region (optional). ISO 3166-2 code such as DE-BY (Bavaria) or CH-ZH. Without it only nationwide holidays count.
from (required)date"2027-01-01"Period from
to (required)date"2027-12-31"Period to
leaveDaysinteger10Leave days to plan
minBreakinteger4Shortest break worth taking (days off in a row)
maxBreaksinteger0Most separate breaks (0 = any number)
weekendDaysmultiselect (sun, mon, tue, wed, thu, fri, sat)["sat","sun"]Weekend days
closureslist—Extra days off without leave (optional). One YYYY-MM-DD per line, for example company closing days.

Example request

Bavaria 2027, 10 leave days

curl -X POST https://hearthleaveoptimizer.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"country":"DE","subdivision":"DE-BY","from":"2027-01-01","to":"2027-12-31","leaveDays":10,"minBreak":4}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "hearth-leave-optimizer": { "type": "http", "url": "https://hearthleaveoptimizer.usefulweb.app/mcp" }
  }
}