Introduction

Almost all of the functionality of the Kanji Alive web application can be accessed using the public developer API hosted and documented on Rapid API under a Creative Commons Attribution (CC-BY) license. If you prefer, you can also download our language data and media files from our GitHub repository for offline use under the same license.

The only exceptions are searching for kanji by textbook and viewing the mnemonic hints for individual kanji. Due to licensing restrictions these features and data are not available in the public API or offline on GitHub. Note: You will need to sign-up for a free account at Rapid API to get your Kanji Alive API key.

The documentation on this page supplements the API documented on Rapid API. If needed, please review the Kanji alive User Guide for further details on individual fields and components.

Basic Search

Valid search strings for the basic search endpoint :search are a single kanji character, an Onyomi reading in katakana, a Kunyomi reading in hiragana, or a kanji's simplified English meaning.

https://kanjialive-api.p.rapidapi.com/api/public/search/

Advanced Search

Advanced search mirrors the advanced search options in the Kanji Alive app with one exception. Due to licensing restrictions you cannot search for kanji by textbook (chapter).

You can construct an advanced search with any combination of the following key/value pairs as URL parameters. The base endpoint will always be:

https://app.kanjialive.com/api/public/search/advanced

on Onyomi reading, R/J (Katakana) on=shin or on=シン
kun Kunyomi reading, R/J (Hiragana) kun=oya or kun=おや
kem Kanji English meaning, E kem=parent
ks Kanji stroke number, # ks=16
kanji Kanji character, J kanji=親
rjn Radical Japanese name, R/J (Hiragana) rjn=miru or rjn=みる
rem Radical English meaning, E rem=see
rs Radical stroke number, # rs=7
rpos Radical position, R/J (Hiragana) rpos:hen or rpos:へん
grade Grade level, # grade=2
list Study List see below for details

Here is an example of an advanced search matching the radical Japanese name みる with all 7 stroke kanji. The advanced search endpoint accepts an arbitrary number of parameters separated by an ampersand:

https://kanjialive-api.p.rapidapi.com/api/public/search/advanced?rjn=みる&ks=7

Advanced Search on Study Lists)

Advanced searches on study lists are a slightly idiosyncratic. The aforementioned URL parameter still exists, with the key list, but the value can be constructed using either one or two values in succession.

The leftmost column shows what the search parameter would look like for all kanji in a specific list. The rightmost column shows a chapter specific search.

list=ap Advanced Placement Exam list=ap:c3
list=mac Macquarie University list=mac:c12

Response

All basic and advanced searches return a JSON array containing individual objects for each kanji that matches the search. You can use the kanji character value that is returned for a kanji with the detail endpoint to get all of the available information regarding a specific kanji. The radical order value indicates the index number of the radical in the canonical order of the 214 traditional kanji radicals.

Example: https://kanjialive-api.p.rapidapi.com/api/public/search/坊

[
  {
    "kanji": {
      "character": "坊",
      "stroke": 7
    },
    "radical": {
      "character": "",
      "stroke": 3,
      "order": 38
    }
  }
]
]

If your search does not yield any results, an empty JSON Array will be returned

Note: As illustrated above some of the radical characters supported by Kanji alive are not defined in Unicode and had to be assigned PUA (Private Use Area) encodings in the range U+E700..U+E759. To view these characters correctly, your users will first have to install our custom Japanese Radicals font (also available in several webfont formats).

Kanji Details

The detail endpoint to gives you all the information Kanji Alive has to offer on a specific kanji (currently 1235 kanji). The information offered through the API is largely the same as found in the web app's detail view, with two differences:

  1. The API also provides romaji versions of a kanji's Onyomi and Kunyomi readings and access to the timing information for each kanji stroke
  2. The API does not offer data on an individual kanji's mnemonic hints

The detail endpoint has one parameter, and that is the :character itself.

https://app.kanjialive.com/api/public/kanji/:character

Here is an example of how to use the detail endpoint

https://kanjialive-api.p.rapidapi.com/api/public/kanji/訪

Response

The JSON response will be a single JSON Object for the kanji that you have appended to the detail endpoint. All asset URLs will always be fully qualified.

 {
  "kanji": {
    "character": "訪",
    "meaning": {
      "english": "visit"
    },
    "strokes": 11,
    "onyomi": {
      "romaji": "hou",
      "katakana": "ホウ"
    },
    "kunyomi": {
      "romaji": "otozureru, tazuneru, otozu, tazu",
      "hiragana": "おとずれる、たずねる、おとず、たず"
    },
    "video": {
      "poster": "https://media.kanjialive.com/kanji_strokes/otozu(reru)_11.svg",
      "mp4": "https://media.kanjialive.com/kanji_animations/kanji_mp4/otozu(reru)_00.mp4",
      "webm": "https://media.kanjialive.com/kanji_animations/kanji_webm/otozu(reru)_00.webm"
    }
  },
  "radical": {
    "character": "",
    "strokes": 7,
    "image": "https://media.kanjialive.com/radical_character/gonben.svg",
    "position": {
      "hiragana": "へん",
      "romaji": "hen",
      "icon": "https://media.kanjialive.com/rad_positions/hen.svg"
    },
    "name": {
      "hiragana": "ごんべん",
      "romaji": "gonben"
    },
    "meaning": {
      "english": "words, to speak, say"
    },
    "animation": [
      "https://media.kanjialive.com/rad_frames/gonben0.svg",
      "https://media.kanjialive.com/rad_frames/gonben1.svg",
      "https://media.kanjialive.com/rad_frames/gonben2.svg"
    ]
  },
  "references": {
    "grade": 6,
    "kodansha": "985",
    "classic_nelson": "4326"
  },
  "examples": [
    {
      "japanese": "歴訪する(れきほうする)",
      "meaning": {
        "english": "make a tour of"
      },
      "audio": {
        "opus": "https://media.kanjialive.com/examples_audio/audio-opus/otozu(reru)_06_a.opus",
        "aac": "https://media.kanjialive.com/examples_audio/audio-aac/otozu(reru)_06_a.aac",
        "ogg": "https://media.kanjialive.com/examples_audio/audio-ogg/otozu(reru)_06_a.ogg",
        "mp3": "https://media.kanjialive.com/examples_audio/audio-mp3/otozu(reru)_06_a.mp3"
      }
    },
    {
      "japanese": "訪問する(ほうもんする)",
      "meaning": {
        "english": "visit [v.t.]"
      },
      "audio": {
        "opus": "https://media.kanjialive.com/examples_audio/audio-opus/otozu(reru)_06_b.opus",
        "aac": "https://media.kanjialive.com/examples_audio/audio-aac/otozu(reru)_06_b.aac",
        "ogg": "https://media.kanjialive.com/examples_audio/audio-ogg/otozu(reru)_06_b.ogg",
        "mp3": "https://media.kanjialive.com/examples_audio/audio-mp3/otozu(reru)_06_b.mp3"
      }
    },
    {
      "japanese": "訪れる(おとずれる)",
      "meaning": {
        "english": "visit [v.i., v.t.]"
      },
      "audio": {
        "opus": "https://media.kanjialive.com/examples_audio/audio-opus/otozu(reru)_06_c.opus",
        "aac": "https://media.kanjialive.com/examples_audio/audio-aac/otozu(reru)_06_c.aac",
        "ogg": "https://media.kanjialive.com/examples_audio/audio-ogg/otozu(reru)_06_c.ogg",
        "mp3": "https://media.kanjialive.com/examples_audio/audio-mp3/otozu(reru)_06_c.mp3"
      }
    },
    {
      "japanese": "訪ねる(たずねる)",
      "meaning": {
        "english": "visit [v.t.]"
      },
      "audio": {
        "opus": "https://media.kanjialive.com/examples_audio/audio-opus/otozu(reru)_06_d.opus",
        "aac": "https://media.kanjialive.com/examples_audio/audio-aac/otozu(reru)_06_d.aac",
        "ogg": "https://media.kanjialive.com/examples_audio/audio-ogg/otozu(reru)_06_d.ogg",
        "mp3": "https://media.kanjialive.com/examples_audio/audio-mp3/otozu(reru)_06_d.mp3"
      }
    }
  ]
}
        

If you request a kanji character for which Kanji Alive does not have data you will get an error response:

{
  "Error": "No kanji found."
}