Unlock

Questions?

Project Blog

|

Contact Us envelope image
Home > Unlock Places > API Documentation

API Documentation

There is one link or URI, http://unlock.edina.ac.uk/ws/search, which features in every request for a place search. The tables below outline the various parameters that can be appended to this URI to filter the search results.

General Search Parameters

Parameter

Description

name

One or more names (comma separated). Wildcards [*,?] allowed but only as part of an incomplete search string and cannot be used alone.

format

One of xml, kml, json, georss or txt (defaults to xml) - the format of the place search results.

gazetteer

The place-name source to take locations from. The options are geonames, os, naturalearth or unlock which combines all the previous. unlock is the default.

featureType

The feature type, or class of thing, that the place is. For example, Populated Place returns only settlements; Westminster returns constituency boundaries.

To help determine which feature types are supported the Unlock Places API can return a list of supported feature types which can be filtered by gazetteer and format. Valid format parameters are xml, json and txt (defaults to xml).

Bounding Box Search Parameters

Parameter

Description

minx

the minimum longitude point of a bounding box.

maxx

the maximum longitude point of a bounding box.

miny

the minimum latitude point of a bounding box.

maxy

the maximum latitude point of a bounding box.

operator

The options are withinand intersect. The results will therefore be entirely within, or overlapping with (intersecting), the bounding box.

Spatial Search Parameters

Parameter

Description

buffer

search within distance from bounding box or feature ID. In metres.

spatialMask

search within this "mask" - a shape identified by its ID.

realSpatial

yes or no - used with spatialMask - do the search with the detail of the shape rather than just drawing a bounding box round it, as happens by default.

postcode

A UK postcode.

footprintLookup

given an identifier for an object return its shape

Number of Results Parameters

Parameter

Description

maxRows

The maximum number of results to return. Defaults to 20. Cannot exceed 1000. [Optional].

startRow

The row to start results display from. Defaults to 1. [Optional].