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

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

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

🕓 작성일 2026-04-14, 최종 수정 2026-05-09. TS / Python / PHP SDK는 이제 공개 레지스트리로 이동했습니다 — @astroway/sdk (npm), astroway (PyPI), astroway/sdk (Packagist). 자세한 내용은 changelog를 참고하세요.

코드에서 natal chart를 계산하고 싶나요? 가장 빠른 방법으로 5분 만에 JSON 결과를 얻을 수 있습니다.

api.astroway.info/dashboard/sign-up에서 가입하세요. 무료 플랜: 월 10,000 크레딧. 카드 없이 이용 가능합니다.

대시보드에서 「Create key」 → 「Production」을 클릭한 후 키를 복사하세요. 키는 aw_live_aB3xY7pQ9rN2mK4jH8vC5tL6wZ1fD0eR와 같은 형식입니다.

팁: aw_test_ 접두사가 붙은 샌드박스 키도 있습니다. 개발 시에는 이 키를 사용해 크레딧이 소모되지 않도록 하세요.

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

두 SDK 모두 723 엔드포인트를 타입이 지정된 요청과 응답으로 제공합니다.

import { Astroway } from '@astroway/sdk';
const client = new Astroway({
apiKey: process.env.ASTROWAY_API_KEY!,
});
const chart = await client.chart({
date: '1990-07-14',
time: '14:30:00',
timezoneOffset: 3, // UTC+3, 키예프의 여름 시간
latitude: 50.4501,
longitude: 30.5234,
houseSystem: 'P', // Placidus
});
console.log(`Sun: ${chart.planets[0].sign} at ${chart.planets[0].longitude}°`);
console.log(`ASC: ${chart.houses.ascendant}°`);
console.log(`Aspects: ${chart.aspects.length}`);

실행:

Terminal window
ASTROWAY_API_KEY=aw_live_... npx tsx chart.ts
from astroway import Astroway
client = Astroway(api_key="aw_live_your_key_here")
chart = client.chart(
date="1990-07-14",
time="14:30:00",
timezone_offset=3,
latitude=50.4501,
longitude=30.5234,
house_system="P",
)
print(f"Sun: {chart['planets'][0]['sign']} at {chart['planets'][0]['longitude']}°")
print(f"ASC: {chart['houses']['ascendant']}°")
print(f"Aspects: {len(chart['aspects'])}")

실행:

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

API는 JSON 객체를 반환하며, 주요 네 부분으로 구성됩니다:

12개의 객체 배열(Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, North Node, Chiron):

{
"name": "Sun",
"longitude": 111.87, // 황도 경도(도)
"latitude": 0.0,
"speed": 0.955, // 하루당 경도(역행은 음수)
"sign": "cancer",
"signIndex": 3,
"house": 10,
"retrograde": false
}

12개의 house cusp와 asc, MC:

{
"system": "P",
"cusps": [12.34, 43.21, ...], // 12개의 값
"ascendant": 12.34,
"mc": 280.12
}

행성 간의 aspect 배열:

{
"planet1": "Sun",
"planet2": "Moon",
"type": "sextile", // conjunction, opposition, trine, square, sextile, quincunx
"orb": 1.36, // 정확한 각도와의 차이(도)
"applying": true
}

"diurnal"(태양이 지평선 위에 있는 경우) 또는 "nocturnal"(지평선 아래). 전통 astrology에서 사용됩니다.

더 시도해 볼 만한 기능:

Synastry — 두 사람의 호환성:

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`);

현재 natal chart의 transit:

const transits = await client.transits({
// 출생 데이터
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
// transit 날짜
transitDate: '2026-04-14',
});

실제 transit을 반영한 일일 horoscope:

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}`);
  • Natal chart (/chart): 20 크레딧
  • Synastry: 50 크레딧
  • Transit: 50 크레딧
  • 일일 horoscope: 20 크레딧
  • Human Design: 50 크레딧

무료 플랜: 월 10,000 크레딧 = 500개의 natal chart, 또는 200개의 synastry, 또는 혼합 사용 가능.

모든 응답에는 크레딧 관련 헤더가 포함됩니다:

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

크레딧이 부족하면 402 Payment Required가 반환됩니다. rate-limit에 걸리면(Free: 분당 10회) 429 Too Many RequestsRetry-After 헤더가 반환됩니다.

SDK는 타입이 지정된 에러를 던지며, 이를 catch할 수 있습니다:

try {
const chart = await client.chart({ ... });
} catch (err) {
if (err.code === 'credits_exhausted') {
console.log('플랜을 업그레이드하거나 리셋을 기다리세요');
} else if (err.code === 'rate_limit_exceeded') {
console.log(`다음 요청까지 ${err.retryAfter}초 대기하세요`);
}
}

이제 너는:

  • 동작하는 API 키
  • 설치된 SDK
  • 첫 natal chart
  • synastry, transit, horoscope를 추가할 수 있는 예제

더 읽어보기:

AstroWay team

AstroWay API 엔지니어링 팀. Swiss Ephemeris를 깔끔한 REST로 감싸고, 사실상 중요한 지루한 세부 사항들을 다룹니다.

// 이걸로 빌드해

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

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

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

Engineering 2026-06-05

Natal Chart API in TypeScript: SDK + React Example

Compute a natal chart in TypeScript with the AstroWay SDK — typed responses, a React component, and where it beats a local ephemeris library.

Ephemeris 2026-06-05

How Accurate Is the Swiss Ephemeris? Verified Benchmarks

Swiss Ephemeris accuracy in numbers — planetary positions under 0.1 arcsecond, exact house cusps, eclipses within a minute — and how AstroWay verifies it.

Ephemeris 2026-06-05

Swiss Ephemeris: REST API vs pyswisseph (When to Use Which)

pyswisseph vs a REST API for Swiss Ephemeris calculations — C dependencies, data files, licensing and deployment compared, with a decision guide.