Docs API reference

The I Ching JSON dataset.

The I Ching API is a set of static JSON files: every hexagram, every trigram and every one of the 4,096 readings. There is no key and no sign-up.

PreviewThese pages show how the documentation will read. The dataset and the MCP server arrive with the first release. The two example readings are verified. {release} is a placeholder for a release ID, and the licence and sources values are illustrative until then.

Base address

The dataset will be served from api.divinacci.com. Apart from /v1/current.json, every path sits under /v1/releases/{release}/.

Shell
# 1. Find the current release
curl https://api.divinacci.com/v1/current.json

# 2. Read one reading from that release
curl https://api.divinacci.com/v1/releases/{release}/iching/readings/977777.json

Paths

PathContents
/v1/current.jsonNames the current release
iching/readings/{lines}.jsonOne of the 4,096 readings: primary hexagram, changing lines, resulting hexagram
iching/hexagrams/{n}.jsonStructure of hexagram 1 to 64
iching/trigrams/{id}.jsonOne of the eight trigrams
iching/{lang}/book.jsonEvery cleared text in one language, in one download
manifest.jsonEvery file with its SHA-256, licences and citations

Envelope

Every file carries release, licence and sources, with a citation for each field, then data. For a reading, data holds lines, primary (number, name, pinyin), changing and resulting.

A reading · 977777
{
  "release": "{release}",
  "licence": "CC BY 4.0",
  "sources": { "…": "one per field" },
  "data": {
    "lines": "977777",
    "primary": {
      "number": 1,
      "name": "乾",
      "pinyin": "Qián"
    },
    "changing": [1],
    "resulting": {
      "number": 44,
      "name": "姤",
      "pinyin": "Gòu"
    }
  }
}

Notation

{lines} is six digits from the bottom line up, each 6, 7, 8 or 9; 6 and 9 change. Changing positions are numbered 1 to 6 from the bottom. With no changing lines, changing is [] and resulting is null. See Concepts.

Illustrative until the first release: the full reference, with every field and its citation format, is published with it.