how to change this? : How if we want to make the API Code?
this is my code

This is the display using the code below. web: https://goldmasterid.000webhostapp.com/G2G/index1.php

   

     <?php
    include('simple_html_dom.php');
    
    $url = 'https://www.g2g.com/wow-us/gold-2299-19249?&server=30805&faction=543&sorting=price@asc';
    //masuk ke web html
    $html = file_get_html($url);
    //cari rate harga
    
    foreach($html->find('a[class^="seller__name"]') as $a) {
        echo $a->innertext.'<br />';
    }
    
    foreach($html->find('span[data-ppu]') as $span) {
        echo $span->innertext.'<br />';
    }
    ?>

the results for the above code like this
[enter image description here][1]


this is the example that I want
[enter image description here][2]

for example like ss above
how to write the code ???
Please help.

  [1]: https://i.stack.imgur.com/nYzc1.png
  [2]: https://i.stack.imgur.com/3Ul0s.png