Javascript Implementation

Password Request

function loadJSON(callback) {
    var xobj = new XMLHttpRequest();
    xobj.overrideMimeType("application/json");
    xobj.open('GET', 'https://api.leakedpassword.com/pass/{your-password}', true);
    xobj.onreadystatechange = function () {
        if (xobj.readyState == 4 && xobj.status == "200") {
          callback(xobj.responseText);
       }
    };
    xobj.send(null);
}
function init() {
    loadJSON(function(response) {
       var actual_JSON = JSON.parse(response);
       console.log(actual_JSON);
    });
}
init();

SHA1 Hash Request

function loadJSON(callback) {
    var xobj = new XMLHttpRequest();
    xobj.overrideMimeType("application/json");
    xobj.open('GET', 'https://api.leakedpassword.com/sha1/{your-sha1-hash}', true);
    xobj.onreadystatechange = function () {
        if (xobj.readyState == 4 && xobj.status == "200") {
          callback(xobj.responseText);
       }
    };
    xobj.send(null);
}
function init() {
    loadJSON(function(response) {
       var actual_JSON = JSON.parse(response);
       console.log(actual_JSON);
    });
}
init();

Response

{
    "password": {
        "leak": true,
        "hash": "7110eda4d09e062aa5e4a390b0a572ac0d2c0220",
        "seen": 1256907
    }
}