Skip to content
github-actions[bot] edited this page Oct 11, 2026 · 4 revisions

AnkiWeb API — wiki

Documentation for athulkrishna2015/ankiweb-api: a full Python client for AnkiWeb's reverse-engineered /svc/* API, plus tools to inspect, download and upload Anki add-ons.

AnkiWeb ships no official API. Everything here is recovered from the site's own frontend bundle, so it may change without notice — treat it as unofficial and subject to AnkiWeb's terms and rate limits.

Pages

Page Contents
API.md Client reference: installation, authentication, all 48 public methods, error handling, the codec, upload verification, and the description/caching gotchas.
ENDPOINTS.md All 41 public /svc/* endpoints with every request field, response field and enum, grouped by area.
ECOSYSTEM.md Map of every Anki API surface discovered in the ankitects and ankidroid GitHub orgs — which one to use for what, and the repositories that host them.
SYNC.md The official Anki sync protocol and self-hosted sync server: /sync/* + /msync/* endpoints, wire format (anki-sync header, zstd), host-key auth, SYNC_* server configuration, client setup.
ANKIDROID.md AnkiDroid integration APIs: Instant-Add/ContentProvider (URIs, columns, AddContentApi), the intent API, and the AnkiDroidJS JavaScript bridge for card templates.

Quick start

uv tool install ankiweb-api
ankiweb info 805854302
from ankiweb_client import AnkiWebClient

client = AnkiWebClient()      # reads .env (ANKIWEB_USERNAME / ANKIWEB_PASSWORD)
client.login()

for item in client.shared_list_mine()["items"]:
    print(item["id"], item["title"])

At a glance

  • 41/41 public endpoints as typed methods — account, decks, editor, search, shared, study. The 22 /svc/radmin/* admin endpoints are decoded but deliberately not exposed; they are listed as reference only.
  • Schema revision 2026-10-10, 174 messages, regenerated from AnkiWeb's live bundle by tools/generate_schema.py.
  • Pure stdlib codec — requests is the only runtime dependency.

Things worth knowing

  • Descriptions cap at 65,535 bytes. Over that the upload is rejected, not truncated, and the add-on keeps its old description — so it looks like a silent wipe. See API.md.
  • item-info is cached for 10 minutes. Reads go out with a cb cache-buster; ankiweb info prints a verify: link that bypasses the cache.
  • Uploads are irreversible. An upload replaces the file on the target add-on id. Test with the synthetic fixture from make_test_addon.py, never a real add-on.

Outside the wiki

Clone this wiki locally