axios
.get(
`https://api.os.uk/search/names/v1/nearest?point=${bngCoord}&key=${apiKey}&radius=${radius}`
)
.then(function(err, response) {
return JSON.stringify(
response.data.results[0]['GAZETTEER_ENTRY']['NAME1'],
null,
2
);
})
.catch(err => {
return md`have you added your \`apiKey\`?`;
})