Our ephemeris database has a query engine that will return information from it. Here's how to use it. The interface is:
The query arguments are:
- d=date, a date in ISO standard format (see below)
- p=planet-list, the planet(s) you want to see
The date is a date in ISO standard format. This is a string of the form yyyy-mm-dd[Thh:mi:ss[+/-hh:mi]]. In this string, the separators '-' and ':' are optional, as are the parts in [brackets]. The parts of this string are:
- yyyy is a 4-digit year. Valid years for us are 1901 - 2099.
- mm is a 2-digit month, '01' - '12'.
- dd is a 2-digit day that is valid for the selected month.
If you provide a time, the required character T introduces it. Time is in 24-hour clock format:
- hh is a 2-digit hour, '00' - '23', where '00' is midnight and '12' is noon.
- mi is an optional 2-digit minute, '00' - '59'. (If you plan to provide seconds, minutes are required.)
- ss is an optional 2-digit second, '00' - '59'.
Times are interpreted as Coordinated Universal Time (UTC) unless you also provide a time zone offset. This is a string of the form +/-hh:mm, in which:
- + indicates a time east of the Greenwich meridian, meaning that the time is later than GMT/UTC.
- - indicates a time west of the Greenwich meridian, meaning that the time is earlier than GMT/UTC.
- hh is a 2-digit hour, '01' - '23'.
- mi is an optional 2-digit minute, '00', '15', '30', or '45'. (Yes, there really are time zones that use fractional times. For instance, CHADT = UTC+13:45.)
If you don't provide a time zone offset, the time is assumed to be UTC/GMT. If you don't provide a time at all, we use midnight UTC (00:00:00).
So, for example, if you wanted to see an ephemeris for Jan 2, 2012, at midnight PST, you could use d=2012-01-02T00:00-08:00. Again, '-' in the date and ':' in the time are optional but 'T' is required.
Important: If you provide an invalid time string, the system uses "now". If even one part of the date or time is invalid, the whole string is invalid.
The planet-list is a list of planets you want information for. If there is more than one name in the list, separate them with '+'. We recognize these planet names:
- sun, sol, shemesh
- moon, luna, levanah
- mercury, kokab
- venus, nogah
- mars, madim
- jupiter, tzedeq
- saturn, shabbathai
Values are returned as plain text in 'comma-separated value' (CSV) format. Except for the first line, each line has the form:
The first line is a status report. '200' is an 'OK' status. If that line is not '200', there was a problem with the request. Otherwise, the following lines contain information about the planets you asked for:
- PN is a 2-letter abbreviation of the planet name: SU=sun, MO=moon, ME=Mercury, VE=Venus, MA=Mars, JU=Jupiter, SA=Saturn, UR=Uranus, NE=Neptune, PL=Pluto.
- "longitude" is the planet's current longitude, surrounded by double quotes. Here, 0 degrees is 0° Aries; 30 degrees is 0° Taurus; etc., around to 320 degrees = 0° Pisces. (Unless you use sidereal astrology, in which case you know how to figure the angles for your signs.)
- "latitude" is the planet's current distance away from the equator. A positive number is north of the equator, a negative number is south.
- distance is the planet's current distance from the earth, expressed in astronomical units (AUs). The sun's average distance from the earth is 1 AU.
- "speed" is the planet's apparent speed through the sky, in degrees per day. A negative number means the planet is retrograde.
The numbers enclosed in "quotes" have the form
ddd:mm:ss.cc, where DDD=degrees,
MM=minutes, and SS.CC=seconds and centiseconds. We don't vouch for complete accuracy in
the seconds and centiseconds, but our source (Swiss Ephemeris) claims their database is
at least as accurate as traditional astrological databases.
Please note: this application contains code provided by Swiss Ephemeris. As such, it is licensed under the GNU GPL. Our modified source is available for download as a gzip'ed tar archive. We made it work on Mac OS X, then revised it to compile on CentOS. We have no idea if it will work anywhere else. You're welcome to adapt this source for your own use according to the terms of the GNU GPL. However, before you will be able to do anything useful with the source code, you'll also need to obtain some Swiss Ephemeris versions of NASA JPL ephemerides files. They're available from Swiss Ephemeris: