The API is available at https://api.nsn.org.uk/v1/
Documentation homepage https://docs.api.nsn.org.uk/
The example below shows you how to authenticate against the API using javascript in node, and hit the /areas endpoint.
If you have an API key, enter it here to populate the examples:
var https = require('https');
var options = {
'method': 'GET',
'hostname': 'api.nsn.org.uk',
'path': '/v1/areas',
'headers': {
'x-api-key': '{your api key} '
}
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
Documentation homepage https://docs.api.nsn.org.uk/