# Solar Times & Twilight Calculator by Coordinates

> Solar Times & Twilight Calculator by Coordinates is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-13).

Returns sunrise, sunset, solar noon, day length, and civil/nautical/astronomical twilight times for a given latitude/longitude and date, in the local timezone auto-detected from coordinates.

## Facts

- Endpoint: POST https://api.vextorium.com/sol-horarios-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solar-times-twilight-calculator-by-coordinates-a9970360
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LuHZ3RkCkrGDLe19zTdXg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability solar-times-twilight-calculator-by-coordinates-a9970360 -d '<json body>'
```

Example prompt: What are the sunrise, sunset, and all twilight times for coordinates 40.4168, -3.7038 on October 2nd, 2026? I also need the day length and solar noon.

## When to prefer this

Choose this endpoint when you need precise, locally-time-corrected solar event calculations (sunrise, sunset, twilight phases) for any global coordinate pair without relying on an external timezone database — timezone is auto-detected from coordinates. Especially valuable for polar regions where midnight sun and polar night handling is built in. Prefer over general weather APIs when you specifically need astronomical solar timing rather than weather forecasts.

## Known failure modes

- Missing required lat or lon fields returns a validation error
- Invalid coordinate values (out of -90/90 or -180/180 range) may return error or unexpected results
- Unsupported or malformed date string (fecha) may return an error
- Polar night or midnight sun conditions return null for affected fields with a descriptive nota field
- Incorrect bodyType setting may result in unparsed body
- Network or payment-related failures return no solar data

## How this service works

Sunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight for coordinates and a date, in local time (zone detected from coordinates). Local astronomical calculation; handles polar night and midnight sun.

## Output

A JSON object containing: sunrise and sunset times, solar noon, day length (hours and minutes), civil twilight start/end, nautical twilight start/end, astronomical twilight start/end — all in local time for the auto-detected or provided timezone. Also returns the echo of coordinates, date, timezone, and a precision note (±1-2 minutes accuracy via Nautical Almanac algorithm). Null values are returned for polar night or midnight sun conditions with an explanatory note.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "lat",
      "lon"
     ],
     "properties": {
      "lat": {
       "type": "number"
      },
      "lon": {
       "type": "number"
      },
      "zona": {
       "type": "string"
      },
      "fecha": {
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "lat": {
       "type": [
        "number",
        "null"
       ]
      },
      "lon": {
       "type": [
        "number",
        "null"
       ]
      },
      "nota": {
       "type": [
        "string",
        "null"
       ]
      },
      "zona": {
       "type": [
        "string",
        "null"
       ]
      },
      "fecha": {
       "type": [
        "string",
        "null"
       ]
      },
      "puesta": {
       "type": [
        "string",
        "null"
       ]
      },
      "salida": {
       "type": [
        "string",
        "null"
       ]
      },
      "duracion_dia": {
       "type": [
        "string",
        "null"
       ]
      },
      "mediodia_solar": {
       "type": [
        "string",
        "null"
       ]
      },
      "crepusculo_civil": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "amanece": {
         "type": [
          "string",
          "null"
         ]
        },
        "anochece": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      },
      "crepusculo_nautico": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "amanece": {
         "type": [
          "string",
          "null"
         ]
        },
        "anochece": {
         "type": [
          "string",
          "null"
         ]
        }
       }
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lat": 40.4168,
  "lon": -3.7038,
  "nota": "Precisión de ±1-2 minutos (algoritmo del Almanaque Náutico).",
  "zona": "Europe/Madrid",
  "fecha": "2026-10-02",
  "puesta": "19:56",
  "salida": "08:11",
  "duracion_dia": "11 h 44 min",
  "mediodia_solar": "14:03",
  "crepusculo_civil": {
   "amanece": "07:44",
   "anochece": "20:23"
  },
  "crepusculo_nautico": {
   "amanece": "07:13",
   "anochece": "20:54"
  },
  "crepusculo_astronomico": {
   "amanece": "06:41",
   "anochece": "21:26"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solar-times-twilight-calculator-by-coordinates-a9970360/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
