2

I want to add new entries to Wiktionary programmatically. Is there a specific Wiktionary API or some sort of hacky way of doing that?

Aleksandar Savkov
  • 2,894
  • 3
  • 24
  • 30

1 Answers1

2

Wiktionary entries are plain wikitext. You can use the edit API to add a new entry, but you'll have to figure out how to generate the right wikitext.

Tgr
  • 27,442
  • 12
  • 81
  • 118
  • Hi, thank you for your answer. Would you mind elaborating on how that would look like in code assuming I can produce the `wikitext`? – Aleksandar Savkov May 08 '17 at 10:12
  • You can find some examples in the [API docs](https://www.mediawiki.org/wiki/API:Edit/Editing_with_Python). (You would have to use `text` instead of `appendtext` since you probably want to override the page content.) – Tgr May 08 '17 at 11:03
  • Of course there are all kinds of [libraries](https://www.mediawiki.org/wiki/API:Client_code) which do the heavy lifting for you. – Tgr May 08 '17 at 11:05