{"_id":"55e069c558c5460d0076aa04","category":{"_id":"55e95fe47fc27b2d00d32cfa","pages":["55ed65182e66b62100994163"],"version":"55e06495a44fae0d002146ad","project":"55e06494a44fae0d002146aa","__v":1,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-04T09:09:56.318Z","from_sync":false,"order":8,"slug":"endpoint","title":"endpoint"},"user":"55e056b06bad670d0081f234","editedParams2":true,"parentDoc":null,"project":"55e06494a44fae0d002146aa","version":{"_id":"55e06495a44fae0d002146ad","project":"55e06494a44fae0d002146aa","__v":54,"createdAt":"2015-08-28T13:39:33.907Z","releaseDate":"2015-08-28T13:39:33.907Z","categories":["55e06496a44fae0d002146ae","55e06997a44fae0d002146c2","55e06a6958c5460d0076aa0c","55e06ae66bad670d0081f25c","55e06cc1a44fae0d002146cb","55e06ddda44fae0d002146cd","55e95f261fd7e82300ef359f","55e95fe47fc27b2d00d32cfa","55e96eef358d923700be984d","55e96ef6358d923700be984e","55e96efda7ca823900ad547e","55e96f04a7ca823900ad547f","55e970cc358d923700be9853","55e973f4358d923700be9858","55e973f9a7ca823900ad548c","55e977bf358d923700be985d","55e9780f8b72bb3700b1d5bd","55e97815a7ca823900ad5493","55e9781c358d923700be985f","55e97821461e2a390050f23b","55f963c23bb4bb0d0022d18c","5624c67406e8040d005ed6b2","5624dcf25a86b423009462e8","5625f229d0f87e190014c4ed","5627819fe2ce610d004e3ec8","562781b23a4c6b0d00c4556b","5627837166c62617009d17e2","5627851efcbbc621004ebff1","5627860044c87f0d00fe6491","562e3c6d54a5be0d00070c3e","564c955aae6cb82100dc137a","5652e22abbe7110d00dba748","5652f25523d4262d00b21c58","5652fdad51e4e81900bf2452","5652fdcbb60abb1700bafadc","5654494f65bec717007e0293","565da11a77f0090d005818ff","565f063f413e06170093de18","565f06fb413e06170093de21","56dd6773efaca42900e5f58e","56dd68630c3bb41700b0b037","56dd7d24d5419f170075dfb3","56dd9448c117291700015b60","56dd9454c117291700015b61","577a6f8b9748b80e00ef3f45","577a6f969748b80e00ef3f46","577bba7f6e5f301900fada99","57a9cc8e5b1ace0e00de743f","58aab134c50c33250046b8f8","58aab146aecc3e2500573d4c","58aab1628f862f250076f92e","58aab1938f862f250076f92f","58aab3e5aecc3e2500573d56","58aab3f2aecc3e2500573d57"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":4,"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-28T14:01:41.167Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[{"name":"OK - JSON","code":"// Data returned for example query above truncated to one result\n{\n  \"header\" : {\n    \"uri\" : \"https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey%2C%20Adanac%20Drive%2C%20SO16&maxresults=1\",\n    \"query\" : \"query=Ordnance Survey, Adanac Drive, SO16\",\n    \"offset\" : 0,\n    \"totalresults\" : 1646227,\n    \"format\" : \"JSON\",\n    \"dataset\" : \"DPA\",\n    \"lr\" : \"EN,CY\",\n    \"maxresults\" : 1,\n    \"matchprecision\" : 1,\n    \"epoch\" : \"37\",\n    \"output_srs\" : \"EPSG:27700\"\n  },\n  \"results\" : [ {\n    \"DPA\" : {\n      \"UPRN\" : \"200010019924\",\n      \"ADDRESS\" : \"ORDNANCE SURVEY, 4, ADANAC DRIVE, NURSLING, SOUTHAMPTON, SO16 0AS\",\n      \"ORGANISATION_NAME\" : \"ORDNANCE SURVEY\",\n      \"BUILDING_NUMBER\" : \"4\",\n      \"THOROUGHFARE_NAME\" : \"ADANAC DRIVE\",\n      \"DEPENDENT_LOCALITY\" : \"NURSLING\",\n      \"POST_TOWN\" : \"SOUTHAMPTON\",\n      \"POSTCODE\" : \"SO16 0AS\",\n      \"RPC\" : \"2\",\n      \"X_COORDINATE\" : 437318.0,\n      \"Y_COORDINATE\" : 115539.0,\n      \"STATUS\" : \"APPROVED\",\n      \"LOGICAL_STATUS_CODE\" : \"1\",\n      \"CLASSIFICATION_CODE\" : \"CO01GV\",\n      \"CLASSIFICATION_CODE_DESCRIPTION\" : \"Central Government Service\",\n      \"LOCAL_CUSTODIAN_CODE\" : 1760,\n      \"LOCAL_CUSTODIAN_CODE_DESCRIPTION\" : \"TEST VALLEY\",\n      \"POSTAL_ADDRESS_CODE\" : \"S\",\n      \"POSTAL_ADDRESS_CODE_DESCRIPTION\" : \"A single address\",\n      \"BLPU_STATE_CODE\" : \"2\",\n      \"BLPU_STATE_CODE_DESCRIPTION\" : \"In use\",\n      \"TOPOGRAPHY_LAYER_TOID\" : \"osgb1000002682081995\",\n      \"LAST_UPDATE_DATE\" : \"01/09/2010\",\n      \"ENTRY_DATE\" : \"01/09/2010\",\n      \"BLPU_STATE_DATE\" : \"01/09/2010\",\n      \"LANGUAGE\" : \"EN\",\n      \"MATCH\" : 0.6,\n      \"MATCH_DESCRIPTION\" : \"NO MATCH\"\n    }\n  } ]\n}","language":"json","status":200},{"name":"OK - XML","code":"<!-- Data returned for example above with format=xml added to the request -->\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<AddressAPI>\n    <header>\n        <uri>https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey%2C%20Adanac%20Drive%2C%20SO16&amp;format=xml&amp;maxresults=1</uri>\n        <query>query=Ordnance Survey, Adanac Drive, SO16</query>\n        <offset>0</offset>\n        <totalresults>1646227</totalresults>\n        <format>xml</format>\n        <dataset>DPA</dataset>\n        <lr>EN,CY</lr>\n        <maxresults>1</maxresults>\n        <matchprecision>1</matchprecision>\n        <epoch>37</epoch>\n    \t\t<output_srs>EPSG:27700</output_srs>\n    </header>\n    <results>\n        <DPA>\n            <UPRN>200010019924</UPRN>\n            <ADDRESS>ORDNANCE SURVEY, 4, ADANAC DRIVE, NURSLING, SOUTHAMPTON, SO16 0AS</ADDRESS>\n            <ORGANISATION_NAME>ORDNANCE SURVEY</ORGANISATION_NAME>\n            <BUILDING_NUMBER>4</BUILDING_NUMBER>\n            <THOROUGHFARE_NAME>ADANAC DRIVE</THOROUGHFARE_NAME>\n            <DEPENDENT_LOCALITY>NURSLING</DEPENDENT_LOCALITY>\n            <POST_TOWN>SOUTHAMPTON</POST_TOWN>\n            <POSTCODE>SO16 0AS</POSTCODE>\n            <RPC>2</RPC>\n            <X_COORDINATE>437318.0</X_COORDINATE>\n            <Y_COORDINATE>115539.0</Y_COORDINATE>\n            <STATUS>APPROVED</STATUS>\n            <LOGICAL_STATUS_CODE>1</LOGICAL_STATUS_CODE>\n            <CLASSIFICATION_CODE>CO01GV</CLASSIFICATION_CODE>\n            <CLASSIFICATION_CODE_DESCRIPTION>Central Government Service</CLASSIFICATION_CODE_DESCRIPTION>\n            <LOCAL_CUSTODIAN_CODE>1760</LOCAL_CUSTODIAN_CODE>\n            <LOCAL_CUSTODIAN_CODE_DESCRIPTION>TEST VALLEY</LOCAL_CUSTODIAN_CODE_DESCRIPTION>\n            <POSTAL_ADDRESS_CODE>S</POSTAL_ADDRESS_CODE>\n            <POSTAL_ADDRESS_CODE_DESCRIPTION>A single address</POSTAL_ADDRESS_CODE_DESCRIPTION>\n            <BLPU_STATE_CODE>2</BLPU_STATE_CODE>\n            <BLPU_STATE_CODE_DESCRIPTION>In use</BLPU_STATE_CODE_DESCRIPTION>\n            <TOPOGRAPHY_LAYER_TOID>osgb1000002682081995</TOPOGRAPHY_LAYER_TOID>\n            <LAST_UPDATE_DATE>01/09/2010</LAST_UPDATE_DATE>\n            <ENTRY_DATE>01/09/2010</ENTRY_DATE>\n            <BLPU_STATE_DATE>01/09/2010</BLPU_STATE_DATE>\n            <LANGUAGE>EN</LANGUAGE>\n            <MATCH>0.6</MATCH>\n            <MATCH_DESCRIPTION>NO MATCH</MATCH_DESCRIPTION>\n        </DPA>\n    </results>\n</AddressAPI>","language":"xml","status":200},{"code":"// Example: Missing mandatory parameter\n{\n  \"error\" : {\n    \"statuscode\" : 400,\n    \"message\" : \"No query parameter provided.\"\n  }\n}\n\n// Example: Parameter entry of wrong type\n{\n  \"error\" : {\n    \"statuscode\" : 400,\n    \"message\" : \"Parameter maxresults contains invalid characters. Valid characters are numeric.\"\n  }\n}\n\n// Example: Wrong parameter name\n{\n  \"error\" : {\n    \"statuscode\" : 400,\n    \"message\" : \"Parameter abcde is not a valid parameter for resource find. Valid parameters for requested resource are query, format, dataset, maxresults, offset, minmatch, lr, matchprecision, fq.\"\n  }\n}","language":"json","status":400},{"status":401,"code":"{\n    \"fault\": {\n        \"faultstring\": \"Invalid ApiKey\",\n        \"detail\": {\n            \"errorcode\": \"oauth.v2.InvalidApiKey\"\n        }\n    }\n}","language":"json"},{"code":"{\n     \"error\": {\n         \"statuscode\": \"404\",\n         \"message\": \"Resource x does not exist. Valid resources are match, find, uprn, postcode, nearest, bbox, radius.\"\n     }\n}","language":"json","status":404},{"language":"json","code":"{  \n   \"fault\":{  \n      \"faultstring\":\"Received 405 Response without Allow Header\",\n      \"detail\":{  \n         \"errorcode\":\"protocol.http.Response405WithoutAllowHeader\"\n      }\n   }\n}","name":"Method Not Allowed","status":405},{"language":"json","status":500,"name":null,"code":"{\n    \"error\": {\n        \"statuscode\": 500,\n        \"message\": \"The provided request resulted in an internal server error.\"\n    }\n}"}]},"settings":"55e96024e5d0c623003ed884","examples":{"codes":[{"language":"javascript","code":"var req = new XMLHttpRequest();\nreq.open(\"GET\", \"https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey,%20Adanac%20Drive,%20SO16&maxresults=1&key=[[app:key]]\",true);\nreq.onreadystatechange = function () {\n    console.log(req.responseText);\n}\nreq.send();"},{"name":"JQuery","code":"var url = 'https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey,%20Adanac%20Drive,%20SO16&key=[[app:key]]';\n\n$.getJSON(url, function(data){\n    console.log(data);\n})","language":"javascript"},{"name":"Node.js","language":"javascript","code":"var https = require('https');\n\nhttps.get(\"https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey,%20Adanac%20Drive,%20SO16&maxresults=1&key=[[app:key]]\", function(res) {\n  console.log(\"Got response: \" + res.statusCode);\n  res.on('data', function(d) {\n    process.stdout.write(d);\n  });\n}).on('error', function(e) {\n  console.log(\"Got error: \" + e.message);\n});"},{"code":"<?php\n\t\t$curl = curl_init();\n    curl_setopt ($curl, CURLOPT_URL, \"https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey,%20Adanac%20Drive,%20SO16&maxresults=1&key=[[app:key]]\");\n    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n    $result = curl_exec ($curl);\n    curl_close ($curl);\n    print \"<pre>$result\";\n?>","language":"php"},{"code":"<html lang=\"en\" ng-app=\"angularAPI\">\n<head>\n  <meta charset=\"utf-8\">\n  <script src=\"https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js\"></script>\n</head>\n\n<script type=\"text/javascript\">\n\tvar osAPI = angular.module('angularAPI', []);\n\n\tosAPI.controller('apiService', ['$scope', '$http', function($scope, $http) {\n\t\tvar key = \"[[app:key]]\";\n\t\tvar query = 'https://api.ordnancesurvey.co.uk/places/v1/addresses/find?query=Ordnance%20Survey,%20Adanac%20Drive,%20SO16&maxresults=1';\n\t\t$http.get(query+'&key='+key).success(function(data) {\n\t\t\t$scope.output = data.results;\n\t\t});\n\t}]);\n</script>\n\n<body ng-controller=\"apiService\">\n\t<ul ng-repeat=\"value in output\">\n\t\t<li ng-repeat=\"object in value\">\n\t\t\t<p>{{object}}</p>\n\t\t</li>\n\t</ul>\n</body>\n</html>","language":"html","name":"AngularJS"}]},"auth":"required","params":[{"_id":"55e07cc2a44fae0d002146e8","ref":"","in":"query","required":true,"desc":"The free text search parameter.","default":"","type":"string","name":"query"},{"_id":"55e07cc2a44fae0d002146e7","ref":"","in":"query","required":false,"desc":"The format in which the response will be returned. Default: JSON","default":"json, xml","type":"string","name":"format"},{"_id":"55e07cc2a44fae0d002146e6","ref":"","in":"query","required":false,"desc":"The maximum number of results to return. Default: 100","default":"1-100","type":"int","name":"maxresults"},{"_id":"55e07cc2a44fae0d002146e5","ref":"","in":"query","required":false,"desc":"Offset the list of returned by this amount.","default":"","type":"int","name":"offset"},{"_id":"55e07cc2a44fae0d002146e4","ref":"","in":"query","required":false,"desc":"The dataset to return. Multiple values can be sent, separated by a comma. Default: DPA","default":"DPA, LPI","type":"string","name":"dataset"},{"_id":"55e07cc2a44fae0d002146e3","ref":"","in":"query","required":false,"desc":"Which language of addresses to return. Valid languages are English and Welsh. Filter only applicable to DPA dataset. Default value is both languages. Default: EN, CY","default":"EN, CY","type":"string","name":"lr"},{"_id":"565f03047f93280d0052ce48","ref":"","in":"query","required":false,"desc":"The minimum match score a result has to have to be returned.","default":"0.1 - 1.0 (inclusive)","type":"double","name":"minmatch"},{"_id":"55e07df5a44fae0d002146ea","ref":"","in":"query","required":false,"desc":"The decimal point position at which the match score value is to be truncated.","default":"1-10","type":"string","name":"matchprecision"},{"_id":"55e07df5a44fae0d002146e9","ref":"","in":"query","required":false,"desc":"A filter that allows filtering of results by classification code and/or logical status code. Filtering for classification code will accept wildcard (*) searches. Multiple searches can be done on classification code separating the classification code parameter with a space. Classification code filters can be ran with logical status code filters by using the parameter multiple times: fq=classification_code:CI classification_code:RD&fq=LOGICAL_STATUS_CODE:6 .","default":"classification_code:[code], LOGICAL_STATUS_CODE:[code]","type":"string","name":"fq"},{"_id":"56ab5461f9757e0d007c659c","ref":"","in":"query","required":false,"desc":"The intended output spatial reference system. Default: EPSG:27700","default":"BNG, EPSG:27700, WGS84, EPSG:4326, EPSG:3857, EPSG:4258","type":"string","name":"output_srs"}],"url":"/v1/addresses/find?"},"isReference":true,"order":2,"body":"","excerpt":"OS Places API Find","slug":"os-places-find","type":"endpoint","title":"Find"}

getFind

OS Places API Find

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

query:
required
string
The free text search parameter.
format:
stringjson, xml
The format in which the response will be returned. Default: JSON
maxresults:
integer1-100
The maximum number of results to return. Default: 100
offset:
integer
Offset the list of returned by this amount.
dataset:
stringDPA, LPI
The dataset to return. Multiple values can be sent, separated by a comma. Default: DPA
lr:
stringEN, CY
Which language of addresses to return. Valid languages are English and Welsh. Filter only applicable to DPA dataset. Default value is both languages. Default: EN, CY
minmatch:
double0.1 - 1.0 (inclusive)
The minimum match score a result has to have to be returned.
matchprecision:
string1-10
The decimal point position at which the match score value is to be truncated.
fq:
stringclassification_code:[code], LOGICAL_STATUS_CODE:[code]
A filter that allows filtering of results by classification code and/or logical status code. Filtering for classification code will accept wildcard (*) searches. Multiple searches can be done on classification code separating the classification code parameter with a space. Classification code filters can be ran with logical status code filters by using the parameter multiple times: fq=classification_code:CI classification_code:RD&fq=LOGICAL_STATUS_CODE:6 .
output_srs:
stringBNG, EPSG:27700, WGS84, EPSG:4326, EPSG:3857, EPSG:4258
The intended output spatial reference system. Default: EPSG:27700

Examples


Result Format


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}