addadd-thickarrow-downaxebreadcrumb dividercameracc-compulsarychatclosecontactdata-usersdebugdevelopersdismissdocumentserrorglossaryinfolinkpublisherssearchselect-dropdownsuccesstableswarning

Developers

APIs to manage your site, query data and build new products and services.

  1. Home
  2. Developers
  3. Query API
  4. Set query

Set query

The Set Query API allows users to look up a point location and get back information from a set.

A set is a collection of data layers and tables that can be viewed downloaded at one time. Publishers use sets to enable users to access datasets that are commonly grouped together.

Differences to vector and raster APIs

The set query API returns similar information to the Vector and Raster API endpoints, with a few notable differences

  • You query a single set, not a number of layers. You don't have to know what layers are in the set before you query it.
  • Layers are returned in the correct order, in a JSON list rather than an object. Both vector and grid layers from the set will be included.
  • Each layer returned contains its ID and title, since you might not already have them.

URL

Your URL endpoint is dependent on the particular Koordinates service you wish to access.

The URL for the Koordinates site will be https://koordinates.com/services/query/v1/set

Formats

The sets API returns in JSON:

content-type: application/vnd.koordinates.setQuery+json

Formats can be specified via URL. For example: http://api.koordinates.com/api/setQuery.json

They can also be specified using the HTTP Accept header with the appropriate content-type against the base URL. For example: application/vnd.koordinates.rasterQuery.1+json

By default, all responses use the newest format. While we try very hard to prevent backwards-incompatible breaks, please note that it may happen in future

If you're using the URL endpoint (for example, rasterQuery.json) you can pass a &v=1 parameter to specify version 1.3. Note that the current version is 1.3

Compression

Add a request header with Accept-Encoding: gzip to get compressed results. This dramatically reduces the size of the response and will speed up your API requests.

HTTP Method

GET

Parameters

x required

  • Longitude (wsg84 decimal degrees) of the point to query

y required

  • Latitude (wsg84 decimal degrees) of the point to query

radius

  • Radius (m) within which to search
  • default: 1000
  • range: 0 to 100000

geometry

  • Include geometries with the result
  • default: false

with_field_names

  • Include field names with the result
  • default: false

set required

  • ID of the set to query

max_results

  • Maximum number of features to return for each layer
  • default: 1
  • range: 1 to 5