Getting started with example queries using Node.js
What you need
Example queries using Node.js
Running a find query
find queryconst axios = require('axios');
const apiKey = 'INSERT_YOUR_API_KEY_HERE';
async function find() {
axios.get('https://api.os.uk/search/names/v1/find?query=Southampton&key=' + apiKey)
.then(function (response) {
/* For explanation and debugging purposes we display the full response from the API in the console */
console.log(JSON.stringify(response.data, null, 2));
});
}
find()Running a nearest query.
nearest query.Last updated
Was this helpful?