This service offers a REST API allowing to perform DNS queries over HTTP from multiple locations worldwide, and to get reverse PTR records for both IPv4 and IPv6 addresses. It outputs JSON-encoded DNS responses, and supports both Cross-origin resource sharing (CORS) and JSONP.
There is no rate limit of any sort at the moment, but we ask you to use the service on a reasonable basis (i.e.: no repeated automated queries).
We provide a list of all available nodes in JSON format: nodes.json
None of the nodes listed should perform NXDOMAIN hijacking.
If you notice such behaviour with any of the listed nodes, please contact us.
URL Scheme: /node/domain/querytype
URL Scheme: /node/x/ip
Action | Example |
---|---|
Get reverse (PTR) record from IPv4 addresses | http://www.dns-lg.com/us01/x/193.0.6.139 |
Get reverse (PTR) record from IPv6 addresses | http://www.dns-lg.com/us01/x/2001:67c:2e8:22::c100:68b |
The output is a JSON object containing the following arrays, representing the appropriate sections of DNS packets:
When incorrect user input is entered, the server returns an HTTP 400 Error (Bad Request), along with a JSON-encoded error message.
HTTP Error | Code | Message |
---|---|---|
400 | 401 | Input string could not be parsed |
400 | 402 | Input string is not a well-formed domain name |
400 | 403 | Input string is not a valid IP address |
400 | 404 | Invalid DNS query type |
When the DNS server cannot be reached or returns an error, the server returns an HTTP 500 Error (Internal Server Error), along with a JSON-encoded error message.
HTTP Error | Code | Message |
---|---|---|
500 | 501 | DNS server could not be reached |
500 | 502 | The name server encountered an internal failure while processing this request (SERVFAIL) |
500 | 503 | Some name that ought to exist, does not exist (NXDOMAIN) |
500 | 505 | The name server refuses to perform the specified operation for policy or security reasons (REFUSED) |