All actions here work exactly the same as Anki-Connect unless specified otherwise.
All calls support the version <= 4
and > 4
format.
Versions <= 4
returns the plain result on success (with no JSON object wrapping said result).
However, versions > 4
returns a JSON of the following format on success:
{
"result": (result),
"error": null
}
On error, all versions will send the following:
{
"result": null,
"error": (error)
}
Do not expect the error message to be the exact same as the PC Anki-Connect error messages.
- See: Anki-Connect
deckNames
- Used by Yomichan
- See: Anki-Connect
deckNamesAndIds
- Used by Yomichan
- See: Anki-Connect
modelNames
- Used by Yomichan
- See: Anki-Connect
modelnamesandids
- Used by Yomichan
- See: Anki-Connect
modelFieldNames
- Used by Yomichan
- See: Anki-Connect
findNotes
- Attempting to escape a query with spaces using quotes will not work, unless
AnkiDroid is using the new (Rust) backend.
For example, the following query will not work:
"Note:My Mining Note"
- Expect this to take longer to run compared to the PC version of Anki-Connect.
- Used by Yomichan
- See: Anki-Connect
guiBrowse
- This call only works with AnkiDroid versions past October 8, 2022 (2.16alpha88 and above)
- Used by Yomichan
- See: Anki-Connect
canAddNotes
- Internally, this behaves entirely different from Anki-Connect. Anki-Connect literally attempts to add
a note (without saving the collection) in order to determine whether the note can be added or not.
AnkiConnect Android instead queries the collection with the first field, and sees if any other cards
exist.
For example, if your first field was
Word
,canAddNotes
determines whether a note can be added or not by seeing if the queryWord:(WORD FIELD CONTENTS)
finds any matches. Finding any match will returnfalse
, and no matches will returntrue
. - Because this internally queries the database, this action suffers from the same problems as
findNotes
. To guarantee the correctness of the query, you must use the new backend. - If all notes have the same model, then the call is optimized as we can call an internal Ankidroid API function on the entire set of data.
- Used by Yomichan
- See: Anki-Connect `canAddNotesWithErrorDetail
- Currently, if a card fails
canAddNotes
, the error message will always say it's due to it being a duplicate, even if there was a different reason for the failure (For example, in Anki-Connect a card could fail thecanAddNotes
check if the first field was empty). - Used by Yomitan
- See: Anki-Connect
notesInfo
- Used by Yomitan
- See: Anki-Connect
addNote
- Used by Yomichan
- Anki-Connect desktop allows using various formats for the media file, but this api currently only
supports using the
url
anddata
field. Does not supportskipHash
for theurl
field. All ofpicture
,audio
andvideo
are supported.
- See: Anki-Connect
updateNoteFields
- See addNote for supported media actions.
- See: Anki-Connect
storeMediaFile
- Filenames will get a random number appended to the end of them, i.e.
file.png
becomesfile_123456789.png
- Used by Yomichan
- See: Anki-Connect
multi
- Used by Yomichan