FreeAstroAPI
Back to Guides
Astrology Basics
December 23, 2025

Understanding Astrological Aspects for Developers

A deep dive into the geometry of astrology. Learn how to parse, interpret, and visualize the aspects returned by FreeAstroAPI.

The Geometry of the Stars

At its core, astrology is geometry. When we talk about "aspects," we are referring to the specific angular distances between planets as observed from Earth.

For developers building astrology apps, understanding these angles is crucial because they define the "relationships" in a chart, how different planetary energies interact with one another.

How FreeAstroAPI Calculates Aspects

Our API engine calculates the geocentric longitude of every planet (0° to 360°) and then computes the absolute difference between them.

However, it's not just about the angle. We also apply an Orb. The orb is the margin of error we allow for an aspect to still be considered "active."

For example, a Square is exactly 90°. But if the Sun is at 88° and the Moon is at 180°, the difference is 92°. With an orb of 5°, this is still considered a valid Square.

The Data Structure

When you call /v1/natal/calculate, the aspects array returns objects structured like this:

{
  "p1": "Sun",
  "p2": "Moon",
  "type": "Square",
  "orb": 5.5,
  "deg": 92.1,
  "is_major": true
}

Key Fields Explained

  • p1 & p2: The two celestial bodies involved.
  • type: The name of the aspect (see table below).
  • deg: The exact angle between the planets in degrees.
  • orb: The margin or "tightness" of the aspect. Lower is stronger.
  • is_major: Boolean indicating if this is a primary aspect.

Major Aspects Cheat Sheet

AspectAngleOrb (Default)Meaning
Conjunction8-10°Fusion, intensity, new beginnings.
Opposition180°8-10°Tension, awareness, need for balance.
Trine120°Harmony, flow, natural talent.
Square90°Action, challenge, friction.
Sextile60°Opportunity, communication.

Visualizing Aspects

If you are drawing a circular chart, aspects are typically drawn as lines connecting the planets in the center of the wheel.

  • Blue Lines: Usually represent "soft" aspects (Trine, Sextile).
  • Red Lines: Usually represent "hard" aspects (Square, Opposition).
// Example: Determining line color based on aspect type
const getLineColor = (aspectType: string) => {
  switch (aspectType) {
    case 'Trine':
    case 'Sextile':
      return '#4F46E5'; // Indigo/Blue
    case 'Square':
    case 'Opposition':
      return '#EF4444'; // Red
    case 'Conjunction':
      return '#F59E0B'; // Amber
    default:
      return '#9CA3AF'; // Grey
  }
};

Conclusion

Aspects add depth to your astrological applications. They move beyond simple "sign placements" and describe the dynamic story of a person's life. By using the pre-calculated aspects array from FreeAstroAPI, you can skip the complex math and focus on building beautiful, insightful interfaces.