# Dating Apps

Astrological compatibility is a retention driver in dating apps like Bumble, Hinge, Tinder, Tantan and in astro-first apps like NUiT, Struck. AstroWay API delivers a ready synastry score 0–100 in a single call — no need to host your own ephemeris or license Solar Fire ($495).

## How it works

1. User enters birth date, time, and place at registration
2. On match — your backend calls `/v1/synastry` with both users' data
3. API returns `compatibility.score` (0–100) and `label` (harmonious/balanced/mixed/challenging)
4. Score is used as one factor in ranking

```
Match algorithm
  ├── Location proximity     (40%)
  ├── Interests overlap      (30%)
  ├── Astrology compatibility (20%)  ← AstroWay API
  └── Other signals          (10%)
```

## Key endpoints

| Endpoint | Credits | What it returns |
|---|---|---|
| `/v1/synastry` | 50 | Cross-aspects + score 0–100 |
| `/v1/human-design/compatibility` | 100 | HD compatibility (type + strategy) |
| `/v1/horoscope/compatibility` | 50 | Text compatibility analysis |

## Integration pattern

```ts
// Call synastry on match
async function getCompatibility(userA: UserProfile, userB: UserProfile) {
  const result = await astrowayClient.synastry({
    chart1: {
      date: userA.birthDate,
      time: userA.birthTime || '12:00:00', // noon default if unknown
      timezoneOffset: userA.tzOffset,
      latitude: userA.birthLat,
      longitude: userA.birthLng,
    },
    chart2: {
      date: userB.birthDate,
      time: userB.birthTime || '12:00:00',
      timezoneOffset: userB.tzOffset,
      latitude: userB.birthLat,
      longitude: userB.birthLng,
    },
  });

  return {
    score: result.compatibility.score,      // 0-100
    label: result.compatibility.label,      // "harmonious"
    harmony: result.compatibility.harmony,  // weighted sum
    tension: result.compatibility.tension,
  };
}
```

<Aside type="tip">
Synastry result is immutable (depends only on birth dates). Cache the pair `(userA_id, userB_id) → score` in your DB. One API call — no more recalculation needed.
</Aside>

## Budget estimation

### Scenario: 1,000 new matches per day

| Metric | Value |
|---|---|
| Matches/day | 1,000 |
| Credits/match | 50 (synastry) |
| Credits/day | 50,000 |
| Credits/month | ~1,500,000 |
| Plan | **Business ($199/mo, 3,500,000 credits)** |

### Scenario: 50 matches per day (startup)

| Metric | Value |
|---|---|
| Matches/day | 50 |
| Credits/day | 2,500 |
| Credits/month | ~75,000 |
| Plan | **Starter ($19/mo, 200,000 credits)** |

### Optimization

- **Caching** — store score in DB, don't recalculate
- **Lazy calculation** — compute synastry when the user opens the match, not for all potential pairs
- **Batch at registration** — precompute compatibility against top-20 potential matches at once

## Without birth time

If the user doesn't know their birth time — pass `"time": "12:00:00"` (noon). Houses will be less accurate, but planet positions and cross-aspects are correct. Compatibility score remains informative.

For HD compatibility, time matters more — consider `hd/sensitivity` to evaluate the impact of time uncertainty.

<CardGrid>
  <LinkCard title="Synastry API →" href="/en/products/synastry-api/" description="Compatibility endpoints in detail" />
  <LinkCard title="Quick start" href="/en/getting-started/" description="First request in 5 minutes" />
  <LinkCard title="Pricing" href="/en/pricing/" description="From Free to Enterprise" />
</CardGrid>
