I want to add my own HTML to Anki card. For example,

front side of the card

<div class="word">word</div><div class="ipa">[IPA]</div><br>...

Instead of the following (which I typed in return key after word when creating Anki card):


However, if I create such Anki cards from the web (AnkiWeb) by inserting the HTML, the actual card page just takes the input as text, not HTML. So the full HTML is just shown on the card.

I want to automate this process so I cannot use the app version.

Is it possible?



Hmmm... looking back and thinking about the implementation again, I feel it is much easier to handle SQLite database directly. Still, I’m looking forward to hearing an answer.

  • So you're looking for some sort of API to interact with AnkiWeb?
    – Hatchet
    Commented Jun 24, 2019 at 6:45

1 Answer 1


Since you only want to automate something (I'm assuming with some sort of program or script), I would recommend taking a look at AnkiConnect, which provides a REST API for interacting with the local Anki database. Note that this does not directly interact with what is stored on AnkiWeb.

  • That's incredibly useful! I tried a few requests but it worked like a charm. Thanks.
    – Blaszard
    Commented Jun 26, 2019 at 5:46
  • Actually, it is even easier to write a Python script with AnkiConnect than dealing with Selenium and AnkiWeb.
    – Blaszard
    Commented Jun 26, 2019 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.