# A numerology profile from a name and a birth date

> A numerology profile is six or so numbers derived from a name and a date of birth. The API can return them one per call or all at once; which one you use depends on the plan, and the difference shows up directly in your billable call count.

Source: https://astronode.dev/recipes/numerology-profile · Updated: 2026-12-01

**What you build:** Life path, expression, soul urge, personality, birthday and personal year for one person. (Node.js, Python)

## Two ways to get the same numbers

| Endpoint | Plan | One call returns | Profile of 6 numbers costs |
| --- | --- | --- | --- |
| [`POST /v1/numerology/pythagorean`](https://astronode.dev/capabilities/numerology/numerology-pythagorean) | Free | One number (`number` picks which, 32 choices) | 6 billable calls |
| [`POST /v1/numerology/pythagorean/report`](https://astronode.dev/capabilities/numerology/numerology-pythagorean-report) | Starter | All 32 numbers (12 if you omit `name`) | 1 billable call |

Both take `dob` (YYYY-MM-DD), an optional `name`, and an optional `target_date` for the time-based numbers (personal year, month and day; universal cycles). The values are identical either way, as the run below shows.

## Node: report first, per-number fallback

```javascript
// numerology.mjs - Node 18+, server-side.
const API = "https://api.astronode.dev";
const KEY = process.env.ASTRONODE_API_KEY;

const CORE = ["life-path", "expression", "soul-urge", "personality", "birthday", "personal-year"];

const post = (path, body) =>
  fetch(API + path, {
    method: "POST",
    headers: { authorization: `Bearer ${KEY}`, "content-type": "application/json" },
    body: JSON.stringify(body),
  }).then(async (res) => ({ status: res.status, body: await res.json() }));

export const numerologyProfile = async (name, dob, targetDate) => {
  // Starter+: every Pythagorean number in one billable call.
  const report = await post("/v1/numerology/pythagorean/report", { name, dob, target_date: targetDate });
  if (report.status === 200) {
    const byNumber = Object.fromEntries(report.body.data.fields.map((f) => [f.number, f.result]));
    return { calls: 1, numbers: Object.fromEntries(CORE.map((n) => [n, byNumber[n]])) };
  }
  if (report.body.error?.code !== "PLAN_REQUIRED") throw new Error(report.body.error?.code);

  // Free / Hobby: one call per number. The 403 above was not billed.
  const numbers = {};
  for (const number of CORE) {
    const r = await post("/v1/numerology/pythagorean", { name, dob, target_date: targetDate, number });
    numbers[number] = r.body.data.result;
  }
  return { calls: CORE.length, numbers };
};

const profile = await numerologyProfile("Asha Verma", "1990-07-15", "2026-12-01");
console.log(`${profile.calls} billable call(s)`);
for (const [n, r] of Object.entries(profile.numbers)) {
  console.log(n.padEnd(14), r.value, r.is_master ? "(master)" : "", r.reduction_chain.join(" -> "));
}
```

Starter key, then Free key - same numbers, different bill:

```text
$ node numerology.mjs   # Starter key
1 billable call(s)
life-path      5  14 -> 5
expression     7  34 -> 7
soul-urge      8  8
personality    8  26 -> 8
birthday       6  15 -> 6
personal-year  5  14 -> 5

$ node numerology.mjs   # Free key
6 billable call(s)
life-path      5  14 -> 5
expression     7  34 -> 7
soul-urge      8  8
personality    8  26 -> 8
birthday       6  15 -> 6
personal-year  5  14 -> 5
```

The 403 on the Free key's first call is not billed, so the fallback costs exactly six calls: Free's 1,000 calls a month cover about 166 six-number profiles, where the report would cover one profile per call. If you only ever show the life path, the per-number endpoint is the cheaper tool on any plan.

## Python: master numbers

Each result is `{ value, is_master, reduction_chain }`. The chain shows the sums the engine took; when it stops at 11, 22 or 33, `is_master` is true and the number is final. Do not reduce it again on the client - that is the most common numerology bug.

```python
# numerology.py - Python 3.9+, standard library only.
import json, os, urllib.request

API = "https://api.astronode.dev"
KEY = os.environ["ASTRONODE_API_KEY"]

def number(dob, which, name=None):
    body = {"dob": dob, "number": which}
    if name:
        body["name"] = name
    req = urllib.request.Request(
        API + "/v1/numerology/pythagorean",
        data=json.dumps(body).encode(),
        headers={"Authorization": "Bearer " + KEY, "Content-Type": "application/json"},
    )
    return json.load(urllib.request.urlopen(req))["data"]["result"]

for dob in ["1990-07-15", "1966-04-03"]:
    r = number(dob, "life-path")
    # Never reduce a master number yourself: 11 is final when is_master is true.
    label = "master" if r["is_master"] else "single"
    print(dob, r["value"], label, r["reduction_chain"])
```

```text
$ python3 numerology.py
1990-07-15 5 single [14, 5]
1966-04-03 11 master [29, 11]
```

## Inputs that change the answer

- **Pin `target_date`.** Without it, personal year / month / day and the universal numbers use today's date on the server, so the same request gives a different answer tomorrow and your cache serves stale values. Send the date you are displaying.
- **Send `name` for name-based numbers.** Expression, soul urge, personality and the other letter-based numbers need it. The report quietly drops them without a name (12 fields instead of 32); the per-number endpoint refuses the request with `400 VALIDATION_ERROR` ("'expression' requires a `name`"), which is not billed - fix the input rather than retrying.
- **Spelling is the input.** The letter values follow the modern Pythagorean map (`letter_map_tradition: "pythagorean-modern"`). Store the exact spelling the user typed, including middle names, and show it next to the result.
- Chaldean numbers are separate endpoints (`/v1/numerology/chaldean`, Hobby) with a different letter map, so the two systems legitimately disagree.

## Questions

**What do I end up with?**

Life path, expression, soul urge, personality, birthday and personal year for one person. The code is in Node.js and Python.

**Which endpoints does this recipe call, and in what order?**

3 endpoints, in this order: Pythagorean Numerology Report (`POST /v1/numerology/pythagorean/report`), then Pythagorean Numerology (`POST /v1/numerology/pythagorean`), then Chaldean Numerology (`POST /v1/numerology/chaldean`).

## Endpoints, in call order

- [`POST /v1/numerology/pythagorean/report`](https://astronode.dev/capabilities/numerology/numerology-pythagorean-report) - Pythagorean Numerology Report API
- [`POST /v1/numerology/pythagorean`](https://astronode.dev/capabilities/numerology/numerology-pythagorean) - Pythagorean Numerology API
- [`POST /v1/numerology/chaldean`](https://astronode.dev/capabilities/numerology/numerology-chaldean) - Chaldean Numerology API
