Please take a look at MediaWiki API help. There you can find all the necessary information. You can choose the format of responses among the following list:
json, jsonfm, php, phpfm, wddx, wddxfm, xml, xmlfm, yaml, yamlfm
rawfm, txt, txtfm, dbg, dbgfm, dump, dumpfm, none