I have found your issue.
You need to define the "domain" using the "params" flag of the get requests function.
Here is a little snippet that worked for me (you will need to incorporate it into your for loop)
api_key = "YOURKEYHERE"
secret_key = "YOURKEYHERE"
headers = {"Authorization": "sso-key {}:{}".format(api_key, secret_key)}
url = "https://api.godaddy.com/v1/domains/available"
test = get(url, params={'domain':'google.co.uk'}, headers=headers).text
print(test)
Answer from James Green on Stack OverflowVideos
How do I check if a domain is available using GoDaddy domain search?
- To check if a domain name is available, simply enter it into the GoDaddy Domain Search bar and hit Search. Upon doing so, you will instantly be shown if the domain name is available for purchase and registration, or whether it is already taken because it is owned by someone else.
- If you are wanting more information on a domain name that you are interested in, but that is unavailable because it is already registered, you can find ownership information using the GoDaddy WHOIS Lookup.
- If you want to buy a domain that is already owned and registered to someone else, you may consider trying a Domain Backorder service. With this service, you purchase a domain backorder credit which gives you a better chance to secure the domain name you want when it becomes available again.
How do I find a domain with GoDaddy domain search?
Simply enter the domain name you are looking for in the GoDaddy Domain Search box and then select Search. You will then be shown the status of the domain name you searched for and whether it is available for purchase or not. If the domain you searched for is available, you can select the checkout option to follow the on-screen prompts and complete the registration process. However, if the domain name you searched for is not available for purchase, you will be shown similar alternative names that are currently available to register.
How do I setup my GoDaddy domain name?
I have found your issue.
You need to define the "domain" using the "params" flag of the get requests function.
Here is a little snippet that worked for me (you will need to incorporate it into your for loop)
api_key = "YOURKEYHERE"
secret_key = "YOURKEYHERE"
headers = {"Authorization": "sso-key {}:{}".format(api_key, secret_key)}
url = "https://api.godaddy.com/v1/domains/available"
test = get(url, params={'domain':'google.co.uk'}, headers=headers).text
print(test)
I have been tasked to do the same thing in python. Thanks to this blogGodaddy domain name API in Python I was able to complete this task. Try it out
I'm looking to see if there is an existing domain. But from thinking about it, these services will increase the domain price since there is demand...
So I'd like to know if I can do it without having this issue.
Also, do domain services like GoDaddy automatically increase the price of the domain you're looking for right when searching for it on their website?