AnkiConnect

AnkiWeb addon 2055492159 Built with AI

6 other versions of this addon exist. Compare versions ↓

Lets external applications communicate with a running Anki collection over a local HTTP API to search, create, and update notes and cards.
AI-generated summary; may contain mistakes.

card-creationsync-integrationsearchdeveloper-tools

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
527 (πŸ‘ 459 Β· πŸ‘Ž 68)
Updated
2026-11-29
Anki versions
26.08~
License
GPL-3.0 (from the headers of the Python files)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-11-29 (2 days before the snapshot).
  • Test files: 18.
  • GitHub Actions workflows: 2.
  • Commits in the last year: 48.
  • Issues: 0 open, 231 closed.
  • Pull requests: 0 open, 162 merged.
  • Median first response: 137 hours (156 answered issues and pull requests).
  • Outside pull requests: 84% of 100 merged.

GitHub

Repository
foosoft/anki-connect Β· more by foosoft
Stars
⭐ 2104 · forks 235 · open issues 0
Last commit
2026-11-28
License
A license file that GitHub does not recognize
Languages
Python, Shell, PowerShell, Makefile
Tests
18

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.0–2022-07-14
2.1.12.1.142025-11-09
2.1.1526.08+2026-11-29
History across monthly snapshots

Loading…

Compare versions

The original addon and its forks. The best value in each column is in bold.

VersionWorks on Anki 26.09.4MaintenanceLast activity VotesApprovalGitHub starsNotes
AnkiConnect this addon original likely active 29 Nov 2026 πŸ‘ 459 Β· πŸ‘Ž 68 84% 2.1k
↳ πŸ”™Anki Connect Downgrader (Fork by Shige࢞) (AI-detected; may be wrong) likely stale 5 Nov 2025 πŸ‘ 25 Β· πŸ‘Ž 0 87% –
↳ AnkiAPI likely abandoned 12 Jun 2023 πŸ‘ 1 Β· πŸ‘Ž 0 21% 17 beta
↳ OEConnect (AI-detected; may be wrong) supported stale 9 Apr 2025 πŸ‘ 1 Β· πŸ‘Ž 0 21% –
↳ AnkiConnect Extended (AI-detected; may be wrong) supported active 27 Oct 2026 πŸ‘ 1 Β· πŸ‘Ž 0 21% 7
↳ Agent Connect πŸ”§ β€” let AI build, fix, and tune your Anki (AI-detected; may be wrong) likely active 26 Nov 2026 πŸ‘ 0 Β· πŸ‘Ž 0 – 3
↳ Your Anki Connector (AI-detected; may be wrong) likely active 30 Nov 2026 πŸ‘ 0 Β· πŸ‘Ž 0 – 0

Forks can add features or work in a different way. Read the description before you change to another version. Fork detection is incomplete, so other versions can exist.

Similar addons

AnkiAPI fork

Runs a local HTTP JSON API exposing Anki actions such as querying decks, creating cards, and managing notes, serving as a backend for the osu!gengo game mode.

card-creationsync-integrationfork-or-reuploadbeta

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 17 Anki 2.1.16~ Updated 2023-06-12
Magic Image Fetcher

Automatically fills empty Picture fields in a selected deck with high-quality images from Pexels, Unsplash, or Google Images via SerpAPI, using chosen note fields as search terms.

card-creationsync-integrationnote-management

6 votes 44% approval πŸ‘ 5 Β· πŸ‘Ž 1 ⭐ 3 Anki 25.02.4~ Updated 2026-04-01

Description

AnkiConnect enables external applications such as Yomichan to communicate with Anki over a simple HTTP API. Its capabilities include executing queries against the user's card deck, automatically creating new cards, and more.

See github.com/FooSoft/anki-connect for more information.

README

Anki-Connect

Tests Coverage

Anki-Connect lets applications search, create, and update notes and cards in a running Anki Desktop collection through a local HTTP API.

Use API v1 for new integrations. It provides JSON-RPC 2.0, consistent records, structured errors, and explicit completion for long-running and interactive operations.

Existing applications can keep using the legacy API. The root endpoint, version 6 actions, parameter names, API key configuration, and response formats remain available. Existing clients do not need to migrate to v1. See the legacy guide for supported actions and compatibility details.

Install and run

Anki-Connect requires Anki Desktop 2.1.15 or later. Compatibility is tested with every Anki 2.1 and later GitHub release listed in tools/anki_matrix.json, including prereleases. Some methods need newer native features and report unsupportedCapability on older releases; use api.describe to check method availability in your running Anki instance.

Methods Available from
collection.sync 2.1.28
collection.undo, deckPresets.*, scheduling.repositionNewCards 2.1.45
scheduling.answer, scheduling.answerMany, scheduling.getQueue, scheduling.predict 2.1.45 with the v3 scheduler enabled (the default for new collections from 2.1.66)
editors.openNote (and legacy guiEditNote) 2.1.50
application.importFile (and legacy guiImportFile) 23.10

Install Anki-Connect from AnkiWeb:

  1. In Anki, open Tools β†’ Add-ons β†’ Get Add-ons.
  2. Enter add-on code 2055492159 and confirm the installation.
  3. Restart Anki and open the profile you want your application to use.

Keep Anki running while your application uses the API; requests operate on the active profile's collection.

On macOS, Anki-Connect automatically suppresses App Nap after its HTTP listener starts, keeping API requests responsive while Anki is minimized or in the background. Suppression lasts until Anki exits and still allows normal system sleep. No defaults write commands or separate App Nap add-on are needed.

Make your first request

The default v1 endpoint is http://127.0.0.1:8765/api/v1:

curl --request POST http://127.0.0.1:8765/api/v1 \
  --header 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"decks.list","params":{}}'
{"jsonrpc":"2.0","id":1,"result":[{"id":"1","name":"Default","kind":"normal","presetId":"1"}]}

Continue with the v1 quick start and method reference. It includes Python and JavaScript clients and request examples for all 94 methods. Entity IDs are strings. Long-running methods return operation handles; poll operations.get for the final result. api.describe reports the available methods and limits.

The legacy guide covers all 122 actions, their existing numeric IDs and response formats, and corresponding v1 methods. Both endpoints operate on the same active collection.

For an existing integration, send requests to http://127.0.0.1:8765/ using the legacy action format:

curl --request POST http://127.0.0.1:8765/ \
  --header 'Content-Type: application/json' \
  --data '{"action":"deckNames","version":6,"params":{}}'
{"result":["Default"],"error":null}

Configuration

Open Tools β†’ Add-ons β†’ Anki-Connect β†’ Config, then restart Anki after changing listener settings.

Setting Default Purpose
webBindAddress 127.0.0.1 Listen on the local machine.
webBindPort 8765 HTTP port.
apiKey null Optional authentication key.
webCorsOriginList ["http://localhost"] Allowed browser origins.
ignoreOriginList [] Origins for which permission prompts are suppressed.

When a key is configured, v1 uses Authorization: Bearer <key> and legacy requests use the JSON body’s key property. Browser origins require permission separately. See v1 access rules and legacy authentication.

On Windows, allow Anki through the firewall if prompted. Anki must remain running and responsive for requests to complete.

Troubleshooting

  • Connection refused: check that Anki is running, the add-on is enabled, and your client uses the configured address and port. Restart Anki after installing the add-on or changing listener settings.
  • Authentication or browser access errors: check your API key and origin permissions using the access rules linked above.
  • A write is blocked by an editor: close editors for the affected notes, then retry the request. See the API guide for method-specific requirements.
  • A method is unavailable: call api.describe to inspect runtime capabilities and check the method's requirements in the API guide.

Contributing

See CONTRIBUTING.md for API changes, tests, and review guidelines, ARCHITECTURE.md for runtime structure, and api-v1.schema.json for the machine-readable contract.

To install from source, download or clone this repository and run make package (or python tools/package_addon.py on Windows). In Anki, choose Tools β†’ Add-ons β†’ Install from file, select the generated AnkiConnect.zip, and restart Anki. The ZIP replaces the existing Anki-Connect add-on code while retaining its saved configuration.

For development on Linux or macOS, make link links plugin/ into an existing Anki add-ons directory. Use temporary profiles and collections when testing. Run make test or .\tools\test.ps1 on Windows for the latest Anki version in the matrix, including GUI scenarios. To skip GUI scenarios, use make test-unit or .\tools\test.ps1 -NoUI. To test the full compatibility matrix, use make test TEST_ARGS=--all-versions, ./tools/test.sh --all-versions, or .\tools\test.ps1 -AllVersions. To measure plugin/ line and branch coverage, use make test TEST_ARGS=--coverage or ./tools/test.sh --coverage; open coverage-report/html/index.html afterwards. On Linux without a display, set QT_QPA_PLATFORM=offscreen; the runner then hides any desktop session from Qt and uses software Qt Quick rendering.

Run make help for all development commands. Use make test VERSIONS="26.9.4" to select Anki versions. The runners cache dependencies and interpreters in .test-cache/ at the repository root. make check runs contract, API documentation, coverage, and syntax checks in your current Python environment; select an environment with make check PYTHON=/path/to/python. Use make contract to regenerate the bundled contract. The Make targets use the scripts in tools/, which can also be run directly without Make. GitHub Actions runs the same suite; see CONTRIBUTING.md for the CI matrix.