Catalog/data-solar-positions

Data

Sun & planet sky positions API

Compute the topocentric altitude and azimuth of the Sun and each naked-eye planet (Mercury through Saturn) for a UTC date/time and observer lat/lon, plus whether each body is above the horizon — the value-add being the multi-body planetary position computation. Differs from data/sun-moon which returns only sun/moon rise & set times. Answers 'where is Jupiter in the sky now', 'is Venus visible from here tonight', 'sun altitude and azimuth at this location'.

Price$0.01per request
MethodPOST
Route/v1/data/solar-positions
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
dataastronomyplanetssunaltitudeazimuthephemerissky
API URLhttps://x402.hexl.dev/v1/data/solar-positions
Integration docs
Example request
{
  "date": "2024-06-21T12:00:00Z",
  "lat": 40.7,
  "lon": -74
}
Example response
{
  "date": "2024-06-21T12:00:00.000Z",
  "lat": 40.7,
  "lon": -74,
  "visibleCount": 6,
  "bodies": [
    {
      "body": "Sun",
      "altitude": 26.49,
      "azimuth": 80.94,
      "visible": true
    },
    {
      "body": "Mercury",
      "altitude": 18.2,
      "azimuth": 73.1,
      "visible": true
    }
  ]
}
Input schema
{
  "type": "object",
  "required": [
    "date",
    "lat",
    "lon"
  ],
  "properties": {
    "date": {
      "type": "string",
      "examples": [
        "2024-06-21T12:00:00Z"
      ]
    },
    "lat": {
      "type": "number",
      "examples": [
        40.7
      ]
    },
    "lon": {
      "type": "number",
      "examples": [
        -74
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}