JSON API
- API Overview
- Register API
- JSON API
- HTML Forms
Introduction
The JSON API has two methods: Search and Info.
Each responds to a GET request. When called with the optional callback parameter, the return value will be wrapped with your callback function:
http://domai.nr/api/json/info?callback=foobar&q=domai.nr
foobar({"query":"domainr", "results":[]})
Methods
Search
Responds to a GET request with the arguments specified in the query string:
http://domai.nr/api/json/search?q=domai.nr
The response will be a JSON object:
{
"query": "domai.nr",
"results": [{
"domain": "domai.nr",
"register_url": "http://domai.nr/domai.nr/register",
"host": "",
"path": "",
"subdomain": "domai.nr",
"availability": "taken"
},
{
"domain": "dom.ai",
"register_url": "http://domai.nr/dom.ai/register",
"host": "",
"path": "/nr",
"subdomain": "dom.ai",
"availability": "available"
},
{
"domain": "doma.in",
"register_url": "http://domai.nr/doma.in/register",
"host": "",
"path": "/r",
"subdomain": "doma.in",
"availability": "taken"
},
{
"domain": "do.ma",
"register_url": "http://domai.nr/do.ma/register",
"host": "",
"path": "/i.nr",
"subdomain": "do.ma",
"availability": "maybe"
},
{
"domain": "d.om",
"register_url": "http://domai.nr/d.om/register",
"host": "",
"path": "/ai.nr",
"subdomain": "d.om",
"availability": "unavailable"
},
{
"domain": "do",
"register_url": "http://domai.nr/do/register",
"host": "",
"path": "/mai.nr",
"subdomain": "do",
"availability": "tld"
}]
}
Any errors will be presented in a top level key in the response object:
{
"query": "",
"results": [],
"error": {
"status": 404,
"message": "No results found."
}
}
Info
Responds to a GET request with the arguments specified in the query string:
http://domai.nr/api/json/info?q=domai.nr
The response will be a JSON object:
{
"domain": "domai.nr",
"whois_url": "http://domai.nr/domai.nr/whois",
"register_url": "http://domai.nr/domai.nr/register",
"tld": {
"domain": "nr",
"domain_idna": "nr",
"wikipedia_url": "http://wikipedia.org/wiki/.nr",
"iana_url": "http://www.iana.org/domains/root/db/nr.html"
},
"registrars": [{
"registrar": "cenpac.net.nr",
"name": "CenpacNET",
"register_url": "http://domai.nr/domai.nr/register/cenpac.net.nr"
}],
"host": "",
"path": "",
"www_url": "http://domai.nr/domai.nr/www",
"query": "domai.nr",
"subdomain": "domai.nr",
"domain_idna": "domai.nr",
"availability": "taken"
}
