โ† Solutions

Zodiac sign API: sun signs, Chinese zodiac and sign compatibility

Three questions an app asks about zodiac signs - which sign is this person, which Chinese animal is this year, how do two signs get on - each have an endpoint. The first one has a catch worth knowing before you build.

Updated

The endpoints

Zodiac endpoints and their plans
EndpointRequestPlanWhat it gives you
Western Natal PlanetsPOST /v1/western/natal/planetsHobbyThe Sun's tropical sign (the Western star sign) for a birth
Planet Positions (Sidereal)POST /v1/planetsFreeThe Sun's sidereal sign (Vedic) for a birth
Chinese ZodiacGET /v1/western/chinese/zodiac/:yearFreeChinese zodiac animal, element and polarity for a year
Zodiac Sign CompatibilityPOST /v1/western/zodiac-compatibilityFreeSun-sign compatibility score out of 10

Which sign is a person?

A star sign is the sign the Sun was in at birth, so it comes from a planet position, not a date table. Date tables are wrong for anyone born near a sign change, because the Sun enters each sign at a different time each year.

And there are two answers. The Western (tropical) sign is the one horoscope columns use; the Vedic (sidereal) sign is usually one sign earlier, about 24ยฐ back in 2026. Read planets[0].sign from the tropical endpoint for a Western app, from the sidereal endpoint for a Vedic one. The planetary positions page shows the same moment in both.

Chinese zodiac

The Chinese zodiac for 2026:

http
GET /v1/western/chinese/zodiac/2026

Recorded response (data; long lists cut):

json
{
  "year": 2026,
  "animal": "Horse",
  "element": "Fire",
  "polarity": "yang",
  "stem_branch_index": 43
}

2026 is a Fire Horse year (yang). The endpoint answers for a Gregorian year number; a person born in January or early February belongs to the previous Chinese year, so decide how your product treats those dates.

Sign compatibility

Leo and Sagittarius:

http
POST /v1/western/zodiac-compatibility

{
  "sign_a": "Leo",
  "sign_b": "Sagittarius"
}

Recorded response (data; long lists cut):

json
{
  "sign_a": "Leo",
  "sign_b": "Sagittarius",
  "element_a": "fire",
  "element_b": "fire",
  "score": 9,
  "max": 10,
  "bucket": "Excellent",
  "note": "same-element resonance"
}

Leo and Sagittarius score 9 out of 10 (Excellent): "same-element resonance". This is a light sun-sign match for quizzes and widgets. For a full relationship reading use synastry or, in Vedic products, Ashtakoot matching.

Questions

Is there an API to get someone's zodiac sign?
Yes: compute the Sun's position for their birth. POST /v1/western/natal/planets gives the Western (tropical) sign and POST /v1/planets the Vedic (sidereal) sign. A date table gets people born near a sign change wrong.
Is there a Chinese zodiac API?
Yes. GET /v1/western/chinese/zodiac/:year returns the animal, element and polarity for a year, and GET /v1/western/chinese/forecast/:sign/:year an annual forecast for an animal.
How is sign compatibility scored?
POST /v1/western/zodiac-compatibility scores two sun signs out of 10 from their elements and returns a bucket and a one-line note. It is a light match; synastry and Ashtakoot are the full ones.