You could use the Revisions API:
https://en.wiktionary.org/w/api.php?action=query&prop=revisions&titles=test&rvslots=*&rvprop=content&formatversion=2
or the Parse API:
https://en.wiktionary.org/w/api.php?action=parse&page=test&prop=wikitext&formatversion=2
More examples are provided in the docs.