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>
    <blocks>
      <block id="23" by="Sumwish" timestamp="2024-05-05T22:50:06Z" expiry="2024-05-06T22:50:06Z" reason="Autoblocked because your IP address has been recently used by &quot;[[User:Bernard721|Bernard721]]&quot;.&#10;The reason given for Bernard721&#039;s block is &quot;Removing content from pages&quot;" automatic="" nocreate="" />
      <block id="22" user="Bernard721" by="Sumwish" timestamp="2024-05-05T22:50:06Z" expiry="infinity" reason="Removing content from pages" nocreate="" autoblock="" />
      <block id="18" user="Taylor" by="Connor" timestamp="2019-07-24T23:42:53Z" expiry="infinity" reason="Intimidating behaviour/harassment: Account removed from Legacy." nocreate="" autoblock="" noemail="" />
    </blocks>
  </query>
</api>