# 2s.io Sky Tonight Almanac

> 2s.io Sky Tonight Almanac is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns a full observer-local sky almanac for any latitude/longitude and time, including Sun and Moon positions/events and all seven non-Earth planets' current sky positions and visibility

## Facts

- Endpoint: GET https://2s.io/api/space/sky-tonight
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-sky-tonight-almanac-19ad7f9a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gOZ478TDq63KkDMRSNkWk

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 2s-io-sky-tonight-almanac-19ad7f9a
```

Example prompt: What's up in the sky tonight from latitude 40.7128, longitude -74.0060? Give me the Sun's rise and set times, the Moon's phase and illumination, and which planets are currently above the horizon.

## When to prefer this

Choose this endpoint when you need precise, observer-specific astronomical data computed from first principles without requiring an API key or external astronomy service. Ideal for stargazing apps, astrophotography planning tools, or any agent that needs to answer 'what's in the sky right now?' for a specific location and time. Preferred over general astronomy APIs when sub-arcminute accuracy, no-key access, and comprehensive planet/moon/sun data in one call are all needed.

## Known failure modes

- Missing required lat/lon parameters returns a 400 error
- Latitude out of range (-90 to 90) returns a validation error
- Longitude out of range (-180 to 180) returns a validation error
- Invalid ISO timestamp format for 'at' parameter returns a parse error
- Payment failure or insufficient USDC balance blocks the request via x402
- Extreme polar latitudes may produce unusual or undefined rise/set times (e.g. polar night/day)

## How this service works

Observer-local sky almanac for any lat/lon and time (default now). Returns the Sun's next rise/set + current altitude/azimuth; the Moon's rise/set, current alt/az, phase angle, phase name (New → Full → Waning Crescent), illuminated fraction, and next moon quarter; and for all seven non-Earth planets (Mercury→Neptune): altitude, azimuth, RA/dec, distance (AU), apparent magnitude, and whether each is currently above the horizon. Computed from first principles (astronomy-engine, sub-arcminute) — no external service, no key. Stargazing, astrophotography planning, 'what's up right now', is-it-dark-yet. `at` accepts any ISO timestamp.

## Output

Returns a structured sky almanac including: Sun's next rise/set times and current altitude/azimuth; Moon's rise/set times, current altitude/azimuth, phase angle, phase name (e.g. Waning Crescent), illuminated fraction percentage, and next moon quarter; and for all seven non-Earth planets (Mercury through Neptune): altitude, azimuth, right ascension, declination, distance in AU, apparent magnitude, and a boolean indicating whether each is currently above the horizon.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "at": "2024-01-15T20:00:00Z",
   "lat": 40.7128,
   "lon": -74.006
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "lat",
      "lon"
     ],
     "properties": {
      "at": {
       "type": "string",
       "description": "Instant (ISO). Default: now."
      },
      "lat": {
       "type": "number",
       "maximum": 90,
       "minimum": -90
      },
      "lon": {
       "type": "number",
       "maximum": 180,
       "minimum": -180
      },
      "altitudeM": {
       "type": "number",
       "description": "Observer elevation in meters (default 0)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-sky-tonight-almanac-19ad7f9a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
