Python API for URL Query
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
doc initial commit Nov 19, 2012
urlquery Python 3 ready Apr 30, 2015
.gitignore Initial update to API v2 Feb 24, 2014
LICENSE add license Dec 9, 2014 Initial update to API v2 Feb 24, 2014 Update version to 2.1 Apr 30, 2015


API to access urlquery.

Intro to the API

The API uses JSON requests and responses. A json string is built with the parameters and the function to call and POSTed over HTTPS to the API URL.

The functions to call is put in the "method" key within the JSON string, the rest of the parameters to the functions has their respective parameter name as key. The "method" key is required for all API calls.

The API key isn't always required for API calls, but by not using the key it will often severely reduce the amount of data that are returned. The data returned is determined by the key and its associated permissions.

Note: The access of the default key (no key) is very limited, even more than whatis accessible on the public site.

API calls

Common Objects in response structures:

  • IP::

          "addr"  : string,
          "cc"    : string,   Country code (NO, UK, SE, DK) etc..
          "country": string,
          "asn"   : int,      ASN number
          "as"    :  string   AS string (full name)
  • URL::

          "addr"  : string,
          "fqdn"  : string,
          "domain": string,
          "tld"   : string,
          "ip"    : IP        IP object

    { "useragent" : string, UserAgent used "referer" : string, "pool" : string, Pool of exit nodes used "access_level": string }


    { "base64_data" : string, Base64 encoded data "media_type" : string mime type }

  • Example::

                  "addr": "",
                          "addr": "",
                          "cc": "IE",
                          "country": "Ireland",
                          "asn": 1299,
                          "as": "AS1299 TeliaSonera International Carrier"
                  "fqdn": "",
                  "domain": "",
                  "tld": "com"

All responses from the API includes a response object. Which holds the status of the API call. This is called "response"


    { "status" : string, "ok" or "error" "error" : string Error string if applicable }


If you have an API Key, put it in with the variable name 'key'.


To get the responses of the api gzip'ed, change 'gzip_default' to True.




  • jsonsimple