AstroWay/api v2.295.7 · 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 모두 777 엔드포인트를 타입이 지정된 요청과 응답으로 지원해.

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 for Kyiv summer
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, // ecliptic longitude in degrees
"latitude": -0.00016,
"distance": 0.9945, // in astronomical units
"speedLong": 0.9971, // degrees per day (negative = retrograde)
"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 values
"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": { // an object, not a string
"name": "Conjunction",
"i18nKey": "aspect_conjunction",
"angle": 0,
"orb": 12,
"symbol": "☌",
"isMajor": true,
"color": "#660480"
},
"exactAngle": 3.365,
"orb": 3.365, // deviation from exact in degrees
"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({
// birth data
date: '1990-07-14', time: '14:30:00', timezoneOffset: 3,
latitude: 50.4501, longitude: 30.5234,
// transit date
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 Requests와 Retry-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

AstroWay API를 만들고 있어: Swiss Ephemeris를 순수 REST로 감싸고, 실제로 중요한 지루한 세부사항을 기록합니다.

// 이걸로 빌드해

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

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

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

Ephemeris 2026-07-19

우리가 정확성을 제어하는 방법: CI vs swetest 및 NASA

아스트로-API의 정확성은 하나의 에프메르에디드 리팩토링으로 쉽게 저하됩니다. CI의 보호를 분석합니다: 앱과 API를 위한 하나의 스위스 에프메르에디스 핵심, 수백의 스냅샷이 동결된 표준 맵에, swetest CGI, Kerykeion, Prokerala 및 NASA의 어두움 카탈로그에 대한 각 PR의 삼각화.

Engineering 2026-07-15

세 가지 공식 SDK: 순수 curl 대신 TypeScript, Python, PHP

순수 HTTP로도 동작하지만, 타입이 있는 클라이언트는 몇 시간을 아껴 줍니다: 경로 자동 완성, 요청과 응답 타입, 408/409/429/5xx에 대한 내장 재시도, Stainless 스타일의 오류 계층. 세 가지 공식 SDK인 @astroway/sdk(npm), astroway(PyPI), astroway/sdk(Packagist)를 살펴보고, 이들이 어떻게 하나의 OpenAPI 계약에서 생성되는지 설명합니다.

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.