Alvin Brown provides a tutorial on how to use the GdAuctionsBiddingWS_v2 api to search and retrieve domain names listed on GoDaddy Aftermarket by keyword.
Today’s tutorial is a bit tricky. Why? Well, you’ll need to have access to GoDaddy’s old API: GdAuctionsBiddingWS_v2.
You’re likely not familiar with this API by name, yet if you’ve been around domain investing long enough, then you’ve likely experienced or heard of auction bots and auction bot sniping.
Yeah, I know, I know… This tutorial likely stirs the pot a bit for those who do not have access to the api. That’s not the intention of this tutorial. Nevertheless, for those that do have access and would like to make use of the API, well, this tutorial is for you.
But no worries for those of you who don’t have access to the original API, I’ve kindly provided a few tutorials for GoDaddy’s most recent API. Read more on how to get started using GoDaddy’s more recent API.
For today’s tutorial, the GdAuctionsBiddingWS_v2 API offers nearly 20 different methods to interact with the GoDaddy Aftermarket, including but not limited to the following:
Today’s tutorial focuses on the following two API methods: GetAuctionListByAuctionType and GetAuctionListByAuctionType2.
In short, both methods allow for searching the aftermarket based on a keyword, auction type, and search type.
The difference between the two is that the GetAuctionListByAuctionType includes beginsWithKeyword and auctionType, whereas GetAuctionListByAuctionType2 includes keyWord, auctionType, and searchType in addition to pageNumber and rowsPerPage used by both methods.
For the sake of time and providing an example script that can be downloaded, I won’t dive into the line-by-line details, but I will provide a high-level overview of the example code.
First things first, you must have access to the GdAuctionsBiddingWS_v2 API. If you don’t, then there is no reason to continue this tutorial. This is the mission-critical step of all.
And for the record, GoDaddy is not allowing or issuing access to anyone else. However, if anyone does have the midas touch to in managing to gain access, then bottle and package up how you did it and sell it — an army of folks await!
As for the tutorial itself, the first thing to note about the example script, which implements the GetAuctionListByAuctionType2 method, is that the following variables and their respective string values must be defined:
- pageNumber – value is set to the numeric value of 1.
- rowPerPage – value can be set to one of the following: 15, 25, 50, 100, 200, 300, and 500.
- keyword – value can be set to a desired keyword phrase contained in domain names, excluding spaces and special characters, minus hyphens.
- auctionType – value be set to one of the following: auction or buy now.
- searchType – value can be set to one of the following: most active, featured, expiring, ending soon, buy now, closeouts, bargainbin, and a-z listings.
The keyword ‘domain’ is used as the keyword variable value in this example, which returns a list of domains in auction containing the keyword ‘domain’.
One thing I was in the dark on are the actual values for auctionType and searchType variables. I cannot confirm those are the actual variables to be used, but guessed based on the values I discovered using Developer Tools to inspect the search elements on GoDaddy’s Aftermarket web page.
If anyone knows with certainty about these values, do feel free to chime in with comments in the comments section below.
Now that variables are defined with their respective values, the SOAP request and response can be made using the GetAuctionListByAuctionType2 method. While PHP provides a SOAP class nowadays to make the request, I’ve purposely chosen to use cURL and handcraft the SOAP header and body request (as shown below).
SOAP 1.2 Request
The above example SOAP is a 1.1 Request. If you’re using SOAP 1.2, then the following request can be used as a start point:
SOAP 1.2 Request
The aforementioned example requests, specifically the SOAP 1.1 body and header, are implemented in the example code.
One thing to note is that GoDaddy API credentials from the most recent API release is needed to authenticate the API request.
In the example code, be sure to replace the X’s in the line of ‘Authorization: sso-key XXXXXXXXXXXXXXX:XXXXXXXXXXXXXXX’ with the proper API credentials.
Once the API credentials are created, the API can be authenticated and request successfully made using the SOAP API WSDL url (see example code to obtain url).
Being well on our way to successfully making a SOAP request, the next thing to prepare for is the SOAP response and how to parse it — see the examples below:
SOAP 1.1 Response
SOAP 1.2 Response
The focal point of the SOAP response is the GetAuctionListByAuctionType2Result element, which contains a string of auction data (see example code below).
<Auction ID=”327387240″ Name=”ROCKETFLY.NET” Traffic=”3″ BidCount=”0″ Price=”$5 USD” ValuationPrice=”$418 USD” TimeLeft=”11H 7M ” RowID=”1″/>
For each domain returned, the aforementioned Auction element is return for each matching domain and contains the following attributes:
- ID – auction ID
- Name – the matching domain name
- Traffic – supposed the number of times a domain is viewed
- BidCount – the number of bids
- Price – the current price of domain in auction
- ValuationPrice – the GoDaddy GoValue or Estimated value of domain
- TimeLeft – time remaining in auction
- RowID – the record id or occurrence id of the domain
Again, not diving deep into the details, but to correctly parse the SOAP response, you’ll need to use the following PHP built-in functions: str_ireplace, htmlspecialchars, simplexml_load_string, json_encode, and json_decode.
In short, each aforementioned function helps to clean and transform the SOAP response into XML and into a workable PHP array to access the Auction element attribute data contain specific domain data.
If you load the file to a web server and view it via a web browser, then you should see a list of domain names likely containing the ‘domain’ keyword or keyword you set, if any domains are available for the defined keyword.
And that’s the tutorial folks!
Of course, that’s not really the tutorial in its entirety. That’s just all we have time for today.
This tutorial could be extended in a number of ways. For example, one of the ways to extend this tutorial is adding the ability to parse and then store data in a database for analytics purposes — if you’re all about data-driven domain investing.
Now it’s worth mentioning that searching for domains can be easily completed using GoDaddy’s Saved Search functionality, including a daily email of your saved searches right to your inbox.
However, this type of search is only a snapshot for the time in which it is taken, whereas the API can be automated to run on the minute, hour, day, week, etc — year-round if you will.
Emails are forever locked in your inbox until you take action, unlike the exponential flexibility of scripting and automating against the API, which could operate with and without us — sleeping or awake, busy or bored.
If you have questions or comments about this tutorial, chime in below in the comments section.
Thanks and that’s all for now!