How to Automate Expired Domain Hunting with Python Scripts
公開:Peter Nagy・AI支援 · 2026年8月8日 · 5分で読めます
Automated expired domain hunting means replacing manual list refreshing with a Python script that polls drop lists, filters by metrics, and alerts you. You'll use requests, BeautifulSoup, and a simple cron job. It's not fancy, but it turns hours into minutes. And when you find a dud, you can always bury it later.
What exactly does automated expired domain hunting do?
It turns a boring, repetitive task into a set-and-forget script. You write Python code that fetches expired domain lists from public sources, checks each name against your rules, and sends you a message when something matches. No more waking up at 3 AM to see if that 4-letter .io finally dropped.
The core loop is simple: fetch, filter, alert. You can run it on a cheap VPS or your own machine with a cron job. The whole thing can be built in an afternoon, even if you're not a professional developer.
Prerequisites: What do you need before writing a script?
A few basics. You need Python 3.8 or newer installed, plus a text editor. You'll also want a free account at a domain API service like WhoisXMLAPI or RDAP to check registration dates. Budget zero dollars for this step, unless you want to pay for higher rate limits.
You also need a clear filter. Know what you're hunting for: word count, length, extension, backlinks, or a specific niche. Write it down before you code, or you'll end up with a script that alerts you to every random domain on the internet.
Step 1: How do you fetch expired domain lists?
Start with public drop lists. Services like ExpiredDomains.net and NameJet publish daily lists, though they're not always easy to scrape. Use requests and BeautifulSoup to pull the HTML and parse the table rows.
import requests
from bs4 import BeautifulSoup
url = "https://www.expireddomains.net/expired-domains/"
headers = {"User-Agent": "Mozilla/5.0"}
response = requests.get(url, headers=headers)
soup = BeautifulSoup(response.text, "html.parser")
That gets you the raw page. Then you extract the domain names from the table. Most lists use a similar structure, so a few find_all calls will get you there. Be polite with rate limits, or you'll get blocked.
Step 2: How do you filter domains with Python?
Filters are where the magic happens. Write a function that takes a domain and returns True or False based on your rules. For example, you might want only .com domains with exactly 6 letters and no hyphens.
def is_worth_checking(domain):
name, ext = domain.split(".")
return ext == "com" and len(name) == 6 and "-" not in name
You can also filter by keyword lists. If you're hunting for fitness domains, keep a list of relevant words and check if any appear. Use re for regex matching if you need more complex patterns.
Step 3: How do you check domain availability and metrics?
Once you have a filtered list, you need to know if the domain is actually expiring. Use RDAP to check the registration status. The rdap library makes this easy.
import rdap
def check_status(domain):
data = rdap.query(domain)
return data.get("status", [])
If the status includes "pending delete" or "redemption period", it's likely expiring. You can also check backlinks using a free API like Open PageRank, though you'll need an API key. Keep the checks light, because too many requests will slow you down.
Step 4: How do you schedule the script to run automatically?
Use cron on Linux or Task Scheduler on Windows. Run the script once a day, or every few hours if you're chasing hot drops. A simple cron line looks like this:
0 6 * * * cd /path/to/script && python3 hunt.py
That runs it every morning at 6 AM. You'll get results before the daily rush. You can also use schedule library if you prefer to keep everything in Python.
Step 5: How do you get alerts when a match is found?
Email, Telegram, or Slack. The easiest is Telegram, because you can send a message with a simple POST request. Create a bot, get the chat ID, and use requests.post to send a message when your filter finds something.
import requests
def send_alert(domain):
token = "YOUR_BOT_TOKEN"
chat_id = "YOUR_CHAT_ID"
text = f"Found: {domain}"
url = f"https://api.telegram.org/bot{token}/sendMessage"
requests.post(url, data={"chat_id": chat_id, "text": text})
Now you get pings on your phone without touching the script. Just remember to keep the bot token private.
Step 6: How do you handle the results and decide what to buy?
When the alert comes, you still need to do manual checks. Use a registrar like Namecheap or GoDaddy to see the exact price, and check the Wayback Machine for historical content. Not every expired domain is worth the registration fee.
If you buy one and it turns out to be a dud, you can bury your dead project for a dollar. It's a cheap way to let go. And if you're looking for inspiration or a bargain, browse the graveyard to see what others have abandoned.
What can go wrong with automated hunting?
Plenty. Your script might break when the website changes its HTML structure. You might get rate-limited or IP-blocked. You might filter too aggressively and miss good names, or too loosely and get flooded with junk.
Also, the domain market moves fast. A name that looks free might get registered by someone else before your cron job runs. That's normal. Build in a retry or a wait, and don't get attached to any single domain.
Do you really need to automate this?
If you're checking drops once a week, no. But if you're refreshing lists daily, a script saves hours. It also lets you act faster when a good name appears. Speed matters in expired domain hunting, because good names vanish within minutes.
The downside is that automation can lull you into thinking you're being productive. You're not. You're just filtering faster. The real work is still in the manual review.
Where do you go from here?
Start small. Pick one source, one filter, and one alert method. Get that working before you add complexity. Then expand to more sources or more filters. The script doesn't need to be perfect, it just needs to run.
And if you end up with a domain you don't want, don't let it rot. Bury it on dead.domains and let someone else give it a second life. That's the cycle of digital property, and it's oddly satisfying.
Head over to dead.domains to see what's already been buried.
FAQ
Is it legal to scrape expired domain lists?
Yes, as long as you respect robots.txt and rate limits. Public lists are meant to be viewed, but scraping too fast can get you blocked. Use reasonable delays and a proper user-agent. If a site has a paid API, consider using it to avoid legal headaches.
What's the best Python library for parsing HTML?
BeautifulSoup is the most common choice because it's easy to learn and works well with messy HTML. For more complex parsing, you might use lxml or Scrapy. Start with BeautifulSoup and only switch when you hit performance limits.
How often should I run my expired domain script?
Once a day is usually enough for most niches. If you're chasing high-value drops, run it every few hours. Keep in mind that more frequent runs increase your chance of getting rate-limited, so balance speed with safety.
Can I automate the entire buying process?
Partially. You can automate checking availability and even backordering, but the actual registration usually requires manual confirmation. Some registrars offer APIs for automated purchases, but they often have minimum balances or require approval. Don't expect a fully hands-off pipeline.
What should I do if my script stops working?
Check the website's HTML structure first. Sites change layouts often, so your selectors might break. Add error handling to your script so it logs the issue and alerts you. Then update the selectors and rerun. It's a normal maintenance task.