AstrologyAPI

Use access token to call astrology api.

Learn More

Lunar Metrics

POSThttps://json.astrologyapi.com/v1/lunar_metrics
Copy

The lunar_metrics API provides information about the Moon, including its distance from Earth and whether it is within its apogee or perigee range. The response includes the date of the measurement, whether the Moon is within its perigee range, the distance between the Moon and Earth, whether the Moon is within its apogee range, and the apogee distance between the Moon and Earth.

POST/lunar_metrics
Copy
1curl --location 'https://json.astrologyapi.com/v1/lunar_metrics' \
2  --header 'Content-Type: application/json' \
3  --header 'x-astrologyapi-key: <YOUR_ACCESS_TOKEN>' \
4  --data '{
5    "day": 10,
6    "month": 5,
7    "year": 1990,
8    "hour": 19,
9    "min": 55,
10    "lat": 19.2056,
11    "lon": 25.2056,
12    "tzone": 5.5,
13    "house_type": "placidus"
14}'
15
200Response
Copy
1{
2  "month": "10-5-1990",
3  "within_perigee_range": false,
4  "distance": "--",
5  "within_apogee_range": true,
6  "apogee_distance": 406431,
7  "moon_sign": "Scorpio",
8  "moon_phase": "Full Moon",
9  "moon_age_in_days": 15.470096481335087,
10  "moon_day": 16,
11  "moon_illumination": 99
12}

Request Headers

x-astrologyapi-key

string

required

API Access Token to authenticate requests. Send your access token in this custom header.

Accept-Language

string

Preferred language for the response content

Properties

English - en

Request Body (JSON)

day

int

required

Date of birth, eg: 10

month

int

required

Month of birth, eg: 5

year

int

required

Year of birth, eg: 1990

hour

int

required

Hour of birth, eg: 19

min

int

required

Minute of birth, eg: 55

lat

float

required

Latitude, eg: 19.2056

lon

float

required

Longitude, eg: 25.2056

tzone

float

required

Timezone, eg: 5.5

house_type

string

required

Default : placidus // koch/topocentric/poryphry/equal_house/whole_sign

Errors

400
Bad Request

Something is wrong with your request format or parameters.

401
Unauthorized

Your API key is missing or invalid.

403
Forbidden

You don't have permission to access this specific resource.

404
Not Found

The API endpoint you're trying to reach doesn't exist.

500
Internal Server Error

Our server is having a temporary glitch.