D5 Moon API Documentation

🌙 D5 Moon API Documentation

달 정보를 당신의 애플리케이션에 연동하세요. 무료로 제공되는 RESTful API입니다.

Base URL: https://d5.co.kr/wp-json/d5-moon/v1

📌 빠른 시작

JavaScript Example
// 오늘 달 정보 가져오기
fetch('https://d5.co.kr/wp-json/d5-moon/v1/today')
  .then(res => res.json())
  .then(data => {
    console.log(data.moon.phase);  // "보름달"
    console.log(data.moon.icon);   // "🌕"
    console.log(data.time.moonrise); // "17:30"
  });

🔌 API Endpoints

GET /today

오늘의 달 정보를 반환합니다.

Response
{
  "status": "success",
  "date": {
    "solar": "2026-01-21",
    "lunar": { "year": "2026", "month": "12", "day": "03", "leap": false }
  },
  "moon": {
    "phase": "초승달",
    "phase_en": "Waxing Crescent",
    "icon": "🌒",
    "age": 4,
    "illumination": 15
  },
  "time": {
    "moonrise": "09:11",
    "moonset": "20:11"
  }
}
GET /date/{YYYY-MM-DD}

특정 날짜의 달 정보를 반환합니다.

Parameters:
date조회할 날짜 (YYYY-MM-DD 형식)
Example: GET https://d5.co.kr/wp-json/d5-moon/v1/date/2026-02-02
GET /month/{year}/{month}

특정 월의 전체 달 정보를 반환합니다.

Parameters:
year연도 (4자리)
month월 (1-12)
Example: GET https://d5.co.kr/wp-json/d5-moon/v1/month/2026/3
GET /fullmoon/{year}

해당 연도의 보름달 일정을 반환합니다.

Response
{
  "status": "success",
  "year": 2026,
  "count": 13,
  "fullmoons": [
    { "solar_date": "2026-01-03", "lunar_month": 11, "moonrise": "17:01", "moonset": "07:44" },
    { "solar_date": "2026-02-02", "lunar_month": 12, "moonrise": "18:20", "moonset": "07:50" },
    ...
  ]
}
GET /phase/{YYYY-MM-DD}

특정 날짜의 달 위상(모양)만 계산하여 반환합니다.

Response
{
  "status": "success",
  "date": "2026-08-15",
  "phase": {
    "name": "보름달",
    "name_en": "Full Moon",
    "icon": "🌕",
    "age": 15,
    "illumination": 100
  }
}
GET /convert/{YYYY-MM-DD}

양력 날짜를 음력으로 변환합니다.

Response
{
  "status": "success",
  "solar": { "year": 2026, "month": 1, "day": 29, "weekday": "목" },
  "lunar": { "year": "2026", "month": 1, "day": 1, "leap_month": false }
}

💻 사용 예제

Python
import requests

response = requests.get('https://d5.co.kr/wp-json/d5-moon/v1/today')
data = response.json()

print(f"오늘의 달: {data['moon']['phase']} {data['moon']['icon']}")
print(f"월출: {data['time']['moonrise']}")
PHP
$response = file_get_contents('https://d5.co.kr/wp-json/d5-moon/v1/today');
$data = json_decode($response, true);

echo "오늘의 달: " . $data['moon']['phase'] . " " . $data['moon']['icon'];
echo "월출: " . $data['time']['moonrise'];
cURL
curl -X GET "https://d5.co.kr/wp-json/d5-moon/v1/today"

📊 응답 필드 설명

필드타입설명
moon.phasestring한국어 달 위상 (삭, 초승달, 상현달, 보름달 등)
moon.phase_enstring영어 달 위상
moon.iconstring달 이모지 (🌑🌒🌓🌔🌕🌖🌗🌘)
moon.ageinteger달의 나이 (0-29)
moon.illuminationinteger달 밝기 (0-100%)
time.moonrisestring월출 시간 (서울 기준)
time.moonsetstring월몰 시간 (서울 기준)
date.lunarobject음력 날짜 정보

⚠️ 이용 안내

  • API는 무료로 제공됩니다.
  • 과도한 요청 시 제한될 수 있습니다 (분당 60회 권장).
  • 데이터 범위: 2020년 ~ 2030년
  • 시간 정보는 서울(UTC+9) 기준입니다.
  • 상업적 이용 시 출처 표기를 권장합니다.