anki

Upload notes to Ankiweb via (REST?) api


I am curious if AnkiWeb has a (REST) api or something similar. I am building a cross platform application and would like to be able to add notes to ankiweb from it. As AnkiDroid is able to add to and sync with my AnkiWeb account this should be somehow possible.

Is there some kind of documentation which I can read to get started with it?


Solution

  • AnkiWeb does not posses a public interface for adding, removing or modifying notes. It only allows you to synchronize databases, which is not quite the same. However, even though I am not aware of any documentation regarding the interface used for the synchronization, some people achieved rewriting the synchronization protocol from the server pov (and thus to write a custom synchronization server).

    However, there is an other way, which is interacting with Anki Desktop instead of Anki Web, through Anki Connect, which is an add-on that exposes some API.

    Also note that AnkiWeb has purposefully no API to access to, and accessing through a non-official mean is a violation of Anki's terms:

    Because other clients can cause problems, AnkiWeb does not currently allow access from browser extensions or other third-party clients.

    They even encourage you to use AnkiConnect:

    Instead, please use AnkiConnect, which lets you modify your local connection over a web socket without any negative impact on AnkiWeb.