Getting started with an example match query using Node.js
What you need
OS Match & Cleanse API added to an API project in the OS Data Hub with an API Key. See Getting started with an API project for more information.
A text editor like Visual Studio Code
Running a Match Query
// Match Query
const axios = require('axios');
const apiKey = 'INSERT_YOUR_API_KEY_HERE';
async function match() {
axios.get('https://api.os.uk/search/match/v1/match?maxresults=1&query=Ordnance%20Survey,%20Adanac%20Drive,%20SO16&key=' + apiKey).then(function (response) {
console.log(JSON.stringify(response.data, null, 2));
});
}
match();
Last updated
Was this helpful?