WritersLogic Verifiable AI Agent Hub Solar Position API
The Solar Position API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for solar position.
The Solar Position API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for solar position.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-solar-position-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: WritersLogic Verifiable AI Agent Hub Solar Position API
version: 2.0.0
description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
contact:
name: WritersLogic
url: https://writerslogic.com/agents
email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Solar Position
paths:
/api/v1/solar-position:
post:
operationId: solar_position
summary: Sun position, sunrise and sunset for a place and instant (NOAA equations)
description: 'Computes sun elevation, azimuth, declination, equation of time, sunrise, solar noon and sunset (UTC) for a latitude/longitude and up to 100 caller-supplied instants using the NOAA Global Monitoring Laboratory solar calculator equations (Meeus). Polar day and polar night return sunrise and sunset as null with a reason, not an error. Reads no clock: every instant comes from the caller. Does not model terrain, building shadows, twilight beyond the 90.833 deg sunrise zenith, or local weather; refraction is NOAA''s approximation. Accurate to about 1 minute within +-72 deg latitude, 10 minutes beyond.
Price: 0.005 USDC on Base (x402).'
x-x402-price-usdc: '0.005'
x-x402-amount: '5000'
x-payment-info:
protocols:
- x402
price:
mode: fixed
currency: USD
amount: '0.005'
x-audience: business
x-sample-url: https://agents.writerslogic.com/api/v1/samples/solar-position
security:
- x402: []
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- latitude
- longitude
- asOf
properties:
latitude:
type: number
description: Degrees north, -90 to 90.
minimum: -90
maximum: 90
longitude:
type: number
description: Degrees east, -180 to 180.
minimum: -180
maximum: 180
asOf:
type: string
maxLength: 40
description: ISO 8601 instant with Z or numeric offset; the call never reads the clock.
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})$
instants:
type: array
items:
type: string
maxLength: 40
description: ISO 8601 instant with Z or offset.
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})$
maxItems: 99
description: Further instants, same place.
utcOffsetMinutes:
type: integer
description: Offset from UTC used to define the local calendar day for sunrise/sunset (default 0).
minimum: -720
maximum: 840
claim:
type: object
description: Optional claim about the asOf instant to check; tolerances default to 0.5 deg and 2 minutes.
properties:
elevationRefractedDeg:
type: number
description: Claimed apparent elevation including refraction.
minimum: -90
maximum: 90
azimuthDeg:
type: number
description: Claimed azimuth, degrees clockwise from north.
minimum: 0
maximum: 360
sunrise:
type: string
maxLength: 40
description: Claimed sunrise, ISO 8601 with Z or offset.
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})$
sunset:
type: string
maxLength: 40
description: Claimed sunset, ISO 8601 with Z or offset.
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})$
toleranceDeg:
type: number
description: Angle tolerance in degrees.
minimum: 0
maximum: 10
toleranceMinutes:
type: number
description: Time tolerance in minutes.
minimum: 0
maximum: 60
example:
latitude: 40
longitude: -105
asOf: '2010-06-21T15:06:00Z'
utcOffsetMinutes: -420
responses:
'200':
description: Paid result with provenance
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
status:
type: string
enum:
- pass
- fail
- unknown
- unsupported
description: 'pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.'
results:
type: array
items:
type: object
properties:
instant:
type: string
localDate:
type: string
description: Calendar date at the caller's utcOffsetMinutes.
declinationDeg:
type: number
equationOfTimeMinutes:
type: number
hourAngleDeg:
type: number
zenithDeg:
type: number
elevationDeg:
type: number
description: Geometric elevation, no refraction.
refractionDeg:
type: number
elevationRefractedDeg:
type: number
description: Elevation plus NOAA's approximate refraction.
azimuthDeg:
anyOf:
- type: number
- type: 'null'
description: Degrees clockwise from north, or null at the poles where it is undefined.
dayKind:
type: string
enum:
- normal
- polar_day
- polar_night
sunriseUtc:
anyOf:
- type: string
- type: 'null'
description: ISO UTC instant, or null on polar day/night.
solarNoonUtc:
type: string
sunsetUtc:
anyOf:
- type: string
- type: 'null'
description: ISO UTC instant, or null on polar day/night.
daylightMinutes:
type: number
description: 0 on polar night, 1440 on polar day.
reason:
type: string
description: polar_day or polar_night when sunrise and sunset are null.
description: One entry per instant, asOf first.
engine:
type: string
witnesses:
type: array
items:
type: object
properties:
ruleId:
type: string
detail:
type: string
path:
type: string
description: JSON pointer or dotted path into the input.
offset:
type: integer
index:
type: integer
expected:
description: What the rule required.
actual:
description: What the input had.
versions:
type: object
description: Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limits:
type: array
items:
type: string
deterministic:
type: boolean
description: 'Always true: pure code, no model.'
_provenance:
type: object
description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
required:
- data
- _provenance
'400':
description: Invalid request (no payment consumed)
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'401':
description: Invalid X-API-KEY
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'402':
description: Payment required or invalid
content:
application/json:
schema:
type: object
description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
properties:
x402Version:
type: integer
error:
type: string
code:
type: string
resource:
type: object
accepts:
type: array
items:
type: object
extensions:
type: object
'502':
description: Upstream failure; the payment is released or not settled
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
tags:
- Solar Position
components:
securitySchemes:
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: x402 v2 payment payload (base64) sent after a 402 challenge
apiKey:
type: apiKey
in: header
name: X-API-KEY