Basic API DomainListExtended

Synopsis
public array DomainListExtended( array $listdomains )
Description

Returns all domains in a customer account.

SOAP
This function can be called using SOAP.
XML
This function can be called using GET / POST requests.
Parameters
Type Parameter Mandatory Description
integer $partnerid yes Partner ID.
string $signkey yes Sign key.
string $username yes User name. (max. 25 characters)
string $password yes Password. (max. 16 characters)
integer $startfrom no Start position.
integer $results no Maximum number of results to return. (max. 100 per SOAP request)
integer $orderby no

Which property to order the results by:

  • 0 - Domain name (default)
  • 1 - Insert date
string[] $domain no Array of domain names in ACE format to filter for. (max. 100 per SOAP request)
Returns
Type Description
array

Array of domain records with the following properties:

Type Key Description
string domain Domain name in ACE format.
integer[] category Array of category IDs. See Domain Categories.
integer forsale Whether the domain should be listed for sale:
  • 0 - Not for sale
  • 1 - For sale
double price The domain price or 0 if no price has been set.
double minprice The minimum price for the domain or 0 if no minimum price has been set.
integer fixedprice Whether the domain is offered at a fixed price:
  • 0 - No
  • 1 - Yes
integer currency Currency of the $price and $minprice parameters:
  • 0 - EUR
  • 1 - USD
  • 2 - GBP
string domainlanguage ISO 639-1 two-letter language code. See Domain Languages.
array keywords Array of master keywords of this domain with the following properties:
Type Key Description
string keyword Keyword string.
string market Market code. See Keyword Markets.
int advertiser Advertiser ID.
int views Amount of views.
int clicks Amount of clicks.
double earnings Amount of earnings.
double rpm Revenue per 1000 views.
string inserted Inserted date of the keyword. (Format: YYYY-MM-DD HH:MM:SS)
string inserted

Inserted date of the domain. (Format: YYYY-MM-DD HH:MM:SS)

Warning: In some cases, this field might contain a UNIX timestamp rather than a date string.
double earningscomplete Complete earnings of the domain.
Version
1.0
<?php
try {
    // Create a new client by providing the endpoint to the constructor.
    $client = new SoapClient(
        null,
        [
            'location'     => 'https://api.sedo.com/api/v1/',
            'soap_version' => SOAP_1_1,
            'encoding'     => 'UTF-8',
            'uri'          => 'urn:SedoInterface',
            'style'        => SOAP_RPC,
            'use'          => SOAP_ENCODED,
        ]
    );

    // Set the values for the array
    $params = [
        'partnerid' => 1234,
        'signkey'   => 'abcdefghijklmnopqrstuvwxyz0123456789',
        'username'  => 'johndoe',
        'password'  => 'secret',
        'startfrom' => 0,
        'results'   => 100,
        'orderby'   => 0,
        'domain'    => ['example.com', 'example.net'],
    ];

    // Call the SOAP method
    $result = $client->DomainListExtended($params);

    // Display the result
    echo "<table>";
    echo "<tr>";
    echo "<td>Domain</td>";
    echo "<td>Category1</td>";
    echo "<td>Category2</td>";
    echo "<td>Category3</td>";
    echo "<td>For sale</td>";
    echo "<td>Price</td>";
    echo "<td>Minprice</td>";
    echo "<td>Fixedprice</td>";
    echo "<td>Currency</td>";
    echo "<td>Domainlanguage</td>";
    echo "<td>Masterkeywords</td>";
    echo "<td>Inserted</td>";
    echo "<td>Earningscomplete</td>";
    echo "</tr>";
    for($i = 0; $i<count($result); $i++)
    {
        echo "<tr>";
        echo "<td>".$result[$i]['domain']."</td>";
        echo "<td>".$result[$i]['category'][0]."</td>";
        echo "<td>".$result[$i]['category'][1]."</td>";
        echo "<td>".$result[$i]['category'][2]."</td>";
        echo "<td>".$result[$i]['forsale']."</td>";
        echo "<td>".$result[$i]['price']."</td>";
        echo "<td>".$result[$i]['minprice']."</td>";
        echo "<td>".$result[$i]['fixedprice']."</td>";
        echo "<td>".$result[$i]['currency']."</td>";
        echo "<td>".$result[$i]['domainlanguage']."</td>";
        echo "<td>";
        echo "<pre>";
        print_r($result[$i]['keywords']);
        echo "</pre>";
        echo "</td>";
        echo "</tr>";
    }
    echo "</table>";
} catch (SoapFault $e) {
    echo 'Error: '.$e->getMessage();
}
<?php
/* URL to Sedo's API */
$baseUrl = 'https://api.sedo.com/api/v1/DomainListExtended?';

/* API function parameters */
$params = [
    'partnerid'     => 1234,
    'signkey'       => 'abcdefghijklmnopqrstuvwxyz0123456789',
    'username'      => 'johndoe',
    'password'      => 'secret',
    'output_method' => 'xml',
    'startfrom'     => 0,
    'results'       => 100,
    'orderby'       => 0,
    'domain'        => ['example.com', 'example.net'],
];

/* build request URL */
$request = $baseUrl . http_build_query($params);

/* fire API request */
$fp = @fopen($request, 'r');

/* read response line by line */
while (!@feof($fp)) {
    echo fread($fp, 4096);
}

/* close the connection */
fclose($fp);

For a successful request, you will receive an XML document as response in this format:

<?xml version="1.0" encoding="UTF-8"?>
<SEDODOMAINLIST ver="1.0">
    <item>
        <domain type="xsd:string">example.com</domain>
        <category>
            <cat1 type="xsd:int">1</cat1>
            <cat2 type="xsd:int">2</cat2>
            <cat3 type="xsd:int">3</cat3>
        </category>
        <forsale type="xsd:int">1</forsale>
        <price type="xsd:double">99.99</price>
        <minprice type="xsd:double">0.00</minprice>
        <fixedprice type="xsd:int">1</fixedprice>
        <currency type="xsd:int">1</currency>
        <domainlanguage type="xsd:string">en</domainlanguage>
        <keywords type="xsd:string">
            <keyword>
                <keyword>Keyword</keyword>
                <market>xyz</market>
                <advertiser>0</advertiser>
                <views>0</views>
                <clicks>0</clicks>
                <earnings>0</earnings>
                <rpm>0</rpm>
                <inserted>2012-12-04 15:16:27</inserted>
            </keyword>
        </keywords>
        <inserted type="xsd:string">989704800</inserted>
        <earningscomplete type="xsd:double">0.94</earningscomplete>
    </item>
    <item>
        <domain type="xsd:string">example.net</domain>
        <category>
            <cat1 type="xsd:int">1</cat1>
            <cat2 type="xsd:int">2</cat2>
            <cat3 type="xsd:int">3</cat3>
        </category>
        <forsale type="xsd:int">1</forsale>
        <price type="xsd:double">99.99</price>
        <minprice type="xsd:double">0.00</minprice>
        <fixedprice type="xsd:int">1</fixedprice>
        <currency type="xsd:int">1</currency>
        <domainlanguage type="xsd:string">en</domainlanguage>
        <keywords type="xsd:string">
            <keyword>
                <keyword>Keyword</keyword>
                <market>xyz</market>
                <advertiser>0</advertiser>
                <views>0</views>
                <clicks>0</clicks>
                <earnings>0</earnings>
                <rpm>0</rpm>
                <inserted>2012-12-04 15:16:27</inserted>
            </keyword>
        </keywords>
        <inserted type="xsd:string">989704800</inserted>
        <earningscomplete type="xsd:double">0.94</earningscomplete>
    </item>
</SEDODOMAINLIST>

For an unsuccessful request, you will receive an XML document as response in this format:

<?xml version="1.0" encoding="UTF-8"?>
<SEDOFAULT ver="1.0">
    <faultcode type="xsd:string">Exxx</faultcode>
    <faultstring type="xsd:string">xxxxxx</faultstring>
</SEDOFAULT>