# Sunrise and sunset times

Sunrise, sunset, solar noon, day length, and civil, nautical and astronomical twilight for any coordinates, in the place's local time zone (ISO 8601), for one. Needs lat and lng. Served by Sunrise-Sunset.org.

Sunrise, sunset, solar noon, day length, and civil, nautical and astronomical twilight for any coordinates, in the place's local time zone (ISO 8601), for one date or a date range (one entry per day; keep ranges to a few weeks). sun_status flags polar day or night. Useful for shoot planning, events and outdoor operations.

- Tool ID: `sunrise-sunset/sun-times`
- Provider: [Sunrise-Sunset.org](/providers/sunrise-sunset.md)
- Capability: [Weather forecast & history](/tools/weather/forecast.md)
- Price: no charge per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No charge per call. A workspace is still needed so your agent can call it.


```json
{
  "model": "per_call",
  "amountUsd": 0
}
```

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "lat": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude, e.g. 48.8566"
    },
    "lng": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude, e.g. 2.3522"
    },
    "date": {
      "type": "string",
      "pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2}|today|tomorrow)$",
      "description": "Date YYYY-MM-DD, 'today' or 'tomorrow', e.g. '2026-12-21'"
    },
    "date_start": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "Range start (with date_end), e.g. '2026-12-01'"
    },
    "date_end": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "Range end, inclusive, e.g. '2026-12-31'"
    },
    "tz": {
      "type": "string",
      "pattern": "^[A-Za-z_]+(/[A-Za-z0-9_+-]+){0,2}$",
      "maxLength": 64,
      "description": "IANA time zone for the times instead of the local one, e.g. 'UTC'"
    }
  },
  "required": [
    "lat",
    "lng"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "sunrise-sunset/sun-times",
  "input": {
    "lat": 48.8566,
    "lng": 2.3522,
    "date": "2026-12-21"
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

Licence: Sunrise-Sunset.org free API (attribution required).

Attribution: Sun data by Sunrise-Sunset.org (https://sunrise-sunset.org).

[Provider documentation](https://sunrise-sunset.org/api)

[REST inspection](https://api.agentik.cc/v1/tools/sunrise-sunset/sun-times) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/sunrise-sunset/sun-times) · [Agent index](/llms.txt)
