Address Search Request

You can use the getdata.aspx to perform an Address Search. The getdata.aspx may be found in the web subfolder e.g. http://custom.astun.local/mycouncil/web/getdata.aspx?. There are two different Address Search Request types:

  1. AJAX Request
  2. JSONP Request

AJAX Request

Performing this AJAX request will return JSON formatted results. 

Request

http://custom.astun.local/mycouncil/web/getdata.aspx?service=LocationSearch&RequestType=LocationSearch&location=rh5&pagesize=10&startnum=1


Parameters

Name

Requirement

Description

service

mandatory

This will always be “LocationSearch”

RequestType

mandatory

This will always be “LocationSearch”

location

mandatory

The address that you wish to search for or a UPRN. In the above example we wish to return all addresses that contain “RH5”

pagesize

mandatory

This is the number of results that you wish to return

startnum

mandatory

This would be 1 the first time that you made a call and then, if the maximum number of results requested were returned you would then make another call with the same information only specifying a startnum = pagesize +1 etc.

mapsource

optional

This specifies the mapsource to use if you are using Shared Services e.g. &mapsource=WOxford/MyHouse

gettotalsoptionalThe purpose of this parameter is to count the number of results and set the 'total' value in the response, which is otherwise 0. It's not on by default because the total is calculated by re-doing the query and therefore makes the response noticeably slower.

Results 

Results
 {
        "name": "tempLocSearch",
        "columns": [
        
         "UniqueId", 
         "Parent", 
         "DisplayName", 
         "Type", 
         "X", 
         "Y", 
         "Rank", 
         "Name", 
         "Zoom"],
        "data": [
        
                [
                "100061420241", "25900001", "1, Abinger Close, North Holmwood, Surrey, <b>RH5</b> 4TB", "Property", "517242.205", "147405.882", "8%", "1,  Abinger Close, North Holmwood, Surrey, RH5 4TB", "100"
            ]
            , 
                [
                "100061420250", "25900001", "10, Abinger Close, North Holmwood, Surrey, <b>RH5</b> 4TB", "Property", "517277.300", "147390.400", "8%", "10,  Abinger Close, North Holmwood, Surrey, RH5 4TB", "100"
            ]
            , 
                [
                "100061420251", "25900001", "11, Abinger Close, North Holmwood, Surrey, <b>RH5</b> 4TB", "Property", "517280.800", "147412.000", "8%", "11,  Abinger Close, North Holmwood, Surrey, RH5 4TB", "100"
            ]
            , 
                [
                "100061420252", "25900001", "12, Abinger Close, North Holmwood, Surrey, <b>RH5</b> 4TB", "Property", "517293.200", "147381.900", "8%", "12,  Abinger Close, North Holmwood, Surrey, RH5 4TB", "100"
            ]
            , 
                [
                "100061420268", "25900001", "29, Abinger Close, North Holmwood, Surrey, <b>RH5</b> 4TB", "Property", "517304.200", "147398.800", "8%", "29,  Abinger Close, North Holmwood, Surrey, RH5 4TB", "100"
            ]
            
        ]
    }

JSONP Request

Performing this JSONP request will return the results to your specified function. 

Request

<script type="text/javascript" 
src="http://my.council.gov.uk/web/getdata.aspx?callback=FunctionName&type=jsonp&service=LocationSearch&RequestType=LocationSearch&location=42&pagesize=21&startnum=1">
</script>

Parameters

Name

Requirement

Description

callback

mandatory

This is the function name that you wish to use to format the results

type

mandatory

This will always be “jsonp”

service

mandatory

This will always be “LocationSearch”

RequestType

mandatory

This will always be “LocationSearch”

location

mandatory

The address that you wish to search for or a UPRN. In the above example we wish to return all addresses that contain “21”

pagesize

mandatory

This is the number of results that you wish to return

startnum

mandatory

This would be 1 the first time that you made a call and then, if the maximum number of results requested were returned you would then make another call with the same information only specifying a startnum = pagesize +1 etc.

mapsource

optional

This specifies the mapsource to use if you are using Shared Services e.g. &mapsource=WOxford/MyHouse

gettotalsoptionalThe purpose of this parameter is to count the number of results and set the 'total' value in the response, which is otherwise 0. It's not on by default because the total is calculated by re-doing the query and therefore makes the response noticeably slower.

Results

Results
functionName(
    {
        "name": "tempLocSearch",
        "columns": [
        
         "UniqueId", 
         "Parent", 
         "DisplayName", 
         "Type", 
         "X", 
         "Y", 
         "Rank", 
         "Name", 
         "Zoom"],
        "data": [
        
                [
                "100061414372", "25900012", "<b>42</b>, Agates Lane, Ashtead, Surrey, KT21 2ND", "Property", "517790.100", "157763.100", "6%", "42,  Agates Lane, Ashtead, Surrey, KT21 2ND", "100"
            ]
            , 
                [
                "100061429654", "25900031", "<b>42</b>, Aperdele Road, Leatherhead, Surrey, KT22 7QT", "Property", "516424.300", "157906.100", "5%", "42,  Aperdele Road, Leatherhead, Surrey, KT22 7QT", "100"
            ]
            , 
                [
                "200000165511", "25900038", "<b>42</b>, Archway Place, Dorking, Surrey, RH4 1DR", "Property", "516411.204", "149585.558", "6%", "42,  Archway Place, Dorking, Surrey, RH4 1DR", "100"
            ]
            , 
                [
                "200000170031", "25900047", "Hut <b>42</b>, Ruskin, Ashurst Drive, Boxhill, Surrey, KT20 7LS", "Property", "519833.000", "152195.000", "5%", "Hut 42, Ruskin,  Ashurst Drive, Boxhill, Surrey, KT20 7LS", "100"
            ]
            , 
                [
                "100061429814", "25900053", "<b>42</b>, Badingham Drive, Fetcham, Surrey, KT22 9EU", "Property", "515143.700", "155542.300", "6%", "42,  Badingham Drive, Fetcham, Surrey, KT22 9EU", "100"
            ]
            , 
                [
                "200000166633", "25900116", "<b>42</b>, Surrey Hills Park, Boxhill Road, Boxhill, Surrey, KT20 7LY", "Property", "520193.000", "152031.000", "4%", "42, Surrey Hills Park,  Boxhill Road, Boxhill, Surrey, KT20 7LY", "100"
            ]
            
        ]
    }
);