views:

79

answers:

6

Hi, Is there any API to lookup if a given domain name is already registerd by somebody and get alternative (auto suggested available domain names)?

EDIT:- I think the thing I need is called domain-search not the lookup :)

+1  A: 

It's called whois... and for auto-suggestion, there is the domain service at 1&1.

jldupont
Isn't there something that I can directly call from C# code like web-service?
TheVillageIdiot
A: 

I think you can use http://whois.domaintools.com/ to get the information. Send a web request as http://whois.domaintools.com/example.com and it will return the information of example.com. But you need to parse the response to filter the required information.

Chathuranga Chandrasekara
I don't want to get into that parsing thing. Anything simple please?
TheVillageIdiot
There's no universal API as far as I know, you would have to create one yourself. If you then decide to parse the web page, use HtmlAgilityPack (http://htmlagilitypack.codeplex.com/).
Daniel S
A: 

http://whois.bw.org/ is very good. does suggestions and such.

RandomNickName42
A: 

I want an api that I can call from my code or pages. The XML API on www.domaintools.com seems like the thing that I need. I'm looking into it.

TheVillageIdiot
+2  A: 

I've written a whois for PHP, Perl, VB and C# all using a trick that queries '{domain}.whois-servers.net'.

It works well for all but the obscure domains that require registration (and usually fees) such as tonga .tv or .pro domains.

This page shows it in action. You can do some simple string matching to check if a domain is registered or not based on the result you get back.

Chris S
A: 

Hi Folks, thanks for your support. I've found a service by domaintools.com called whoisapi. You can query available domain names and other information by sending an xml request to their servers.

TheVillageIdiot