Example of Accessing the API Using Excel VBA
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 = "https://api.dotdb.com/v1/search?keyword=apple"
Set hRequest = CreateObject("MSXML2.XMLHTTP")
With hRequest
.Open "GET", strURL, False
.SetRequestHeader "Authorization", "Token " & strAPIkey
.Send
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 support@dotdb.com . We look forward to hearing from you!