JavaScript / TypeScript
AvailableA typed ESM client for natal charts, signs, positions, aspects and synastry.
Version 0.2.0 is published on npm.
Developer platform
Build natal charts, sign tools, aspects and synastry with the calculation stack behind GetBirthChart.
import { GetBirthChart } from "@getbirthchart/sdk";
const client = new GetBirthChart({
apiKey: process.env.GETBIRTHCHART_API_KEY,
baseUrl: "https://getbirthchart.com/api",
});
const chart = await client.calculateBirthChart({
date: "1990-01-15",
time: "12:00",
place: "New York, NY",
latitude: 40.7128,
longitude: -74.006,
timezone: "America/New_York",
});Planetary positions use the backend ephemeris through pyswisseph.
Time-dependent fields are omitted when a reliable birth time is missing.
The TypeScript SDK returns structured data and typed errors.
Rules, sources, validation and release metadata are documented.
Use the interface that fits your stack.
A typed ESM client for natal charts, signs, positions, aspects and synastry.
Version 0.2.0 is published on npm.
Start with a calculation surface, then shape the product around it.
Natal chart calculators and chart-driven applications.
Focused sign calculators and onboarding flows.
Synastry and compatibility experiences built from two charts.
Assistants grounded in structured calculation data through an API or MCP.
Calculation-backed pages and workflows with clear editorial limits.
Work directly with positions, aspects and engine metadata.
The matrix reflects the current state of each developer surface.
| Capability | REST | TypeScript | Python | MCP | WordPress |
|---|---|---|---|---|---|
| Birth chart | Available | Available | Available | Available | Available |
| Planet positions | Available | Available | Available | Available | - |
| Sun sign | Available | Available | Partial | Available | Partial |
| Moon sign | Available | Available | Partial | Available | Available |
| Rising sign | Available | Available | Available | Available | Available |
| Big Three | Available | Available | Available | Available | Available |
| Aspects | Available | Available | Available | Available | - |
| Synastry | Available | Available | Partial | Available | - |
| Unknown-time handling | Available | Available | Available | Available | Available |
| Engine metadata | Available | Available | Available | Available | - |
Preview means the contract or source exists, but public access is not available yet. Partial means the capability is exposed through a broader chart or engine surface.
MCP tools: calculate_birth_chart, get_planet_positions, get_big_three, get_moon_sign, get_rising_sign, calculate_aspects, calculate_synastry. Resources: getbirthchart://methodology, getbirthchart://data-sources, getbirthchart://engine-info.
The SDK does not turn missing information into a guessed time.
Without a reliable time, the engine's unknownTimeAssessment is authoritative: it does not guess an Ascendant or houses. Time-sensitive fields are omitted, and Moon uncertainty remains explicit when the available date cannot establish one sign.
const chart = await client.calculateBirthChart({
date: "1990-01-15",
place: "New York, NY",
latitude: 40.7128,
longitude: -74.006,
timezone: "America/New_York",
unknownTime: true,
});
console.log(chart.birthTimeKnown); // false
console.log(chart.ascendant); // undefined
console.log(chart.houses); // undefinedBodies, angles, houses and aspects can be returned when the input is complete.
Bodies remain available. Ascendant and houses are omitted rather than guessed.
Authoritative reference pages keep the implementation inspectable.
Calculation pipeline, zodiac, houses and the boundary between facts and interpretation.
Read referenceEphemeris calculations, IANA timezone rules and geographic coordinate data.
Read referenceDeterministic fixtures, regression cases, boundaries and reproducibility checks.
Read referenceCurrent engine namespaces, schema changes and public material release history.
Read referenceInspect the calculation engine, SDK source and release provenance.
The installable Python package for the GetBirthChart calculation engine.
The TypeScript client source, tests and release workflow.
The package release is archived and citable under the engine project license.
These values come from the web app's pinned engine contract and calculation-core constants.
Return explicit calculation data rather than opaque generated prose.
Use typed interfaces, documented errors and explicit uncertainty.
Document the methodology, sources and engine versions behind output.
Copy the shortest useful example for your stack.
import { GetBirthChart } from "@getbirthchart/sdk";
const client = new GetBirthChart({
apiKey: process.env.GETBIRTHCHART_API_KEY,
baseUrl: "https://getbirthchart.com/api",
});
const chart = await client.calculateBirthChart({
date: "1990-01-15",
time: "12:00",
place: "New York, NY",
latitude: 40.7128,
longitude: -74.006,
timezone: "America/New_York",
});These snippets exercise the versioned Python core. Engine/API capabilities are labeled separately from settings exposed in the public web calculator.
The public calculator defaults to Tropical, Placidus, True Node, Standard aspects and Chiron enabled.
from gbc_astro import calculate_chart
chart = calculate_chart(
date="1992-11-03",
time="14:35",
latitude=21.0285,
longitude=105.8542,
timezone="Asia/Ho_Chi_Minh",
)
print(chart.meta.house_system) # placidus
print(chart.meta.node_type) # trueCreate a developer API key, keep it on your server, and call the versioned chart endpoints with structured JSON responses.