thirdtrail

v1.0.0
io.github.thirdtrail/thirdtrail Checked 3 days ago Published 2 months ago

Elevation-corrected sun, moon, twilight, solar and tide data for any point on Earth

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_sun_moon_times Sun and moon times

Sunrise, sunset, solar noon, civil, nautical and astronomical twilight, golden and blue hour, moonrise, moonset and moon phase for a location, one entry per day. Use it for any question about when the sun or moon rises, sets or gets dark; for the sun's angle at a given moment use get_solar_position, and for tides alongside the sun use get_tide_window. Pass elevation whenever you know it: it shifts sunrise and sunset at altitude. Defaults: from today, 7 days or the plan's limit if lower. Requires an API key on a paid Ephemerides plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
daysintegerNumber of days to return. The ceiling is plan-dependent.
elevationnumberMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero…
start_datestringFirst day as YYYY-MM-DD. Defaults to today.
tzstringIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.

get_prayer_times Islamic prayer times

Fajr, sunrise, dhuhr, asr, maghrib and isha for one date at a location, elevation-corrected. Use it for Islamic prayer schedules; for general sunrise, sunset and twilight use get_sun_moon_times. school is required and sets the fajr and isha rules; asr_method picks the shadow rule and defaults to shafi. date defaults to today. Requires an API key on a paid Ephemerides plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
school *stringCalculation school: mwl (Muslim World League), isna (Islamic Society of North America), egyptian (Egyptian General Authority of Survey), karachi (University of Islamic Sciences, Karachi), uaq (Umm al-…
asr_methodstringAsr shadow rule: shafi (default; also Maliki and Hanbali) or hanafi, which gives a later Asr.
datestringDay as YYYY-MM-DD. Defaults to today.
elevationnumberMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero…
tzstringIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.

get_solar_position Solar position and irradiance

The sun's position at one instant: azimuth, altitude, zenith, declination, hour angle and equation of time, plus clear-sky irradiance (GHI, DNI and DHI in W/m²) when include asks for it and the plan covers it. Use it for where the sun is at a given moment; for its track through a whole day use get_solar_path, and for rise and set times use get_sun_moon_times. timestamp defaults to now. Positions are NREL SPA-equivalent on JPL DE421; irradiance comes from the Bird clear-sky model. Requires an API key on a paid Solar plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
elevationnumberMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero…
includestringposition (default) or position,irradiance.
timestampstringISO 8601 instant, e.g. 2026-06-21T12:00:00Z. Defaults to now.
tzstringIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.

get_solar_path Solar path for a day

The sun's azimuth and altitude through one UTC day, sampled every interval: a list of timestamped positions. Use it for shading studies, PV siting and panel-angle planning; for a single instant use get_solar_position. date defaults to today and interval to 15m. Requires an API key on a paid Solar plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
datestringUTC day as YYYY-MM-DD. Defaults to today.
elevationnumberMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero…
intervalstringSampling step. Defaults to 15m.

get_daily_light_integral Daily light integral

Clear-sky Daily Light Integral in mol/m²/day for each day in a range: photosynthetically active radiation integrated from sunrise to sunset. Use it to plan crop growth or supplemental greenhouse lighting; it assumes cloudless skies, so treat it as the ceiling for the site. Pass from and to together for a range of UTC days, or neither for today. Requires an API key on a paid Solar plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
elevationnumberMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero…
fromstringFirst UTC day, YYYY-MM-DD. Requires to.
tostringLast UTC day, YYYY-MM-DD. Requires from.

get_tide_extremes High and low tides

High and low water times and heights at any coastal point, from the FES2022 global tide atlas: a list of events, each with type (high or low), time and height_m. Use it for when high or low tide is; for a continuous curve use get_tide_heights, and for tides together with sunrise, golden hour and moon phase use get_tide_window. Heights are metres relative to MEAN SEA LEVEL, not chart datum — never use for navigation. Defaults: from today, 2 days or the plan's limit if lower. Requires an API key on a paid Tides plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
daysintegerNumber of days to return. The ceiling is plan-dependent.
start_datestringFirst day as YYYY-MM-DD. Defaults to today.
tzstringIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.

get_tide_heights Tide height series

Water height at a coastal point at a fixed step: a list of time and height_m pairs. Use it to plot a tide curve or read the height at a particular time; for just the highs and lows use get_tide_extremes. Metres relative to mean sea level, not chart datum. Defaults: from today, 2 days, and the finest step the plan allows, but no finer than 10m. Requires an API key on a paid Tides plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
daysintegerNumber of days to return. The ceiling is plan-dependent.
start_datestringFirst day as YYYY-MM-DD. Defaults to today.
stepstringSampling interval. Finer steps need a higher plan.
tzstringIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.

get_tide_window Coastal planning window

Per day: high and low waters together with sunrise, sunset, golden and blue hour, twilight and moon phase in a single call. The planning tool for coastal photography, fishing and shore work; use it instead of calling get_tide_extremes and get_sun_moon_times separately. Pass elevation when you know it: it shifts the sun and moon times — roughly three minutes at clifftop height — but never the tide heights, which do not depend on where the observer stands. Defaults: from today, 2 days or the plan's limit if lower. Requires an API key on a paid Tides plan.

ParameterTypeDescription
lat *numberLatitude in decimal degrees.
lon *numberLongitude in decimal degrees.
daysintegerNumber of days to return. The ceiling is plan-dependent.
elevationnumberMetres. For sun and moon times this is the observer's height above the horizon they look across: on a sea cliff or island peak, their height above sea level; on a plateau or in a valley, close to zero…
start_datestringFirst day as YYYY-MM-DD. Defaults to today.
tzstringIANA timezone for output timestamps, e.g. Europe/Dublin. Defaults to UTC.