Synastry / Compatibility

Build Relationship Compatibility with Synastry API

Add astrology-based matching to dating apps. Calculate compatibility scores from two birth charts.

What is Synastry?

Synastry is the astrological technique of comparing two natal charts to assess relationship compatibility. It's the foundation of astrology-based matching in dating apps like Co-Star, The Pattern, and Hinge's astrology feature.

Instead of just matching sun signs ("You're both Leos - great match!"), synastry analyzes how every planet in one chart interacts with every planet in the other. This gives a nuanced compatibility picture.

Key Synastry Aspects

Aspect Comparison What It Shows
Venus-Mars Physical attraction, chemistry
Moon-Moon Emotional compatibility, comfort
Sun-Moon Core personality + emotions fit
Mercury-Mercury Communication style match
Saturn aspects Long-term stability, commitment

Quick Start: Calculate Compatibility

Python
import requests

compatibility = requests.post(
    "https://api.vedika.io/v1/query",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "query": """
            Calculate synastry compatibility between:
            Person A: Born March 15, 1992, 2:30 PM, New York
            Person B: Born July 22, 1990, 10:15 AM, Los Angeles

            Include compatibility score, strongest aspects,
            and potential challenges.
        """,
        "system": "western"
    }
).json()

print(f"Compatibility: {compatibility['score']}%")
print(f"Strongest: {compatibility['strongest_aspects']}")
print(f"Challenges: {compatibility['challenges']}")

Example Response

{
  "score": 78,
  "rating": "High Compatibility",
  "strongest_aspects": [
    {
      "aspect": "Venus trine Mars",
      "orb": 2.3,
      "meaning": "Strong physical attraction and romantic chemistry"
    },
    {
      "aspect": "Moon conjunct Venus",
      "orb": 1.8,
      "meaning": "Deep emotional connection and nurturing"
    }
  ],
  "challenges": [
    {
      "aspect": "Sun square Saturn",
      "orb": 3.1,
      "meaning": "May feel restricted or criticized by partner"
    }
  ],
  "summary": "This relationship has strong romantic potential with excellent Venus-Mars chemistry. The emotional bond (Moon-Venus) provides stability. Watch for control dynamics with Sun-Saturn."
}

Implementing in a Dating App

Here's how to add synastry-based compatibility to your dating app:

JavaScript / React
async function getCompatibility(userA, userB) {
  const response = await fetch("https://api.vedika.io/v1/query", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.VEDIKA_API_KEY}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      query: `Calculate synastry between:
        Person A: Born ${userA.birthDate} at ${userA.birthTime} in ${userA.birthPlace}
        Person B: Born ${userB.birthDate} at ${userB.birthTime} in ${userB.birthPlace}
        Return compatibility score and top 3 aspects.`,
      system: "western"
    })
  });

  return response.json();
}

// Usage in match card component
function MatchCard({ match, currentUser }) {
  const [compatibility, setCompatibility] = useState(null);

  useEffect(() => {
    getCompatibility(currentUser, match).then(setCompatibility);
  }, [match]);

  return (
    <div className="match-card">
      <img src={match.photo} alt={match.name} />
      <h3>{match.name}</h3>
      {compatibility && (
        <div className="compatibility-badge">
          ♡ {compatibility.score}% Compatible
        </div>
      )}
    </div>
  );
}

Best Practices for Dating Apps

  1. Don't gate on low scores - Show compatibility as a fun feature, not a blocker
  2. Cache results - Compatibility doesn't change, cache indefinitely
  3. Require birth time for accuracy - Without birth time, rising sign is unknown
  4. Use it for engagement - "See why you're 85% compatible" drives conversations

Add Astrology to Your Dating App

FREE Sandbox to test. Production from $12/month.

Get Started Free