You can do this with the action=parse API.
https://www.mediawiki.org/wiki/API:Parsing_wikitext#parse
There's also index.php?action=render
(
https://en.wikipedia.org/w/index.php?title=Example&action=render)der),
which is technically not deprecated, but please use the API if possible ;)
--
Bartosz Dziewoński