tags:

views:

33

answers:

2

I want to make an input where you write a domain, click a button, and then know if a domain is ocupied or unregistered.

Is any API out there that can help me?

A: 

You can do this by doing a DNS lookup and fetch the not found result. Example in nslookup.

nslookup www.bullocksarefree.com
Server:     8.8.8.8
Address:    8.8.8.8#53

** server can't find www.bullocksarefree.com: NXDOMAIN

So, if your programming language supports networking, you can find it inside the DNS implementation.

Shyam
No, bad algorithm. In several TLD, (.COM, .FR, etc), a domain can be registered and not published in the DNS ("on hold" in .COM, "blocked" or "reserved" in .FR, etc).
bortzmeyer
+2  A: 

You'll want to work with the WHOIS protocol for domain lookups. With it you'll be able to find out if a domain is taken or not. There's a WHOIS web service that can help you get started.

BoltClock
Yes, unlike what was accepted, this is the only correct answer.
bortzmeyer