DEV Community

Emma Watson
Emma Watson

Posted on

Finding the Perfect Domain Doesn't Have to Take Hours

Finding an available domain for a new project can be tedious—especially when you're brainstorming multiple options. I've been using SerpSpur's Domain Suggestion Checker to quickly verify availability and get alternative suggestions. The tool checks WHOIS data in real time and suggests related domains based on your input. Here's a Python script to automate domain checks using their API:

python
import requests

def check_domain_availability(domain):
url = f"https://serpspur.com/api/domain-check?domain={domain}"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
if data['available']:
print(f"{domain} is available!")
else:
print(f"{domain} is taken. Suggestions: {data['suggestions'][:3]}")
else:
print("Error")

check_domain_availability("mynewproject.com")

For a quick, no-code way to explore domains, head over to SerpSpur. It's a handy tool for any developer launching a new site.

Top comments (4)

Collapse
 
9890974297 profile image
Amelia

Nice script! I'd probably add a loop to check a list of domains from a text file — that way I can batch-check all my ideas in one go. Have you found the API rate limits to be generous enough for heavy use?

Collapse
 
davitparkltd profile image
Davit Park

Nice script! I'd probably add a loop to check a list of domains from a text file — that way I can batch-check all my ideas in one go. Have you found the API rate limits to be generous enough for heavy use?

Collapse
 
dylan_parker123 profile image
Dylan Parker

Nice share! I've been using a similar approach but with python-whois to check expiry dates too—helps catch domains that might drop soon. Have you ever run into rate limits with their API?

Collapse
 
emma-watson3 profile image
Emma Watson

Great question! The API returns suggestions as a list, so you can easily loop through them or display more than three by adjusting the slice.