In what formats can I retrieve texts from wikisource?

The obvious format is the HTML they deliver for reading, but the HTML source is very layout oriented and messy.

Is there a downloadable source format available that is more logical (XML or wiki format)? How can I download it?

2 Answers 2


For automated processing, by far the best alternative is a database dump. They might be a little bit old, but hopefully that won't be a problem.

You can select database dumps by language and wiki, with or without edit history.

At the time of writing, the most recent enwikisource dump is from 26 December 2015. You can also find dumps for dewikisource, frwikisource, etc.

  • Age is not a problem, but size matters: I am basically interested in a selection of about 2 dozen texts.
    – user6083
    Commented Feb 2, 2016 at 8:15
  • @jknappen That's more of a (mediawiki) technical question. There's probably a forum somewhere on wikimedia to ask it.
    – gerrit
    Commented Feb 2, 2016 at 10:41
  • I found out that I can export all pages from one category using Special:Export (available in the "special pages" menue). To get at the textual content, I had to check the box "include templates". The format is still crowded, but ways better than the HTML.
    – user6083
    Commented Feb 3, 2016 at 16:36

If you are just interested in two dozen text I think it is easiest just to request for the raw wikitext, for instance for the 'The Metal Pig' page:


This query returns the raw wikitext, i.e., with unexpanded templates and category links.

Your Answer

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