The Domain Management tool is now available!

Example of Accessing the API Using Excel VBA

Excel VBA API Access Example
08 Sep 2019

Kassey Lee, a successful domain investor and marketing professional, has been using dotDB to increase his productivity and keep him competitive in the industry. Not only does he use dotDB to check domain names, he also uses the API access feature to automate his daily routine. This allows him to focus on making decisions rather than wasting time on mundane tasks. While it may sound complicated, it's actually not. Today, Kassey has shared a simple VBA program that can be used to query dotDB through API access.

Sub dotDB()
    Dim hRequest As Object
    Dim strAPIkey As String
    Dim strURL As String
    Dim strResponse As String

    strAPIkey = "(your API key)"
    strURL = ""

    Set hRequest = CreateObject("MSXML2.XMLHTTP")
        With hRequest
            .Open "GET", strURL, False
            .SetRequestHeader "Authorization", "Token " & strAPIkey
    End With

    strResponse = hRequest.ResponseText

    MsgBox strResponse

End Sub

To begin using the "dotDB" function in your Excel or Word file, you must first change the API key. Once that is done, simply call the function to query the keyword "apple". The result will be displayed in a message box.

You may even customize the code to make your process more automated. If you'd like to learn more about how to write programs to automate your daily tasks, simply drop us a line at [email protected] . We look forward to hearing from you!