{"id":"solar-position","title":"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.","roi":"Answers 'is it daylight / where is the sun / when is golden hour' exactly and verifiably, with a published method an agent can cite.","audience":"business","package":"physical-ops-kit","channels":["x402","mcp"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/solar-position","path":"/api/v1/solar-position","contentType":"application/json"},"price":{"amount":"0.005","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"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}}}}},"resultSchema":{"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."}}},"outputSchema":{"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"]},"example":{"latitude":40,"longitude":-105,"asOf":"2010-06-21T15:06:00Z","utcOffsetMinutes":-420},"openapiOperation":{"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.\n\nPrice: 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"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/solar-position/","docsJson":"https://agents.writerslogic.com/docs/solar-position.json","sample":"https://agents.writerslogic.com/api/v1/samples/solar-position","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}