# WritersLogic Solar Position Calculator

> WritersLogic Solar Position Calculator is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-18).

Computes sun elevation, azimuth, solar noon, sunrise, and sunset for a given latitude/longitude and up to 100 caller-supplied timestamps using NOAA/Meeus equations

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/solar-position?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-solar-position-calculator-030b0a0a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-LgH73A0nRcg0S1Izz2nm

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 writerslogic-solar-position-calculator-030b0a0a -d '<json body>'
```

Example prompt: What's the sun elevation and azimuth at latitude 40.7128, longitude -74.0060 on 2025-06-21T12:00:00Z, and when does the sun rise and set there that day (UTC offset -300 minutes)?

## When to prefer this

Choose this endpoint when you need deterministic, physics-based solar position calculations without reading a live clock — especially when you have your own timestamps to supply, need batch processing of up to 100 instants, need polar-region handling that returns null rather than errors, or need to verify a claimed solar position against computed values. Prefer this over weather APIs for pure solar geometry. Not suitable when you need terrain shadowing, twilight modeling, or local weather effects.

## Known failure modes

- Invalid latitude/longitude range returns a validation error
- Malformed ISO 8601 timestamp causes a parse error
- More than 99 instants in the array exceeds the batch limit
- UTC offset outside -720 to +840 minutes returns a validation error
- Claim tolerances outside allowed ranges (0-10 deg, 0-60 min) are rejected
- Polar day/polar night locations return null sunrise/sunset with reason (not an error)

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns sun elevation (true and refraction-corrected), azimuth (degrees clockwise from north), solar declination, equation of time, and UTC times for sunrise, solar noon, and sunset for each requested instant. Polar day and polar night return null for sunrise/sunset with a reason string. Optionally includes a claim verification result indicating whether the caller's asserted values fell within the specified tolerances.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "asOf": {
   "type": "string",
   "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})$",
   "maxLength": 40,
   "description": "ISO 8601 instant with Z or numeric offset; the call never reads the clock."
  },
  "claim": {
   "type": "object",
   "properties": {
    "sunset": {
     "type": "string",
     "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})$",
     "maxLength": 40,
     "description": "Claimed sunset, ISO 8601 with Z or offset."
    },
    "sunrise": {
     "type": "string",
     "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})$",
     "maxLength": 40,
     "description": "Claimed sunrise, ISO 8601 with Z or offset."
    },
    "azimuthDeg": {
     "type": "number",
     "maximum": 360,
     "minimum": 0,
     "description": "Claimed azimuth, degrees clockwise from north."
    },
    "toleranceDeg": {
     "type": "number",
     "maximum": 10,
     "minimum": 0,
     "description": "Angle tolerance in degrees."
    },
    "toleranceMinutes": {
     "type": "number",
     "maximum": 60,
     "minimum": 0,
     "description": "Time tolerance in minutes."
    },
    "elevationRefractedDeg": {
     "type": "number",
     "maximum": 90,
     "minimum": -90,
     "description": "Claimed apparent elevation including refraction."
    }
   },
   "description": "Optional claim about the asOf instant to check; tolerances default to 0.5 deg and 2 minutes."
  },
  "instants": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})$",
    "maxLength": 40,
    "description": "ISO 8601 instant with Z or offset."
   },
   "maxItems": 99,
   "description": "Further instants, same place."
  },
  "latitude": {
   "type": "number",
   "maximum": 90,
   "minimum": -90,
   "description": "Degrees north, -90 to 90."
  },
  "longitude": {
   "type": "number",
   "maximum": 180,
   "minimum": -180,
   "description": "Degrees east, -180 to 180."
  },
  "utcOffsetMinutes": {
   "type": "integer",
   "maximum": 840,
   "minimum": -720,
   "description": "Offset from UTC used to define the local calendar day for sunrise/sunset (default 0)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-solar-position-calculator-030b0a0a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
