GeoAstro API (1.0.0)

Download OpenAPI specification:

GeoAstro API is a high‑precision astronomy REST API that delivers professional‑grade Sun, Moon and planet data for any location and date. It provides accurate rise, set and meridian transits, civil/nautical/astronomical twilight, golden hour and blue hour intervals, as well as detailed Moon phases, illumination, bright‑limb orientation and daily/monthly astro calendars. For planets, it exposes apparent positions, visual magnitude and visibility windows with a synthetic visibility score, helping you find the best observing or photography conditions. All responses are timezone‑aware, support sea‑level or custom observer altitude and are returned as clean JSON, making GeoAstro API ideal for mobile apps, web dashboards, weather services, photography planners and astronomy tools

Get Sun transit events

Returns sunrise, sunset, twilights and meridian transits for the Sun for a specific day and location. The day is identified by a start-of-day Unix timestamp (seconds).

query Parameters
timestamp
required
string
Example: timestamp=1707004800

Start-of-day timestamp (Unix seconds). Events for the following 24 hours will be returned. Typically midnight UTC of the desired day.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 for standard almanac-like sunrise/sunset times at sea level; non-zero values adjust rise/set and transits for the actual local horizon of the observer (e.g. on a hill or mountain).

Responses

Response samples

Content type
application/json
{
  • "rise": {
    },
  • "set": {
    },
  • "civilTwilight": {
    },
  • "nauticalTwilight": {
    },
  • "astronomicalTwilight": {
    },
  • "transits": {
    }
}

Get Sun apparent position

Returns the apparent azimuth and altitude of the Sun for the given time and observer location.

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 if you want times comparable to typical almanacs and weather apps (sea-level horizon); non-zero values give topocentric times for your real observing altitude.

Responses

Response samples

Content type
application/json
{
  • "position": 145.3,
  • "altitude": 25.8
}

Get Sun summary for a location

Professional-grade Sun summary for a given instant and location: current apparent position plus sunrise, sunset, twilights and meridian transits for the local day (in the provided timezone).

query Parameters
timestamp
required
string
Example: timestamp=1707032400

Reference timestamp (Unix seconds, typically "now" in UTC). The local calendar day in the given timezone containing this timestamp will be used to compute transit events.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. 0 means a sea-level observer (standard almanac horizon); higher values slightly advance sunrise and delay sunset according to the local horizon.

timezone
required
string
Example: timezone=America/New_York

IANA timezone identifier for the observer location (e.g. "Europe/Rome", "America/New_York"). It defines what "today" means when computing sunrise, sunset and twilights.

Responses

Response samples

Content type
application/json
{
  • "timestamp": 1707032400,
  • "timezone": "America/New_York",
  • "dayStartTimestamp": 1707004800,
  • "dayEndTimestamp": 1707091200,
  • "location": {
    },
  • "position": {
    },
  • "transits": {
    },
  • "goldenHours": [
    ],
  • "blueHours": [
    ]
}

Get Moon illuminated fraction

Returns the illuminated fraction of the Moon for a given timestamp.

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

Responses

Response samples

Content type
application/json
{
  • "illumination": 0.54
}

Get Moon transit events

Returns rise, set and meridian transits for the Moon for a specific day and location. The day is identified by a start-of-day Unix timestamp (seconds).

query Parameters
timestamp
required
string
Example: timestamp=1707004800

Start-of-day timestamp (Unix seconds). Events for the following 24 hours will be returned. Typically midnight UTC of the desired day.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 for standard sea-level rise/set times comparable to printed almanacs; non-zero values adjust Moon rise/set and transits for the actual local horizon of the observer.

Responses

Response samples

Content type
application/json
{
  • "rise": {
    },
  • "set": {
    },
  • "transits": {
    }
}

Get Moon apparent position

Returns the apparent azimuth and altitude of the Moon for the given time and observer location.

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. 0 means a sea-level observer (standard horizon as in most almanacs); higher values compute topocentric Moon rise/set and transits for your true observing altitude.

Responses

Response samples

Content type
application/json
{
  • "position": 145.3,
  • "altitude": 25.8
}

Get Moon phase angle

Returns the geometric phase angle of the Moon for a given timestamp, plus a derived phaseId and phaseName describing the current lunar phase (new, crescent, quarter, gibbous, full).

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

Responses

Response samples

Content type
application/json
{
  • "phaseAngle": 123.4,
  • "phaseId": 4,
  • "phaseName": "waxing-gibbous"
}

Get Moon illumination and phase info

Returns detailed illumination and phase information for the Moon: illuminated fraction, geometric phase angle and a derived phaseId/phaseName.

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

Responses

Response samples

Content type
application/json
{
  • "illuminatedFraction": 0.54,
  • "phaseAngle": 123.4,
  • "phaseId": 4,
  • "phaseName": "waxing-gibbous"
}

Get Moon summary for a location

Professional-grade Moon summary for a given instant and location: current position, illumination and phase plus rise/set and meridian transits for the local day (in the provided timezone), and bright limb angle to orient the illuminated side.

query Parameters
timestamp
required
string
Example: timestamp=1707032400

Reference timestamp (Unix seconds, typically "now" in UTC). The local calendar day in the given timezone containing this timestamp will be used to compute rise/set and transits.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 if you want rise/set times comparable to typical almanacs; non-zero values slightly advance Moonrise and delay Moonset according to the local horizon at your altitude.

timezone
required
string
Example: timezone=America/New_York

IANA timezone identifier for the observer location (e.g. "Europe/Rome", "America/New_York"). It defines what "today" means when computing rise/set and meridian transits.

Responses

Response samples

Content type
application/json
{
  • "timestamp": 1707032400,
  • "timezone": "America/New_York",
  • "dayStartTimestamp": 1707004800,
  • "dayEndTimestamp": 1707091200,
  • "location": {
    },
  • "position": {
    },
  • "illumination": {
    },
  • "brightLimbAngleZenithDeg": 135,
  • "transits": {
    }
}

Get bright limb position angle

Returns the position angle of the Moon bright limb with respect to the local zenith for the given location. The angle is measured from the zenith and increases clockwise as seen by the observer: 0° means the illuminated side points straight up, 90° to the right, 180° downwards and 270° to the left. This is useful to orient a Moon image in a UI; if your rendering system defines positive rotations as counter‑clockwise, you can usually rotate your base Moon sprite by (360° - angle) degrees around its centre.

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

Responses

Response samples

Content type
application/json
{
  • "angle": 45.6
}

Get next Moon phases

Returns a list of upcoming Moon phases (new, first quarter, full, last quarter) starting from a given timestamp, searching roughly the next 30 days.

query Parameters
timestamp
required
string
Example: timestamp=1707000000

Start timestamp (Unix seconds). The API will return the next Moon phases occurring in the following ~30 days.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get planet transit events

Returns rise, set and meridian transits for a selected planet for a specific day and location. The day is identified by a start-of-day Unix timestamp (seconds).

query Parameters
planet
required
string
Example: planet=jupiter

Planet name (case-insensitive): mercury, venus, mars, jupiter, saturn, uranus or neptune.

timestamp
required
string
Example: timestamp=1707004800

Start-of-day timestamp (Unix seconds). Events for the following 24 hours will be returned. Typically midnight UTC of the desired day.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. 0 means a sea-level observer (standard horizon as in most almanacs); higher values adjust rise/set and transits for the actual local horizon.

Responses

Response samples

Content type
application/json
{
  • "rise": {
    },
  • "set": {
    },
  • "transits": {
    }
}

Get planet apparent position

Returns the apparent azimuth and altitude of a selected planet for the given time and observer location.

query Parameters
planet
required
string
Example: planet=jupiter

Planet name (case-insensitive): mercury, venus, mars, jupiter, saturn, uranus or neptune.

timestamp
required
string
Example: timestamp=1707000000

Timestamp (Unix seconds)

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 if you want positions comparable to standard ephemerides at sea level; non-zero values give fully topocentric positions for your real observing altitude.

Responses

Response samples

Content type
application/json
{
  • "position": 145.3,
  • "altitude": 25.8,
  • "magnitude": -2.6,
  • "visibilityScore": 78
}

Get daily planet visibility windows

Evaluates, for a specific day and location, when a selected planet is above the horizon and when it is well observable (planet above ~15° with the Sun below -12°).

query Parameters
planet
required
string
Example: planet=jupiter

Planet name (case-insensitive): mercury, venus, mars, jupiter, saturn, uranus or neptune.

timestamp
required
string
Example: timestamp=1707004800

Start-of-day timestamp (Unix seconds). Visibility will be evaluated for the following 24 hours. Typically midnight UTC of the desired day.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. 0 means a sea-level observer (standard horizon); higher values adjust visibility windows using the true local horizon at that altitude.

Responses

Response samples

Content type
application/json
{
  • "dayStartTimestamp": 1707004800,
  • "dayEndTimestamp": 1707091200,
  • "planet": "jupiter",
  • "location": {
    },
  • "sampling": {
    },
  • "aboveHorizonIntervals": [
    ],
  • "observableIntervals": [
    ],
  • "bestObservableMoment": {
    },
  • "visibilityScore": 82
}

List supported planets

Returns the list of planet names supported by this API.

Responses

Response samples

Content type
application/json
{
  • "planets": [
    ]
}

Get equinoxes and solstices

Returns timestamps for equinoxes and solstices for the given calendar year, plus a mapping by seasons for both hemispheres.

query Parameters
year
required
string
Example: year=2024

Calendar year (UTC) for which to compute equinoxes and solstices

Responses

Response samples

Content type
application/json
{
  • "northwardEquinoxTimestamp": 1711044000,
  • "northernSolsticeTimestamp": 1719057600,
  • "southwardEquinoxTimestamp": 1727359200,
  • "southernSolsticeTimestamp": 1735160400,
  • "northernHemisphere": {
    },
  • "southernHemisphere": {
    }
}

Get daily astro calendar

Returns, in a single payload, the main Sun and Moon events for a specific day and location: sunrise/sunset, twilights, Moon phases of the day, illumination, maximum Moon altitude and approximate golden/blue hour intervals.

query Parameters
timestamp
required
string
Example: timestamp=1707004800

Start-of-day timestamp (Unix seconds). Events for the following 24 hours will be returned. Typically midnight UTC of the desired day.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 for standard sea-level times comparable to printed almanacs; non-zero values adjust Sun and Moon rise/set and transits for the actual local horizon of the observer.

Responses

Response samples

Content type
application/json
{
  • "dayStartTimestamp": 1707004800,
  • "dayEndTimestamp": 1707091200,
  • "location": {
    },
  • "sun": {
    },
  • "moon": {
    },
  • "goldenHours": [
    ],
  • "blueHours": [
    ]
}

Get daily golden and blue hour intervals

Returns only the golden hour and blue hour intervals for a specific day and location, classified as morning (dawn) or evening (dusk).

query Parameters
timestamp
required
string
Example: timestamp=1707004800

Start-of-day timestamp (Unix seconds). Intervals for the following 24 hours will be returned. Typically midnight UTC of the desired day.

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 for standard sea-level times comparable to printed almanacs; non-zero values adjust golden/blue hour intervals for the true local horizon at that altitude.

Responses

Response samples

Content type
application/json
{
  • "dayStartTimestamp": 1707004800,
  • "dayEndTimestamp": 1707091200,
  • "location": {
    },
  • "goldenHours": [
    ],
  • "blueHours": [
    ]
}

Get monthly Sun calendar

Returns, for each day of a given month and location, the main Sun transit events (sunrise, sunset, twilights and meridian transits).

query Parameters
year
required
string
Example: year=2024

Calendar year (UTC) for which to compute the monthly Sun calendar.

month
required
string
Example: month=3

Calendar month number (1-12).

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 for standard sea-level times comparable to printed almanacs; non-zero values adjust Sun rise/set and transits for the actual local horizon.

Responses

Response samples

Content type
application/json
{
  • "year": 2024,
  • "month": 3,
  • "location": {
    },
  • "days": [
    ]
}

Get monthly Moon calendar

Returns, for each day of a given month and location, the main Moon transit events (moonrise, moonset and meridian transits), plus phase information (including illuminated fraction) evaluated at noon.

query Parameters
year
required
string
Example: year=2024

Calendar year (UTC) for which to compute the monthly Moon calendar.

month
required
string
Example: month=3

Calendar month number (1-12).

lat
required
string
Example: lat=41.9028

Latitude in degrees (-90..90)

lng
required
string
Example: lng=12.4964

Longitude in degrees (-180..180)

height
required
string
Example: height=0

Observer height above sea level in meters. Use 0 for standard sea-level times comparable to printed almanacs; non-zero values adjust Moon rise/set and transits for the actual local horizon.

Responses

Response samples

Content type
application/json
{
  • "year": 2024,
  • "month": 3,
  • "location": {
    },
  • "days": [
    ]
}