# Chinese Lunar Calendar Converter (Gregorian to Lunar)

> Chinese Lunar Calendar Converter (Gregorian to Lunar) is a paid API for AI agents from api.cn402.com, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-15).

Converts a Gregorian (solar) date to the full Chinese lunar calendar equivalent, including lunar year/month/day, gan-zhi pillars, zodiac animal, and leap month flag

## Facts

- Endpoint: GET https://api.cn402.com/lunar
- Price: $0.016/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-cn402-com-19643f86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tDtNrDDEU9k_qyNNGta2A

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-cn402-com-19643f86
```

Example prompt: What is October 1, 1949 in the Chinese lunar calendar? I need the full details — lunar year, month, day, the gan-zhi pillars for year, month, and day, the zodiac animal, and whether it's a leap month.

## When to prefer this

Use this endpoint when you need to convert any Gregorian date to a full traditional Chinese lunar calendar representation, especially when you need not just the lunar date but also the sexagenary (gan-zhi) cycle pillars for BaZi astrology, the zodiac animal year, or leap month identification. Prefer this over manual calculations or less specialized APIs when cultural accuracy and completeness of traditional Chinese calendar fields are important.

## Known failure modes

- Invalid or out-of-range date returns an error (e.g. month 13, day 32)
- Dates outside the supported historical range may not be convertible
- Missing required date fields returns a validation error
- Malformed request body returns HTTP 400
- Payment failure or insufficient USDC balance returns HTTP 402

## How this service works

Chinese lunar calendar conversion, solar to lunar date, Gregorian to Chinese lunar, 公历转农历, 农历日期转换, lunar date, Chinese date, sexagenary cycle date, 干支日期. Convert any Gregorian date to Chinese lunar date with full traditional context: lunar year-month-day, year/month/day gan-zhi pillars, zodiac animal year, leap month flag.

## Output

Returns a JSON object with the original solar date string, lunar year/month/day as integers, a formatted lunar date string, gan-zhi object containing year/month/day stems-and-branches pillars, the Chinese zodiac animal for that year, and a boolean indicating whether the lunar month is a leap month.

## Example request

```json
{
 "date": "1949-10-01"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "description": "Date YYYY-MM-DD (required)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-cn402-com-19643f86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cn402.com](https://www.zero.xyz/host/api.cn402.com/llms.txt)
