Documentation of internal server functionality

While debugging an add-on that provides card stats I bumped into the need to understand the API calls from /_anki/card-info.js

Using a proxy I’ve started to reverse engineer the API responses, but it’s slow work. I’ve poked around card-info.js and after unminifying it seems very obfuscated.

So, I’m wondering if anyone has encountered any documentation on the API endpoints on the internal server, e.g. (but not limited to…) the POST request to /_anki/cardStats

The source is available: anki/ts/card-info at main · ankitects/anki · GitHub


Also, beware that everything that is not “publicly” documented is not considered a public API, and therefore it’s not considered a stable API. That protocol may change without Anki declaring it a breaking change (although it seems unlikely that this would happen often).

1 Like