Rise, transit, set and lower transit for any named object, with an explicit status at every latitude
Rise, transit, set and lower transit for any named object, with an explicit status at every latitude. Formats: json, csv. Example: GET /v2/rise-set?body=moon&at=2026-12-21&lat=69.6492&lon=18.9553&tz=Europe/Oslo
Request
- Base URL: https://www.cyclecalcs.com
- URL: https://www.cyclecalcs.com/v2/rise-set
- Auth: one of:
- none
- API key in header X-RapidAPI-Key
Query parameters
A single target: one of sun, moon, mercury, venus, earth, mars, jupiter, saturn, uranus, neptune, pluto, star:<name> or hr:<n> for a named star (one of 80: the 57 navigational stars of the Nautical Almanac, Polaris, and the IAU-named stars of V 3.0 or brighter within 10.3 deg of the ecliptic, listed at /v2/enums?set=stars; names match on letters and digits, so star:kaus_australis works; proper motion is applied to the date), or radec:<ra>,<dec>[,j2000] for a fixed celestial point (right ascension in decimal hours, declination in decimal degrees). Mutually exclusive with bodies.
A comma-separated list of targets, up to 20: any of sun, moon, mercury, venus, earth, mars, jupiter, saturn, uranus, neptune, pluto, star:<name> or hr:<n> for a named star (one of 80: the 57 navigational stars of the Nautical Almanac, Polaris, and the IAU-named stars of V 3.0 or brighter within 10.3 deg of the ecliptic, listed at /v2/enums?set=stars; names match on letters and digits, so star:kaus_australis works; proper motion is applied to the date), or radec:<ra>,<dec>[,j2000] entries. Mutually exclusive with body.
The instant to evaluate. ISO 8601: a date (2026-06-21), or a date and time with an optional seconds, fraction and either Z or a numeric UTC offset (+hh:mm, no seconds). No offset and no tz reads as UTC. Or jd: followed by a Julian Day on the UT scale, read as UTC whatever tz says: jd:2461000.5 is 2025-11-21T00:00:00Z. Reliable from 1700 to 2200.
The start of a range query, inclusive. ISO 8601: a date (2026-06-21), or a date and time with an optional seconds, fraction and either Z or a numeric UTC offset (+hh:mm, no seconds). No offset and no tz reads as UTC. Or jd: followed by a Julian Day on the UT scale, read as UTC whatever tz says: jd:2461000.5 is 2025-11-21T00:00:00Z. Reliable from 1700 to 2200.
The end of a range query. On this endpoint end does not bound a row, it bounds a day. Every local day that BEGINS before end is returned, so the last row can begin before end and finish after it. Every endpoint's rule is published as data under limits.range_boundaries in /v2/conventions. ISO 8601: a date (2026-06-21), or a date and time with an optional seconds, fraction and either Z or a numeric UTC offset (+hh:mm, no seconds). No offset and no tz reads as UTC. Or jd: followed by a Julian Day on the UT scale, read as UTC whatever tz says: jd:2461000.5 is 2025-11-21T00:00:00Z. Reliable from 1700 to 2200.
Latitude in decimal degrees, north positive. No compass suffix (do not append N or S). Required together with lon, or neither.
Longitude in decimal degrees, east positive. No compass suffix (do not append E or W). Required together with lat, or neither.
Observer elevation above mean sea level, in metres. Raises the observer on a locally flat plateau; sea-horizon dip is not modeled.
A place name (place=London), a name with a country (place=Cambridge,GB), or a stable identifier from GET /v2/places (place=id:us-n35198-w111651). Supplies lat, lon and, unless tz is also sent, the time zone. Mutually exclusive with sending lat and lon directly. Withheld unless GET /v2 reports capabilities.place_lookup true.
best guesses the intended place when a name is ambiguous and reports the guess as a warning. error refuses an ambiguous name with 400 AMBIGUOUS_PLACE and the candidates in supported. Only meaningful with place.
An IANA time zone name, for example Europe/London or America/Chicago. Numeric offsets and abbreviations are not accepted. Governs how a date-only or offset-free at/start/end is read, and how local instants are rendered when time_format=iso. Before 1970 the tz database records the history of a zone for its principal location only, and some names are links to another zone: the tz_source_boundary_1970 warning names whose history was used, and tzdb_lmt_interval marks a local mean time. Neither changes an offset.
How to resolve a local time that a clock repeated, such as the return from daylight saving. error refuses with 409 AMBIGUOUS_LOCAL_TIME.
How to resolve a local time that never happened, such as inside a spring-forward gap. error refuses with 400 NONEXISTENT_LOCAL_TIME.
civil: Local midnight in the effective IANA zone, with the historical offset for that date. solar: Local mean solar midnight implied by longitude alone. No timezone, no DST. utc: UTC midnight of the resolved UTC calendar date.
Overrides the rise/set event altitude, in degrees, replacing the standard -0.8333 deg (or the body's own definition). Disclosed with a warning.
How far past the requested window to keep searching for the next real event, in days, when none falls inside the window (for example, through a polar night).
How instants are rendered: iso for ISO 8601 strings carrying the effective offset, or unix for integer seconds since the epoch. An ISO offset has no seconds field, so an instant in a pre-1972 local mean time era whose offset has seconds (Moscow +02:30:17 until 1916) is written in UTC with a Z; utc_offset_seconds stays exact, utc_offset_iso rounds it to the nearest minute, and the tzdb_lmt_interval warning says so.
Response representation. Each endpoint serves a subset of json, csv and txt; see that operation's description for the exact list, or GET /v2 for every endpoint's formats array. An unsupported value is 400 BAD_FORMAT with the accepted list in supported.
Comma-separated dot paths into data (for example moon.phase_name,moon.illumination) so only those fields are returned. Up to 64 paths; an array element is addressed by its object key, never by index.
nested returns the documented object tree. flat returns one object with dotted keys, format=json only.
Decimal places for numeric fields.
Whether the JSON body is indented (1) or compact (0). Has no effect on csv or txt.
full includes prose notes, frame definitions and withheld-field reasons in meta. compact keeps every value and every machine-readable name and drops the prose.
See the endpoint description at /api/reference.html.
An opaque, unsigned pagination token copied verbatim from a previous response's links.next. Never construct one by hand; a malformed or foreign cursor is 400 BAD_CURSOR.
Response
The answer.
Example response
{
"endpoint": "/v2/sun",
"computed_at": "2026-08-01T00:00:00.000Z",
"links": {
"self": "https://www.cyclecalcs.com/v2/sun?at=2026-06-21&lat=51.4778&lon=-0.0015",
"docs": "https://www.cyclecalcs.com/api/reference.html#sun",
"spec": "https://www.cyclecalcs.com/v2/openapi.json",
"page": "https://www.cyclecalcs.com/sunrise-sunset-calculator.html",
"explain": "https://www.cyclecalcs.com/learn/seasons.html"
},
"attribution": "Computed by CycleCalcs (cyclecalcs.com) with the MIT-licensed Astronomy Engine. Positional astronomy only.",
"docs": "https://www.cyclecalcs.com/api/reference.html#sun"
}Changes
No recorded changes to this operation across all 1 revision of this API.