Skip to content

Find public spaces near a location

GET
/discover
curl --request GET \
--url 'https://example.com/v1/discover?geohash=gcpvj'

The public spaces that can be found by location - those with settings.discoverable and a georeference - in a geohash cell and the eight cells around it. It’s given a cell rather than a position, so it never learns exactly where the caller is, and returns each space’s position so the caller can work out exact distances itself. It needs no Authorization header, and is limited to a couple of requests a second for each client.

geohash
required
string
/^[0123456789bcdefghjkmnpqrstuvwxyz]{4,5}$/

The geohash of the cell to search, 4 characters (about 39km by 20km) or 5 (about 4.9km square).

Example

gcpvj

The spaces found, in no particular order

Media typeapplication/json
object
spaces
required
Array<object>
object
id
required

The project ID of the space, to use as :resource.

string
latitude
required

The WGS 84 latitude of the space’s origin.

number
longitude
required

The WGS 84 longitude of the space’s origin.

number
name

Text that can be translated: a value in one language, plus optional translations into others.

object
value
required

The text in the language given by locale. Also shown when there’s no variant for the viewer’s language.

string
locale
required

The language value is written in, as a BCP 47 tag - a base language such as en, or a regional one such as en-GB.

string
variants

Translations of value, keyed by BCP 47 language tag. A viewer sees the variant for their exact language (e.g. en-GB), then the one for its base language (e.g. en), then value.

object
key
additional properties
string
subtitle

Text that can be translated: a value in one language, plus optional translations into others.

object
value
required

The text in the language given by locale. Also shown when there’s no variant for the viewer’s language.

string
locale
required

The language value is written in, as a BCP 47 tag - a base language such as en, or a regional one such as en-GB.

string
variants

Translations of value, keyed by BCP 47 language tag. A viewer sees the variant for their exact language (e.g. en-GB), then the one for its base language (e.g. en), then value.

object
key
additional properties
string

Example

{
"spaces": [
{
"name": "Reception",
"subtitle": "Reception"
}
]
}

The geohash is missing or isn’t 4 or 5 characters

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

Too many requests. Retry after Retry-After seconds.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}
Retry-After
integer

Seconds to wait before retrying

Finding spaces by location isn’t available on this server

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}