You are looking at the HTML representation of the XML format.
HTML is good for debugging, but is unsuitable for application use.
Specify the format parameter to change the output format.
To see the non HTML representation of the XML format, set format=xml.
See the complete documentation, or API help for more information.
<?xml version="1.0"?>
<api>
  <query>
    <logevents>
      <item logid="8" ns="8" title="MediaWiki:Mainpage" pageid="6" type="patrol" action="patrol" user="Admin" timestamp="2017-09-02T12:25:29Z" comment="">
        <patrol cur="10" prev="0" auto="1" />
      </item>
      <item logid="7" ns="0" title="Why did you come here?" pageid="5" type="move" action="move" user="Admin" timestamp="2017-09-02T12:16:05Z" comment="revert">
        <move new_ns="0" new_title="Why did you come here" />
      </item>
      <item logid="6" ns="0" title="Why did you come here" pageid="1" type="move" action="move" user="Admin" timestamp="2017-09-02T12:15:14Z" comment="">
        <move new_ns="0" new_title="Why did you come here?" suppressedredirect="" />
      </item>
      <item logid="5" ns="4" title="Why did you come here:Main Page" pageid="4" type="delete" action="restore" user="Admin" timestamp="2017-09-02T12:12:43Z" comment="1 revision restored" />
      <item logid="4" ns="4" title="Why did you come here:Main Page" pageid="4" type="delete" action="delete" user="Admin" timestamp="2017-09-02T12:11:23Z" comment="content was: &quot;#REDIRECT [[Why did you come here]]&quot; (and the only contributor was &quot;[[Special:Contributions/Admin|Admin]]&quot;)" />
      <item logid="3" ns="4" title="Why did you come here:Main Page" pageid="4" type="move" action="move" user="Admin" timestamp="2017-09-02T12:09:09Z" comment="">
        <move new_ns="0" new_title="Why did you come here" />
      </item>
      <item logid="2" ns="0" title="Main Page" pageid="2" type="move" action="move" user="Admin" timestamp="2017-09-02T12:07:22Z" comment="">
        <move new_ns="4" new_title="Why did you come here:Main Page" />
      </item>
      <item logid="1" ns="0" title="Main Page" pageid="2" type="patrol" action="patrol" user="Admin" timestamp="2017-09-02T12:03:45Z" comment="">
        <patrol cur="2" prev="1" auto="1" />
      </item>
    </logevents>
  </query>
</api>