API & MCP

Everything a person can do on Sun Windows, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Sun Windows

Explore direct-sun windows, an optional window facing direction and a monthly comparison from your location and measured obstacle angles.

Inputs of Sun Windows
FieldTypeDefaultDescription
daydate"2026-06-21"Date
latitudenumber48.89Latitude
longitudenumber8.7Longitude
utcOffsetnumber2UTC offset on selected date
facingnumber-1Window facing (degrees, -1 = open sky)
stepMinutesselect (5, 1, 15)"5"Sampling interval (minutes)
obstaclestable[{"azimuth":180,"width":40,"height":5,"distance":10}]Obstacles from the observation point

Example request

Try an example

curl -X POST https://hearthsunwindows.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{}'

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-sun-windows": { "type": "http", "url": "https://hearthsunwindows.usefulweb.app/mcp" }
  }
}