Overall Statistics


wow, having an api is great. I like to build a VUE application for monitoring my progress.
The overview page has a statistics about how many items each stage holds at the moment.

Apprentice: x kanji, y vocab, z radicals
Guru: …

I have not found the api request to get these numbers.

Can anyone give me a hint please?

Thank you,

You could use the subjects endpoint with a level filter.
GET https://api.wanikani.com/v2/subjects?levels=<level>
You’ll need to count them yourself though, looking at the object property for each item.

The possible values are radical, kanji, and vocabulary

That’ll do it with one request. If you want to be lazy, and spend 3 requests, you can just filter the subjects by both level and type, and use the response.total_count value. For example:

GET https://api.wanikani.com/v2/subjects?levels=1&types=kanji
  "object": "collection",
  "url": "https://api.wanikani.com/v2/subjects?levels=1&types=kanji",
  "pages": {
    "per_page": 1000,
    "next_url": null,
    "previous_url": null
  "total_count": 18,
  "data_updated_at": "2020-06-17T21:10:46.748116Z",
  "data": [
1 Like

Hi Bladepoint, thank you for you fast and very detailed answer.

I was able to test it, it works, yet it is not th statistic I need.

I want to reduce my apprentice items, thus I need a list of all items of apprentice level, regardless of level.

Second, I want to document my progress, my documenting the number in each stage though time.

Kind regards,

There are two scripts that can provide this list that I know of.

Dashboard Apprentice displays the complete list of apprentice items in the form of icons.

Item Inspector displays items in a table. You will need to configure a table using the SRS level filter to make it do what you want.

1 Like

Do you want to study the items so you can move them out of apprentice? There are two solutions that you could use.

The Item Inspector script mentioned in the previous post can be configured to display the reading and meaning of items in a tooltip. You go recite the meaning and reading of items and check if you got them right by displaying the tooltip. If you click on the item the item page will display. This is handy if you have business with the mnemonics.

If you prefer studying with a quiz you can use the Self-Study Quiz. You must configure a preset with the SRS Level filter to select the apprentice items.

The Heatmap script does some of that. It displays a calendar and if you click on a day it displays the activity for the day with useful statistics.

1 Like

If after all my suggestions you still want to write your own code I suggest you read existing scripts to see how it is done. That is how most scriptwriters have learned how to write scripts. At least this is how I have learned how to write mine. Tampermonkey provides the option to open a script in an editor where you can read it.

I suggest you begin with Dashboard Apprentice I have mentioned before. This script is a rather easy read and it is close to what you want to do. You will learn how to use the Open Framework which is something I recommend. It includes a wrapper that takes care of the messy details of extracting the data from Wanikani, including cache and rate limits. Most scripts use it nowadays.

1 Like

Essentially how I learned to program in general. Before I started scripting for WK I only had minimal experience with Python.

1 Like

Note that if you just want to see all your apprentice items or the like, you can just use wkstats.

1 Like

Wow, so many helpful answers in such a short time. Thank you indeed. I will give all proposals a closer look.