API Requests Frequently Timeout - HTTP 503 Error

If you’re getting HTTP 503 errors when using something that accesses the API it’s because WaniKani isn’t able to handle the request before timing out.

Attempting to request a large amount of data from the API will timeout after ~30s and return a 503 error. This makes the https://www.wanikani.com/api/v1.2/user/<key>/vocabulary/ link useless and intermittently breaks anything that uses it.

This is still a problem.

I just responded to an email reporting this exact issue. I'll just copy and paste my response here...



---



It is something I am aware of and is one of the higher priority issues I would like to address. Unfortunately, fixing this issue would probably require an application restructuring, which is something that won’t happen immediately.



The one immediate work-around I can suggest for you is to do multiple API calls at small group intervals. For example, in groups of 10:


https://www.wanikani.com/api/user/0f8073554e19479b2289a040f2f3bbee/vocabulary/1,2,3,4,5,6,7,8,9

https://www.wanikani.com/api/user/0f8073554e19479b2289a040f2f3bbee/vocabulary/10,11,12,13,14,15,16,1...



It is not ideal (5 requests have to be made for 50 levels at 10 intervals), but it’ll get the results you want without the time outs. I would experiment with the intervals and see what produces the best results (20? 25?)



Sorry about the inconvenience and thanks for the understanding.