AstroWay/api v2.180.1 · ko
모든 시스템 정상 작동 중

아스트로로지 API 빠른 시작: TypeScript 및 Python 5분 안에

SDK 설치, API 키 받기, 첫 번째 내태아 도표 요청하기. 5분 안에 작동하는 JSON을 손에 넣을 수 있습니다(TypeScript 및 Python).

🕓 기록: 2026-04-14, 업데이트: 2026-05-09. TS / Python / PHP SDK가 이제 public registries에 있어요 - @astroway/sdk (npm), astroway (PyPI), astroway/sdk (Packagist). 자세한 내용은 changelog에 있어요.

코드로 네이탈 차트를 계산하고 싶어? 여기 가장 짧은 방법이야 – 5분이면 제로부터 작동하는 JSON까지.

가입하려면 api.astroway.info/dashboard/sign-up으로 가. 무료 플랜: 월 10 000 크레딧. 카드 없이도 가능해.

dashboard에서 «Create key» → «Production» 클릭하고 복사해. 키는 aw_live_aB3xY7pQ9rN2mK4jH8vC5tL6wZ1fD0eR 형태야.

팁: aw_test_ 접두사가 붙은 sandbox 키도 있어 – 이 키는 크레딧을 차감하지 않아. 개발할 때 사용해.

Terminal window
npm install @astroway/sdk
Terminal window
pip install astroway

두 SDK 모두 758 엔드포인트를 타입이 지정된 요청과 응답으로 지원해.

import { Astroway } from '@astroway/sdk';
const aw = new Astroway({
apiKey: process.env.ASTROWAY_API_KEY!,
});
const chart = await aw.chart.compute({
date: '1990-07-14',
time: '14:30:00',
timezoneOffset: 3, // UTC+3, літо в Києві
latitude: 50.4501,
longitude: 30.5234,
houseSystem: 'P', // Placidus
});
const SIGNS = ['Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo',
'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces'];
const sun = chart.planets.find((p) => p.name === 'Sun')!;
console.log(`Sun: ${SIGNS[Math.floor(sun.longitude / 30)]} at ${sun.longitude.toFixed(2)}°`);
console.log(`ASC: ${chart.houses.ascendant.toFixed(2)}°`);
console.log(`Aspects: ${chart.aspects.length}`);

실행해:

Terminal window
ASTROWAY_API_KEY=aw_live_... npx tsx chart.ts

파일이 top-level await을 사용하니까 package.json"type": "module"이 있어야 해. 그렇지 않으면 tsx가 Top-level await is currently not supported with the "cjs" output format 오류가 나와.

from astroway import Astroway, BirthData
aw = Astroway(api_key="aw_live_your_key_here")
chart = aw.chart.compute(BirthData(
date="1990-07-14",
time="14:30:00",
timezone_offset=3,
latitude=50.4501,
longitude=30.5234,
house_system="P",
))
SIGNS = ["Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo",
"Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"]
sun = next(p for p in chart["planets"] if p["name"] == "Sun")
print(f"Sun: {SIGNS[int(sun['longitude'] // 30)]} at {sun['longitude']:.2f}°")
print(f"ASC: {chart['houses']['ascendant']:.2f}°")
print(f"Aspects: {len(chart['aspects'])}")

실행해:

Terminal window
ASTROWAY_API_KEY=aw_live_... python3 chart.py

JSON 객체가 네 개의 주요 섹션으로 반환돼:

13개의 객체 배열이야. name에는 Swiss Ephemeris에서 가져온 천체 이름이 들어 있어: Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, true Node (북쪽 노드), mean Apogee (리리트), Chiron.

{
"id": 0,
"name": "Sun",
"longitude": 354.702, // еклiптична довгота у градусах
"latitude": -0.00016,
"distance": 0.9945, // в астрономічних одиницях
"speedLong": 0.9971, // градусів на день (від'ємне = ретроград)
"speedLat": 0.00003,
"speedDist": 0.00019,
"isRetrograde": false,
"declination": -1.4159,
"rightAscension": 355.437
}

별자리와 하우스는 여기서 제공되지 않아: 별자리는 Math.floor(longitude / 30)으로 계산하고, 하우스는 houses의 커스피드로 구해.

하우스 커스피드 (12개)와 asc, MC도 포함돼:

{
"system": "P",
"cusps": [118.18, 138.27, ...], // 12 значень
"ascendant": 118.18,
"mc": 12.708,
"armc": 11.69,
"vertex": 253.97,
"equatorialAsc": 100.75,
"coAscWK": 81.13,
"coAscMunkasey": 123.7,
"polarAsc": 261.13
}

행성 간의 어스펙트 배열:

{
"planet1": "Sun",
"planet2": "Mercury",
"planet1Id": 0,
"planet2Id": 2,
"type": { // об'єкт, не рядок
"name": "Conjunction",
"i18nKey": "aspect_conjunction",
"angle": 0,
"orb": 12,
"symbol": "",
"isMajor": true,
"color": "#660480"
},
"exactAngle": 3.365,
"orb": 3.365, // відхилення від точного у градусах
"isApplying": true
}

"diurnal" (출생 순간에 태양이 지평선 위에 있음) 또는 "nocturnal" (지평선 아래). 고전 점성술에서 사용돼.

다음도 시도해볼 수 있어:

시냅스트리: 두 사람의 궁합:

const synastry = await client.synastry({
chart1: { date: '1990-07-14', time: '14:30:00', timezoneOffset: 3, latitude: 50.45, longitude: 30.52 },
chart2: { date: '1992-03-22', time: '09:15:00', timezoneOffset: 2, latitude: 48.85, longitude: 2.35 },
});
console.log(`Compatibility score: ${synastry.compatibility.score}/100`);

현재 트랜짓을 네이탈 차트에 적용:

const transits = await client.transits({
// дані народження
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
// дата транзиту
transitDate: '2026-04-14',
});

실제 트랜짓을 기반으로 한 일일 운세:

const horoscope = await client.horoscopeDaily({
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
});
console.log(horoscope.text);

전체 Human Design 차트:

const hd = await client.humanDesign({
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
});
console.log(`${hd.type} - ${hd.strategy} - Profile ${hd.profile}`);
  • 네이탈 차트 (/chart): 20 크레딧
  • 시냅스트리: 50 크레딧
  • 트랜짓: 50 크레딧
  • 일일 운세: 20 크레딧
  • Human Design: 50 크레딧

무료 플랜: 월 10 000 크레딧 = 네이탈 차트 500개, 혹은 시냅스트리 200개, 혹은 혼합 사용량.

각 응답에는 크레딧 정보를 담은 헤더가 있어:

X-Credits-Used: 20
X-Credits-Remaining: 4980
X-Credits-Reset: 2026-05-01T00:00:00Z

크레딧이 소진되면 402 Payment Required를 받게 돼. 레이트 제한에 걸리면 (Free: 10 요청 / 분) 429 Too Many RequestsRetry-After 헤더가 반환돼.

SDK는 타입이 지정된 오류를 던지니, 잡을 수 있어:

import { QuotaExceededError, RateLimitError } from '@astroway/sdk';
try {
const chart = await aw.chart.compute(birth);
} catch (err) {
if (err instanceof QuotaExceededError) {
console.log('Upgrade plan or wait for reset');
} else if (err instanceof RateLimitError) {
console.log(`Retry in ${err.retryAfterSeconds ?? 60} seconds`);
} else {
throw err;
}
}

구체적인 오류부터 일반적인 오류까지 잡아야 해: 모두 ApiError를 상속하니까, 먼저 ApiError를 체크하면 나머지는 자동으로 포함돼.

이제 네가 가진 것:

  • 작동하는 API 키
  • 설치된 SDK
  • 첫 네이탈 차트
  • 시냅스트리, 트랜짓, 운세 등을 추가할 충분한 예제

읽어볼 다음 페이지:

MakSeong · AstroWay

I build the AstroWay API: Swiss Ephemeris on a clean REST surface, and I write about the dull parts that turn out to matter.

// 이걸로 빌드해

Solar Fire에 사용된 것과 동일한 Swiss Ephemeris - 단 4줄의 코드로.

카드 없이 무료 키. 첫 결제 전까지 월 5,000 API 호출.

더 많은 블로그 글 모든 글 보기 →

Industry 2026-06-05

Free Astrology API: Which One Has the Best Free Tier in 2026?

A side-by-side of free tiers across the major astrology APIs - credits, request caps, card requirements - and how much you can actually build for free.

Engineering 2026-06-05

Horoscope API Tutorial: Build a Daily Horoscope Feature

Add daily, weekly and monthly horoscopes to your app via API - sign-based text vs transit-based personalization - with TypeScript and Python code.

Engineering 2026-06-05

Natal Chart API in PHP: SDK + Laravel Example

Compute a natal chart in PHP with the AstroWay SDK - plain PHP and a Laravel facade - without compiling a Swiss Ephemeris extension.