Skip to content

ECOSYSTEM

github-actions[bot] edited this page Oct 11, 2026 · 1 revision

The Anki API landscape — surfaces across ankitects & ankidroid

This page maps every API surface for talking to Anki discoverable in the two official GitHub organisations — ankitects (Anki desktop & infrastructure) and ankidroid (Anki for Android) — and says which of them this repository documents or implements. Sources are the upstream repositories themselves; third-party projects are marked as such.

Jump to: Surface map · ankitects repos · ankidroid repos · Third-party · Choosing

Surface map

# Surface Transport Official Auth Reference
1 AnkiWeb /svc/* — website API: add-ons, shared decks, study, account HTTPS JSON (POST/GET /svc/*) Unofficial (reverse-engineered from AnkiWeb's frontend) ankiweb session cookie / login token This repo: ENDPOINTS.md, API.md
2 Anki sync protocol — collection + media sync HTTP, zstd/multipart, anki-sync header Official Host key from u/p login SYNC.md
3 Self-hosted sync server — same protocol, your own box HTTP on :8080 Official (ships in ankitects/anki) SYNC_USER* accounts SYNC.md
4 Anki add-on (Python) API — aqt / anki modules, hooks In-process (desktop) Official n/a Upstream docs¹ (see below)
5 AnkiDroid ContentProvider / Instant-Add content://com.ichi2.anki.flashcards Official (Android) com.ichi2.anki.permission.READ_WRITE_DATABASE ANKIDROID.md
6 AnkiDroid intent API Android intents (ACTION_SEND, DO_SYNC) Official (Android) none ANKIDROID.md
7 AnkiDroid JavaScript API WebView bridge (AnkiDroidJS) Official (Android) none (developer contact required) ANKIDROID.md
8 AnkiDroid media/file APIs part of the provider (/media) Official (Android) as #5 ANKIDROID.md

¹ ankitects/anki/docs/api-python.md and docs/api-aqt-modules.md are Sphinx toctrees over auto-generated docstrings for anki (collection model) and aqt (Qt UI); the Rust API is cargo doc over rslib/ crates. Add-on how-tos live in the separate ankitects/addon-docs site (addon-docs.ankiweb.net).

Not to be confused: the sync protocol moves collections between devices; the /svc/* API (this repo) drives ankiweb.net's website features; the AnkiDroid APIs talk to the app on a device over Android IPC. They share no wire format and no auth — see SYNC.md — caveats.

ankitects repositories (API-relevant)

Repository What it gives you
anki The desktop app. Contains the sync protocol client + server (rslib/src/sync/), the collection library (rslib/), the Python packages anki + aqt (add-on API), and docs/ (Sphinx API docs, sync-server Dockerfiles)
addon-docs The official add-on writing documentation (hooks, editor APIs, scheduling) — source of addon-docs.ankiweb.net
anki-manual End-user manual, including the sync server manual
anki-addons Source of Anki's own bundled add-ons — worked examples of the add-on API
faqs AnkiWeb FAQ content (behaviour of the website APIs)
anki-changes Release/change notes — the history of API and protocol changes
ankimobile-docs AnkiMobile manual (iOS client behaviour, incl. custom sync servers)
anki-betas Beta release notes

ankidroid repositories

Repository What it gives you
Anki-Android The Android app. Hosts the api/ module (Instant-Add library: AddContentApi + FlashCardsContract), the ContentProvider implementation, the intent handlers, and the AnkiDroidJS WebView bridge; wiki pages: AnkiDroid API, JavaScript API, Third Party Apps
apisample Reference client of the Instant-Add API (dictionary demo + Tasker sync profile)
Anki-Android-Backend JNI bridge exposing Anki's Rust collection code (rslib) to Kotlin — the layer AnkiDroid's DB/scheduler is built on (not an app-facing API)
ankidroiddocs User documentation site (ankidroid.org)
anki Archived tracking fork of Anki desktop used for bundling — no API
acra-storage, acralyzer, ankidroid-triage Crash-reporting infrastructure (archived) — not APIs

AnkiDroid itself is a client of surface #2: it syncs through the standard Anki sync protocol (custom server URL supported since 2.16; earlier versions needed the /sync/ and /msync/ endpoints separately — see SYNC.md — client setup).

Third-party (not in either org)

Listed only to avoid confusion — none of these are maintained by ankitects or ankidroid:

  • AnkiConnect (foosoft/anki-connect) — local HTTP API add-on for Anki desktop; upstream's sync-server docs point to it when a REST API is wanted.
  • AnkiJS-API (jhhr/AnkiJS-API) — desktop-port of most of the AnkiDroid JS API (also on AnkiWeb as add-on 1490471827).
  • react-native-ankidroid — React Native wrapper over the Instant-Add API.
  • Third-party sync servers — exist, but upstream does not test them and they tend to lag protocol changes.

Choosing a surface

You want to… Use
Upload/update your add-on, list shared decks, drive study on ankiweb.net /svc/* in this repo — ENDPOINTS.md
Sync collections between devices / host your own sync server Sync protocol — SYNC.md
Read/write cards in AnkiDroid from another Android app Instant-Add / ContentProvider — ANKIDROID.md
Send a card to AnkiDroid without permissions, or trigger a sync Intents — ANKIDROID.md
Build custom reviewer UIs inside a card template JS API — ANKIDROID.md
Extend Anki desktop itself Add-on Python API (aqt) — ankitects/addon-docs
Control a local Anki desktop from a program Third-party AnkiConnect (external; see above)

Related pages: ENDPOINTS.md · API.md · SYNC.md · ANKIDROID.md · Home.md

Clone this wiki locally