2

Is there any MediaWIki API where I can submit entire (potentially very large) mediawiki text (for wikipedia article) that will give me HTML that is exactly the same as HTML article viewed on wikipedia for the english language?

ace
  • 11,526
  • 39
  • 113
  • 193
  • 1) Probably not. 2) Wikipedia article wikitext is hardly ever self-contained; it's full of references to templates, and you need the source of those templates (and any templates they reference, etc.) to render the page. 3) I believe this is a "recommendation question" and therefore off-topic for SO. – hobbs Mar 04 '16 at 07:01
  • This is not recommendation question but a question about programming related to mediawiki API. Recommendation question would be do you recommend to use API A as opposed to API B. – ace Mar 04 '16 at 09:07

3 Answers3

3

You can use action=parse for this. I'm not sure what the limits are, though you might consider sending the text in the body of a POST request, instead of in the URL of a GET request.

svick
  • 236,525
  • 50
  • 385
  • 514
3

What svick said is the standard method. Alternatively you can use the Parsoid API which returns different HTML (but it will look the same).

Unlike action=parse, this is not part of MediaWiki; if you want to use it for your own wiki, see its documentation on how to set it up.

Tgr
  • 27,442
  • 12
  • 81
  • 118
0

It's not a mediawiki api but you can use Pandoc to convert mediawiki text to html or an other format.

Wivu
  • 71
  • 8