[Javascript] Add Wanikani Kanji Information to Vocabulary Cards on Anki

This is my first time creating a topic here, so hello everyone.

I am doing sentence mining on anki, and as I am only level 21 on Wanikani as of now, I encounter kanji I haven’t unlocked or know yet. So sometimes what I do is try to look up the kanji on wanikani, I don’t try to memorize it but just to see a bit about the kanji my word is made up.

But I am lazy, so I had yesterday the idea of using the WaniKani API to automatically add that information to my cards.

So I’ve written a javascript code to add the kanji information to my vocabulary cards automatically.

It even works on AnkiDroid:

I am not sure if it would work on iOS as I don’t have one, but I think it should.

So I decided to share here the code. I coded it yesterday in a few hours, so it is not perfect, and it is actually the first time I am using asynchronous functions, so probably the code is ugly and not perfect.

You can find more information and how to use here:


And that’s it, let me know if you got any questions.

Edit 10/12/2021

  • I added kanji from KanjiDamage and https://kanjiapi.dev/
  • The style changed a bit.
  • If WK kanji, the radicals and kanji send you to the their Wanikani page, if they are from Kanjidamage then there, and lastly if they are not there either, they go to Jisho.org
  • It now requieres jQuery to work, so I included a link to it on the code given.

Video example: