Back to Docs

Ephemeris

Ephemeris

POST/api/v1/ephemeris/calculate

Query planetary positions for a single timestamp or a full date range with configurable steps, astrologer-grade metadata, optional aspects, and table output designed for calendars, exports, and month-by-month ephemeris views.

Full URL

https://api.freeastroapi.com/api/v1/ephemeris/calculate

A convenience GET /api/v1/ephemeris alias is also available for query-string workflows.

Monthly Grid Example

This is the clearest way to understand what table_style=grid returns: one row per day, one column per body, with formatted positions ready for a frontend calendar or export view.

DateWeekdaySid.tSunMoonMercuryVenusMarsJupiterSaturn
1Sun10:35:1610°24' Pis09°07' Leo21°58' Pis Rx23°13' Pis28°45' Aqu15°15' Can Rx01°43' Ari
2Mon10:39:1211°25' Pis22°53' Leo21°28' Pis Rx24°28' Pis29°32' Aqu15°13' Can Rx01°51' Ari
3Tue10:43:0912°25' Pis06°25' Vir20°50' Pis Rx25°42' Pis00°19' Pis15°12' Can Rx01°58' Ari
4Wed10:47:0513°25' Pis19°43' Vir20°05' Pis Rx26°57' Pis01°06' Pis15°10' Can Rx02°05' Ari
5Thu10:51:0214°25' Pis02°44' Lib19°15' Pis Rx28°12' Pis01°54' Pis15°09' Can Rx02°12' Ari
6Fri10:54:5915°25' Pis15°28' Lib18°19' Pis Rx29°27' Pis02°41' Pis15°08' Can Rx02°20' Ari
7Sat10:58:5516°25' Pis27°56' Lib17°20' Pis Rx00°41' Ari03°28' Pis15°07' Can Rx02°27' Ari
8Sun11:02:5217°25' Pis10°10' Sco16°20' Pis Rx01°56' Ari04°16' Pis15°06' Can Rx02°34' Ari
9Mon11:06:4818°25' Pis22°14' Sco15°19' Pis Rx03°10' Ari05°03' Pis15°06' Can Rx02°41' Ari
10Tue11:10:4519°25' Pis04°10' Sag14°19' Pis Rx04°25' Ari05°50' Pis15°05' Can Rx02°49' Ari
11Wed11:14:4120°25' Pis16°03' Sag13°22' Pis Rx05°40' Ari06°37' Pis15°05' Can Rx02°56' Ari
12Thu11:18:3821°25' Pis27°57' Sag12°28' Pis Rx06°54' Ari07°25' Pis15°05' Can03°04' Ari
13Fri11:22:3422°25' Pis09°57' Cap11°38' Pis Rx08°09' Ari08°12' Pis15°06' Can03°11' Ari
14Sat11:26:3123°25' Pis22°09' Cap10°53' Pis Rx09°23' Ari08°59' Pis15°06' Can03°18' Ari
15Sun11:30:2824°25' Pis04°35' Aqu10°14' Pis Rx10°38' Ari09°46' Pis15°07' Can03°26' Ari
16Mon11:34:2425°24' Pis17°19' Aqu09°41' Pis Rx11°52' Ari10°34' Pis15°08' Can03°33' Ari
17Tue11:38:2126°24' Pis00°24' Pis09°14' Pis Rx13°06' Ari11°21' Pis15°09' Can03°41' Ari
18Wed11:42:1727°24' Pis13°51' Pis08°54' Pis Rx14°21' Ari12°08' Pis15°10' Can03°48' Ari
19Thu11:46:1428°24' Pis27°39' Pis08°39' Pis Rx15°35' Ari12°55' Pis15°11' Can03°56' Ari
20Fri11:50:1029°23' Pis11°44' Ari08°31' Pis Rx16°49' Ari13°42' Pis15°13' Can04°03' Ari
21Sat11:54:0700°23' Ari26°03' Ari08°30' Pis18°04' Ari14°30' Pis15°15' Can04°10' Ari
22Sun11:58:0301°23' Ari10°30' Tau08°34' Pis19°18' Ari15°17' Pis15°17' Can04°18' Ari
23Mon12:02:0002°22' Ari24°59' Tau08°43' Pis20°32' Ari16°04' Pis15°19' Can04°25' Ari
24Tue12:05:5703°22' Ari09°26' Gem08°58' Pis21°46' Ari16°51' Pis15°21' Can04°33' Ari
25Wed12:09:5304°21' Ari23°45' Gem09°18' Pis23°00' Ari17°38' Pis15°24' Can04°40' Ari
26Thu12:13:5005°21' Ari07°55' Can09°43' Pis24°15' Ari18°25' Pis15°27' Can04°48' Ari
27Fri12:17:4606°20' Ari21°52' Can10°13' Pis25°29' Ari19°12' Pis15°30' Can04°55' Ari
28Sat12:21:4307°19' Ari05°36' Leo10°47' Pis26°43' Ari19°59' Pis15°33' Can05°03' Ari
29Sun12:25:3908°19' Ari19°08' Leo11°25' Pis27°57' Ari20°46' Pis15°36' Can05°10' Ari
30Mon12:29:3609°18' Ari02°27' Vir12°07' Pis29°11' Ari21°33' Pis15°39' Can05°18' Ari
31Tue12:33:3210°17' Ari15°34' Vir12°53' Pis00°25' Tau22°20' Pis15°43' Can05°25' Ari

Choose JSON

Use format=json when you want a single snapshot or a machine-friendly range response for app logic.

Choose Rows / Columns

Use table_style=rows or columns when you need larger exports, CSV-style processing, or custom UI transforms.

Choose Grid

Use table_style=grid when you want a month-style ephemeris table with weekday and sidereal time built in.

Most Common Requests

curl -X POST "https://api.freeastroapi.com/api/v1/ephemeris/calculate" \
 -H "Content-Type: application/json" \
 -H "x-api-key: YOUR_API_KEY" \
 -d '{
   "start": "2026-03-01T00:00:00Z",
   "bodies": ["Sun", "Moon", "Mercury"],
   "include_moon_void_of_course": true,
   "fixed_stars": ["Spica", "Regulus"]
 }'
curl -G "https://api.freeastroapi.com/api/v1/ephemeris" \
 -H "x-api-key: YOUR_API_KEY" \
 --data-urlencode "start=2026-03-01T00:00:00Z" \
 --data-urlencode "end=2026-03-31T00:00:00Z" \
 --data-urlencode "step=1d" \
 --data-urlencode "response_mode=table" \
 --data-urlencode "table_style=grid" \
 --data-urlencode "bodies=Sun,Moon,Mercury,Venus,Mars,Jupiter,Saturn,Uranus,Neptune,Pluto,Chiron,True_Lilith"
curl -G "https://api.freeastroapi.com/api/v1/ephemeris" \
 -H "x-api-key: YOUR_API_KEY" \
 --data-urlencode "start=2026-03-14T04:00:00Z" \
 --data-urlencode "end=2026-03-14T08:00:00Z" \
 --data-urlencode "step=5m" \
 --data-urlencode "bodies=Moon,Sun"

Key parameters

ParameterTypeReqDescription
startstringYesRequired ISO datetime. If only start is provided, the endpoint returns a single snapshot for that moment.
endstringNoOptional ISO datetime for range queries. Must be greater than or equal to start.
stepstringNoWhole minute/hour/day interval such as 1m, 5m, 15m, 1h, 6h, 1d, or 7d. Default: 1d.
citystringNoPOST only. Works like natal: if provided without lat/lng, the backend resolves coordinates automatically.
latfloatNoLatitude. If lat/lng are provided, they override city lookup and are used directly.
lngfloatNoLongitude. Required together with lat for direct coordinate requests.
tz_strstringNoTimezone string or AUTO. AUTO uses the resolved coordinates and date to determine timezone.
bodiesarray[str] | csvNoRequested bodies or points. Accepts a POST array or a comma-separated GET string.
formatstringNojson or table. Default: json.
response_modestringNoAlias for format. Useful for table requests in query-string workflows.
table_stylestringNorows, columns, or grid. Grid is the month-style calendar output.
zodiac_typestringNotropical (default) or sidereal.
sidereal_ayanamsastringNoUsed only when zodiac_type=sidereal. Matches the natal naming conventions.
house_systemstringNoHouse system used when houses or angles are calculated. Default: placidus.
include_aspectsbooleanNoIf true, includes aspect data for each snapshot.
include_minor_aspectsbooleanNoIf true, expands aspects to include minor aspect types.
include_moon_void_of_coursebooleanNoIf true, adds astrology.moon_void_of_course with the current VOC state, next Moon sign ingress, and next applying major Moon aspect before ingress when one exists.
include_fixed_starsbooleanNoIf true, returns the default astrology fixed-star set under fixed_stars for each snapshot.
fixed_starsarray[str] | csvNoOptional explicit fixed-star list. Accepts a POST array or a comma-separated GET string, for example Spica,Regulus.
include_housesbooleanNoIf true, returns houses. Auto-enabled when coordinates are available unless explicitly set to false.
include_anglesbooleanNoIf true, returns ascendant/MC/related angle data. Auto-enabled when coordinates are available unless explicitly set to false.

Location behavior

  • Recommended flow: use City Search, let the user pick an exact result, then send lat, lng, and ideally tz_str.
  • city on POST /api/v1/ephemeris/calculate is a convenience fallback. If you send only a city, the backend resolves coordinates automatically.
  • If you already have coordinates, send them. Do not send only the city name back after City Search unless you want the backend to do a second lookup.
  • When coordinates are present, houses and angles are included automatically unless you explicitly disable them.

Range limits

  • table_style=grid is for month-style displays and is limited to 31 rows. Larger requests return 400 grid_range_too_large.
  • Use 1h and 1d for standard tables and exports.
  • Use minute steps such as 1m or 5m only for exact timing work.
  • Minute-level ranges are capped at 1440 rows, roughly 24h at 1m. Larger requests return 400 minute_range_too_large.
  • rows and columns allow larger exports, still subject to the endpoint’s general row cap.

Moon void of course

  • Set include_moon_void_of_course=true to add a moon_void_of_course object under astrology for each snapshot.
  • The calculation uses exact major Moon aspects to the Sun, Mercury, Venus, Mars, Jupiter, and Saturn before the Moon changes sign.
  • For table responses, the same object is available inside each raw_rows[].astrology payload.

Supported bodies

Core bodies

Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto

Nodes and lunar points

Mean Node, True Node, Lilith, True Lilith

Asteroids and minor bodies

Chiron, Pholus, Ceres, Pallas, Juno, Vesta

Coordinate-based points

Ascendant, MC, Vertex, Part of Fortune

Coordinate-based points require lat and lng.

Response samples

{
  "meta": {
    "start": "2026-03-01T00:00:00Z",
    "end": null,
    "step": null,
    "rows": 1,
    "bodies": ["Sun", "Moon", "Mercury"],
    "format": "json",
    "zodiac_type": "tropical",
    "sidereal_ayanamsa": null,
    "timezone": "UTC"
  },
  "data": {
    "timestamp": "2026-03-01T00:00:00Z",
    "local_timestamp": "2026-03-01T00:00:00+00:00",
    "subject": {
      "datetime": "2026-03-01T00:00:00+00:00",
      "location": {
        "city": null,
        "lat": null,
        "lng": null,
        "timezone": "UTC"
      },
      "settings": {
        "julian_day": 2461100.5,
        "julian_day_tt": 2461100.5007972275,
        "delta_t_days": 0.0007972275448330983,
        "delta_t_seconds": 68.8804598735797,
        "zodiac_type": "Tropical",
        "house_system": "placidus"
      }
    },
    "bodies": {
      "Sun": {
        "id": "sun",
        "name": "Sun",
        "sign": "Pisces",
        "sign_abbr": "Pis",
        "sign_id": "pisces",
        "pos": 10.406,
        "abs_pos": 340.406,
        "retrograde": false,
        "speed": 1.0037,
        "is_stationary": false,
        "latitude_deg": 0.000076,
        "distance_au": 0.990714622,
        "position_text": "10°24' Pisces",
        "degree_in_sign": 10.406,
        "longitude_deg": 340.406,
        "motion_state": "direct"
      },
      "Moon": {
        "id": "moon",
        "name": "Moon",
        "sign": "Leo",
        "sign_abbr": "Leo",
        "sign_id": "leo",
        "pos": 9.117,
        "abs_pos": 129.117,
        "retrograde": false,
        "speed": 13.8619,
        "is_stationary": false,
        "latitude_deg": 2.635536,
        "distance_au": 0.002504401,
        "position_text": "09°07' Leo",
        "degree_in_sign": 9.117,
        "longitude_deg": 129.117,
        "declination_deg": 20.516062,
        "motion_state": "direct"
      },
      "Mercury": {
        "id": "mercury",
        "name": "Mercury",
        "sign": "Pisces",
        "sign_abbr": "Pis",
        "sign_id": "pisces",
        "pos": 21.973,
        "abs_pos": 351.973,
        "retrograde": true,
        "speed": -0.428,
        "is_stationary": false,
        "latitude_deg": 3.294498,
        "distance_au": 0.70680082,
        "position_text": "21°58' Pisces Rx",
        "degree_in_sign": 21.973,
        "longitude_deg": 351.973,
        "declination_deg": -0.156033,
        "motion_state": "retrograde"
      }
    },
    "astrology": {
      "retrograde_bodies": ["Mercury"],
      "stations": [],
      "ingresses": [
        {
          "body": "Moon",
          "sign": "Leo",
          "degree_in_sign": 9.117,
          "direction": "entering_sign"
        }
      ],
      "angular_bodies": [],
      "notable_conditions": [
        "retrograde:Mercury",
        "ingress:Moon",
        "moon_phase:waxing_gibbous"
      ],
      "moon_phase": {
        "name": "Waxing Gibbous",
        "phase_angle_deg": 148.711,
        "is_waxing": true
      },
      "moon_void_of_course": {
        "is_void": false,
        "definition": "No further exact major Moon aspect to Sun, Mercury, Venus, Mars, Jupiter, or Saturn before the Moon changes sign.",
        "current_sign": "Leo",
        "next_sign": "Virgo",
        "sign_ingress_at": "2026-03-02T12:33:41Z",
        "next_applying_aspect": {
          "body": "mars",
          "aspect": "opposition",
          "exact_at": "2026-03-02T12:27:23Z"
        }
      }
    }
  }
}
{
  "meta": {
    "start": "2026-03-01T00:00:00Z",
    "end": "2026-03-31T00:00:00Z",
    "step": "1d",
    "rows": 31,
    "bodies": ["Sun", "Moon", "Mercury"],
    "format": "table",
    "table_style": "grid",
    "zodiac_type": "tropical",
    "sidereal_ayanamsa": null,
    "timezone": "UTC"
  },
  "display": {
    "sign_style": "abbr",
    "cell_format": "parts",
    "motion_markers": {
      "retrograde": "Rx",
      "stationary": "S"
    },
    "columns": ["date", "weekday", "sidereal_time", "Sun", "Moon", "Mercury"]
  },
  "rows": [
    {
      "date": { "iso": "2026-03-01", "day": 1 },
      "weekday": "Sun",
      "sidereal_time": "10:35:16",
      "Sun": {
        "text": "10°24' Pis",
        "degree_text": "10°24'",
        "sign": "Pisces",
        "sign_abbr": "Pis",
        "motion_marker": null,
        "entered_sign": false,
        "station": false
      },
      "Mercury": {
        "text": "21°58' Pis Rx",
        "degree_text": "21°58'",
        "sign": "Pisces",
        "sign_abbr": "Pis",
        "motion_marker": "Rx",
        "entered_sign": false,
        "station": false
      }
    },
    {
      "date": { "iso": "2026-03-02", "day": 2 },
      "weekday": "Mon",
      "sidereal_time": "10:39:12",
      "Sun": {
        "text": "11°25' Pis",
        "degree_text": "11°25'",
        "sign": "Pisces",
        "sign_abbr": "Pis",
        "motion_marker": null,
        "entered_sign": false,
        "station": false
      },
      "Moon": {
        "text": "22°53' Leo",
        "degree_text": "22°53'",
        "sign": "Leo",
        "sign_abbr": "Leo",
        "motion_marker": null,
        "entered_sign": true,
        "station": false
      },
      "Mercury": {
        "text": "21°28' Pis Rx",
        "degree_text": "21°28'",
        "sign": "Pisces",
        "sign_abbr": "Pis",
        "motion_marker": "Rx",
        "entered_sign": false,
        "station": false
      }
    }
  ],
  "raw_rows": [
    {
      "timestamp": "2026-03-01T00:00:00Z",
      "bodies": {
        "Sun": {
          "abs_pos": 340.406,
          "degree_in_sign": 10.406,
          "declination_deg": -7.665505,
          "speed": 1.0037
        },
        "Moon": {
          "abs_pos": 129.117,
          "degree_in_sign": 9.117,
          "declination_deg": 20.516062,
          "speed": 13.8619
        },
        "Mercury": {
          "abs_pos": 351.973,
          "degree_in_sign": 21.973,
          "declination_deg": -0.156033,
          "speed": -0.428
        }
      }
    }
  ]
}

FAQ

Common questions about the Western astrology ephemeris API, monthly planetary tables, Moon void-of-course data, and supported calculation options.

What is an astrology ephemeris API?

An astrology ephemeris API returns planetary positions for a specific date and time or across a date range. This endpoint calculates tropical or sidereal zodiac positions for planets, the Moon, nodes, asteroids, angles, houses, aspects, fixed stars, and month-style ephemeris tables.

Can I get a monthly planetary ephemeris table?

Yes. Use GET /api/v1/ephemeris with format=table and table_style=grid to return one row per day and one column per requested body. Grid mode is designed for monthly astrology calendars and is limited to 31 rows per request.

Does the ephemeris endpoint support Moon void of course?

Yes. Set include_moon_void_of_course=true to add astrology.moon_void_of_course for each snapshot. The response includes whether the Moon is void, the next Moon sign ingress, and the next applying major Moon aspect before ingress when one exists.

How accurate are the planetary positions?

The backend uses precise astronomical calculations for planetary longitude, latitude, speed, retrograde state, declination, fixed stars, and house data where applicable. Results include Julian day metadata so applications can audit the calculation context.

Can I request tropical and sidereal ephemeris data?

Yes. Use zodiac_type=tropical for the default Western tropical ephemeris or zodiac_type=sidereal with sidereal_ayanamsa, such as lahiri, for sidereal calculations.

Can I include houses and angles in an ephemeris request?

Yes. Send lat and lng, or a resolvable city on POST, then enable include_houses or include_angles. When coordinates are present, houses and angles are auto-enabled unless explicitly disabled.

What time steps are supported?

The endpoint supports whole minute, hour, and day intervals such as 1m, 5m, 15m, 1h, 6h, 1d, and 7d. Minute-level ranges are capped at 1440 rows, while grid tables are capped at 31 rows.

Can I calculate aspects in the ephemeris response?

Yes. Set include_aspects=true to include snapshot aspect data. Set include_minor_aspects=true when you also need minor aspects beyond the major aspect set.

Which planets and astrology points can I request?

The endpoint supports Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Chiron, Pholus, Ceres, Pallas, Juno, Vesta, Mean Node, True Node, Lilith, True Lilith, Ascendant, MC, Vertex, and Part of Fortune.

Can I use the ephemeris API for astrology apps and calendars?

Yes. The JSON format is suited for application logic, while table rows, columns, and grid output are suited for astrology calendars, dashboards, exports, and month-by-month ephemeris displays.