Theodore Baschak
Theodore Baschak
Routing Guru. IPv6 Advocate. Operator of Hextet Systems (AS395089).
Sep 14, 2014 1 min read

IP Quail API

While I’ve been supporting making requests to with useragent curl and responding with only plaintext, I don’t have a formal API for the site. Being inspired by the recent Arin on the Road talks on their Whois-RWS and Reg-RWS systems, I set out to start to write an API for

I chose to write it using Python/Flask, and deploy it using uWSGI/nginx. Several hours later, I now have code up on Github, and a functioning beta version online which returns the remote_addr of the client, JSONified.

This is the output so far:

curl -i
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Wed, 24 Sep 2014 05:46:56 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: X-Requested-With,Accept,Content-Type,Origin

	"ip": "2604:4280:d00d:202:79f2:da92:6e9:c7c3"

API Documentation (for now)


Gets the current IPv4 address.


Gets the current IPv6 address.

Update 2014-09-24: This has been updated with the production URLs, headers, and documentation. You’ll notice if you read the ipquail/ that I actually generate the production API responses using simple HTML/SSI and some header fakery. :-)