Syncing WaniKani vocabulary with Anki

Hello there, everyone.
This is my first post so, first of all, I apologize if it’s not in the right category or something.

So, here is the thing: even tho I’m still a 4level, I have studied japanese before using Anki (which probably many of you already know). Now, I feel like WaniKani does a great job when it comes to teaching how to read or understand written japanese, and in fact only now do I realize how actually useful is to know radicals and kanji in order to understand vocabulary. So, for this part, thanks a lot Crabigator!
However I feel like something’s missing, because while I can read a word, I find it very hard to remember it when it comes to saying it or writing it, and I often find myself thinking “man I DID know how to say vulcano! it’s gotta be a mountain and a fire, but was it fire mountain or mountain fire?”. And of course, I remember it’s read かざん and that helps me a lot, but I still don’t like this feeling.
I decided to take advantage of the WaniKani API, and have created a tiny simple Anki addon that syncs the vocabulary from your WaniKani account (only vocabs you have already seen the lesson for) and adds it into an anki deck. It also allows to add the pronunciation audio to the card. Note that this only adds cards in the “missing” direction of WaniKani, this is, cards where the question is “vulcano” and the answer is “火山”. This is by no means a replacement to WaniKani, nor a full WK dump to Anki, but rather a complement that aims to help us all learn japanese better.

That said, the add-on can be found in the AnkiWeb page, and its source code on GitHub.

It is a homemade simple program that I made for myself and then thought to share with the community because I think it could be usefull for others too, so it is likely that there will be some bugs or glitches, for which I apologize in advance. Feel free to reach me out whether here or on GitHub if you find any problems.

The installation guide is fairly simple, especially if you have already installed any other Anki addons. Otherwise, simply open Anki, go to Tools>Add-ons and click on the “Download Add-ons” button. You will be asked to paste the addon code, which you can find in the ankiweb link provided above. In this case, the code is 710584815.
After the download, you’ll have to configure it’s settings, by double-clicking it in the add-ons list. You will see a Json file, like following.

Replace the text “Your API key here” with your actual API key (which you can find here) (preserve the doublequotes). You can then replace the deck name to your desire, or leave it as it is (which would create a deck named 日本語 and a subdeck named WaniKani). The include_audio field specifies whether or not the program should download and add to your cards the pronunciation audios. To not download them, just replace “true” with “false”. Lastly, the last_sync field is for internal usage and should not be modified.

Note it is important that you configure the addon right after installing it, as leaving the placeholder for the API_KEY might result in an erratic behaviour.

With this you should be ready to go, and the next time Anki is started it will sync all your vocab. Please keep in mind that when starting it for the first time it may take some minutes. This is due to WaniKani’s limit of 60 requests per minute (meaning we can only download 60 words per minute), so please be patient. In next executions it will only download new words, thus being much faster.

And this is it! I’m not aware if something similar has already been done, if it has I apologize for the duplicate post. If not, then I hope it’s helpfull to some of you!
See you in Japan!