# Chinese zodiac animal for a birth date (public, no key)

`POST https://api.astroway.info/v1/public/chinese/zodiac/animal`

The same answer as POST /chinese/zodiac/animal, served anonymously: animal, stem, branch and element of the solar year the date falls in. The year turns at Li Chun (around 4 February), not on 1 January, so send `time` and `timezoneOffset` for a birth near that boundary. `animalName`, `fixedName` and `cyclingName` follow `?lang=`; the English identifiers stay as they are. Costs 1 unit of the public bucket. Characters (simplified, traditional beside the animal) and Hanyu Pinyin with tone marks for the animal, stem and branch; `hours` is the double hour of the branch in local clock time (Rat 23:00-01:00); `trine` (三合), `secretFriend` (六合), `clash` (六冲) and `harm` (六害) are the fixed branch relations, the same arithmetic the BaZi interactions use. Pair it with GET /public/chinese/zodiac/texts for the reading.

Group: Public. Auth: none, this endpoint answers without a key.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `lang` | query | no | string | Language for this call, overriding `Accept-Language`. The canonical per-call form: a page that renders in one language passes it here rather than reconfiguring its client. Unknown or inactive codes fall back to `uk`. |
| `Accept-Language` | header | no | string | BCP-47 language (e.g. `uk`, `en`, `de`). Set it once on your HTTP client as its default; for a single call, `?lang=` overrides it. Unknown or inactive codes fall back to `uk`. |
| `fields` | query | no | string | Comma-separated dotted paths, relative to `data`, to keep in the response. A path is applied to every element of an array, so `planets.name` means the name of each planet. Paths that match nothing come back in `_fields_unmatched`; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer. |
| `precision` | query | no | integer | Round every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `date` | string | yes |  |
| `time` | string | no |  |
| `timezoneOffset` | number | no | Hours from UTC at the given moment, not minutes. Fractional zones are hours too: 5.5 for India, 5.75 for Nepal, -3.5 for Newfoundland. Defaults to 0, meaning UTC. Ignored when timezone is sent. |
| `timezone` | string | no | IANA zone name such as Europe/Kyiv, or auto to look the zone up from latitude and longitude. The server takes the offset that zone kept at this local date and time, summer time included, and uses it in place of timezoneOffset. A clock time that happened twice takes the first occurrence; one skipped when clocks went forward takes the offset from before the change. Abbreviations such as EST are refused. Before 1970 the tz database is not reliable for every place, so send timezoneOffset when the local clock is known. |
| `solarYear` | integer | no |  |
| `language` | string | no |  |

```json
{
  "date": "1990-05-15"
}
```

## Responses

| Status | Meaning |
|---|---|
| 200 | OK |
| 400 | Invalid input |

### Success fields, under `data`

| Field | Type | Required | Description |
|---|---|---|---|
| `solarYear` | number | no |  |
| `animal` | string | no |  |
| `animalName` | string | no |  |
| `glyph` | string | no |  |
| `animalHanzi` | string | no |  |
| `animalHanziTraditional` | string | no |  |
| `animalPinyin` | string | no |  |
| `stemHanzi` | string | no |  |
| `stemPinyin` | string | no |  |
| `branchHanzi` | string | no |  |
| `branchPinyin` | string | no |  |
| `hours` | object | no |  |
| `hours.start` | string | no |  |
| `hours.end` | string | no |  |
| `trine` | object | no |  |
| `trine.element` | string | no |  |
| `trine.elementName` | string | no |  |
| `trine.chinese` | string | no |  |
| `trine.animals` | object[] | no |  |
| `secretFriend` | object | no |  |
| `secretFriend.animal` | string | no |  |
| `secretFriend.animalName` | string | no |  |
| `secretFriend.branch` | string | no |  |
| `secretFriend.chinese` | string | no |  |
| `clash` | object | no |  |
| `clash.animal` | string | no |  |
| `clash.animalName` | string | no |  |
| `clash.branch` | string | no |  |
| `clash.chinese` | string | no |  |
| `harm` | object | no |  |
| `harm.animal` | string | no |  |
| `harm.animalName` | string | no |  |
| `harm.branch` | string | no |  |
| `harm.chinese` | string | no |  |
| `branch` | string | no |  |
| `stem` | string | no |  |
| `element` | object | no |  |
| `element.fixed` | string | no |  |
| `element.fixedName` | string | no |  |
| `element.cycling` | string | no |  |
| `element.cyclingName` | string | no |  |
| `element.yin` | boolean | no |  |
| `pillar` | string | no |  |
| `yearStart` | object | no |  |
| `yearStart.utc` | string | no |  |
| `yearStart.beijing` | string | no |  |
| `yearEnd` | object | no |  |
| `yearEnd.utc` | string | no |  |
| `yearEnd.beijing` | string | no |  |

## Example

```bash
curl -X POST 'https://api.astroway.info/v1/public/chinese/zodiac/animal?lang=en' \
  -H 'Content-Type: application/json' \
  -d '{"date":"1990-05-15"}'
```

---

Rendered from https://api.astroway.info/v1/openapi.json. HTML page: https://api.astroway.info/docs/api/operations/publicchinesezodiacanimal/
