Find parks, gardens, woods, heaths and beaches by name. You can also find out how green each H3 cell is, including cells in the countryside, and which open spaces each one contains.
This page answers questions such as:
- Which parks are near here, largest first?
- Where are the playgrounds?
- How green is this rural area?
Open spaces come from Overture's land and land-use areas (overture). Green cover comes from Overture's satellite land cover (overture_land_cover). Where the parks, gardens, grass and woods mapped in those areas show more green in an H3 cell than the satellite does, green cover uses them instead, because the satellite misses them in towns. /v1/catalog/{country} names both sources in source_ids, and updated_at gives the date they were last loaded.
National Parks are boundaries, not open spaces. To find out whether a home is in a National Park, use /v1/boundaries?at= on Boundaries.
Required authentication header. Use the same application id as for the TravelTime API.
Required authentication header.
GET /v1/open-spacesReturns the open spaces that touch the location you give. Only public open spaces are returned by default. Results are sorted largest first with sort=-area_m2, nearest first with near, and by id otherwise.
A space that lies inside a bigger one is folded into it, based on their actual outlines. The smaller space is left out of the list whenever the bigger one passes the class and access filters, even if the bigger one does not touch the location. For example, Avenue Gardens lies inside The Regent's Park, so class=garden lists it, but a list of every kind does not.
For long lists of cells, use POST /v1/open-spaces, which takes the same fields in a JSON body (see Long requests).
| Parameter | Type | Default | What it does | Example |
|---|---|---|---|---|
class | classes, comma-separated | — | Returns only these kinds of open space, such as park, garden, playground, wood, heath, nature_reserve and beach. The allowed field of a 400 error lists every kind. | class=park,wood |
access | public | restricted | all | public | restricted returns only the kinds that /catalog lists as restricted, such as cemeteries, zoos and campsites. all returns both, with each row tagged in access. The same rule applies on every route that lists open spaces. | access=all |
min_area_m2 | m² | — | Returns only open spaces at least this big, measured by their whole size. | min_area_m2=50000 |
sort | -area_m2 | — | Sorts the results largest first. | sort=-area_m2 |
include | cells | — | Adds each space's H3 cells, split into in_search (those the location covers) and outside (the rest). With this option, a page holds up to 100 rows. | include=cells |
resolution | 9 | 10 | 9 | The H3 cell size. At 10, parks, gardens, playgrounds, woods, beaches, cemeteries and the like use their own res-10 cells, and other open spaces count each of their res-9 cells as its 7 res-10 cells. cells, at, bbox and near are read at this size, and cell_count and cells_in_search count cells of this size. | resolution=10 |
The endpoint also takes the following common parameters:
- Location:
near,radius_m,bbox,cells,at - Paging:
limit,cursor - Output:
format - Long requests: the POST body
Each row contains:
id(os_gb_…)name, or null for an unnamed spaceclassandaccessarea_m2: the whole size of the space, in m²latandlngcell: the H3 cell that holds the spacecell_count: the number of H3 cells in the spacecells_in_search: how many of those cells the location coversarea_in_search_m2:area_m2multiplied by the share of the space's cells that the location covers, in m²distance_m, withnear: the distance to the space'slat,lngcells, withinclude=cells. At resolution 10, a space without its own res-10 cells lists the res-10 cells of each res-9 cell the location touches, and lists the rest of its res-9 cells whole inoutside
Errors
| Code | HTTP | When |
|---|---|---|
location_required | 400 | None of near, bbox, cells or at is given. This endpoint does not take country. |
invalid_class | 400 | class is not an open-space class. allowed lists the valid ones. |
invalid_access · invalid_sort · invalid_min_area_m2 | 400 | access is not public, restricted or all, sort is not -area_m2, or min_area_m2 is below 0. |
invalid_include | 400 | include is anything other than cells. |
invalid_limit | 400 | limit is over 10,000, or over 100 with include=cells. |
invalid_resolution | 400 | resolution is anything other than 9 or 10. allowed is [9, 10]. |
resolution_unindexed | 400 | resolution=10 in a country whose open spaces do not have res-10 cells yet: Canada, India, Italy, New Zealand, Slovenia and Turkey. Use 9 there. |
The endpoint can also return any of the error codes listed under Location and Paging.
Get the 34 open spaces in a box around Regent's Park, largest first, with their H3 cells.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces?bbox=51.518,-0.172,51.540,-0.140&sort=-area_m2&include=cells"34 pins; a pin opens its row.
| Namename | Classclass | Accessaccess | Areaarea_m2 | Map |
|---|---|---|---|---|
| The Regent's Park | park | public | 1.18 km² | |
| Primrose Hill | park | public | 25.3 ha | |
| Park Square Gardens | garden | public | 2.2 ha | |
| St. John's Wood Church Grounds | park | public | 2.0 ha | |
| Park Crescent Gardens | garden | public | 9,883 m² |
5 of 34 shown · the other 29 are in the response
Response
{
"results": [
{
"id": "os_gb_c70107ff-da5c-321d-8059-aa8574aadf80",
"name": "The Regent's Park",
"class": "park",
"access": "public",
"area_m2": 1175647,
"lat": 51.53011,
"lng": -0.15377,
"cell": "89195da4887ffff",
"cell_count": 13,
"cells_in_search": 13,
"area_in_search_m2": 1175647,
"cells": {
"in_search": [
"89195da4817ffff",
"89195da4883ffff",
"89195da4887ffff",
"89195da488bffff",
"89195da488fffff",
"… 8 more"
],
"outside": []
}
},
"… 33 more rows"
],
"next_cursor": null
}Only the big ones. Add min_area_m2=50000 to keep only open spaces of 5 hectares or more. In this box, that leaves The Regent's Park and Primrose Hill. To find large open spaces by walking time instead, see Proximity.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces?bbox=51.518,-0.172,51.540,-0.140&min_area_m2=50000&sort=-area_m2&include=cells"GET /v1/open-spaces/{id}Returns one open space by id. The response includes parent, the space it is folded into, or null.
| Parameter | Type | Default | What it does | Example |
|---|---|---|---|---|
include | cells | — | Adds cells, the space's resolution 9 H3 cells. | include=cells |
The response has the same fields as a row in the list, without the H3 cell counts. It adds parent, the id of the space it is folded into, or null, and cells with include=cells.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_id | 400 | The id is not an open-space id (os_gb_…). |
not_found | 404 | There is no open space with this id. |
invalid_include | 400 | include is anything other than cells. |
Get The Regent's Park by id. include=cells adds its 13 H3 cells.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/os_gb_c70107ff-da5c-321d-8059-aa8574aadf80?include=cells"1 pin; it opens its row.
| Idid | os_gb_c70107ff-da5c-321d-8059-aa8574aadf80 |
|---|---|
| Namename | The Regent's Park |
| Classclass | park |
| Accessaccess | public |
| Areaarea_m2 | 1.18 km² |
| Latlat | 51.53011 |
| Lnglng | -0.15377 |
| H3 cellcell | 89195da4887ffff |
| Parentparent | — |
| Cellscells | 13 H3 cells |
Response
{
"id": "os_gb_c70107ff-da5c-321d-8059-aa8574aadf80",
"name": "The Regent's Park",
"class": "park",
"access": "public",
"area_m2": 1175647,
"lat": 51.53011,
"lng": -0.15377,
"cell": "89195da4887ffff",
"parent": null,
"cells": [
"89195da4817ffff",
"89195da4883ffff",
"89195da4887ffff",
"89195da488bffff",
"89195da488fffff",
"… 8 more"
]
}GET /v1/open-spaces/cellsReturns how green each H3 cell is and which open spaces are in it. With group_by=all, you get one total row for everything you send instead. Every cell in the location is returned, with 0 and an empty list where it has no open space. Cells come back in the order sent with cells, and by cell id otherwise. Resolutions 9 and 10 are supported, and a group_by=all total also accepts coarser cell ids. For long lists of cells, use POST /v1/open-spaces/cells, which takes the same fields in a JSON body (see Long requests).
| Parameter | Type | Default | What it does | Example |
|---|---|---|---|---|
class | classes, comma-separated | — | Counts and lists only these kinds of open space. The response names them in class. | class=playground |
access | public | restricted | all | public | Sets which open spaces appear in open_spaces. open_space_m2 always counts public open space only. | access=all |
resolution | 9 | 10 | 9 | The H3 cell size, as on /v1/open-spaces. Green cover is resolution 9 only, so green_m2, green_share and cover are left out at 10. | resolution=10 |
The endpoint also takes the following common parameters:
- Location:
near,radius_m,bbox,cells,at - Per-cell endpoints:
group_by(cellorall) - Paging:
limit,cursor - Output:
format - Long requests: the POST body
Each row contains:
cell, orcell_countin the totalopen_space_m2: the public open space in the H3 cell, in m², with each space's size spread evenly over its cellsgreen_m2: the green cover, in m²green_shareandcover: shares of the H3 cell, from 0 to 1.coveris split intotrees,shrub,grass,crops,wetlandandbuilt, andgreen_shareis everything exceptbuiltopen_space_count: the number of open spacesopen_spaces: up to 5 open spaces, biggest first, each as{id, name, class, access, area_m2}at its whole size. A space folded into a bigger one is shown as the bigger one
In the total, the rollup block shows how each field is added up: sum for the m² fields and cell_count, area_weighted_mean for green_share and cover, distinct for open_space_count, and none for open_spaces, which is left out of totals.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_resolution | 400 | resolution is anything other than 9 or 10. allowed is [9, 10]. |
resolution_unindexed | 400 | The same as on /v1/open-spaces. |
invalid_group_by | 400 | group_by is not cell or all. allowed lists them. |
invalid_format | 400 | geojson is requested with group_by=all. |
invalid_class · invalid_access | 400 | The same as on /v1/open-spaces. |
The endpoint can also return any of the error codes listed under Location, Per-cell endpoints and Paging.
Put the id of one H3 cell in cells. You get back one row for that cell. green_share is how much of the cell is green, cover splits the cell by land cover, and open_spaces names the open spaces in it.
You send
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/cells?cells=89195da4d03ffff"You get
{
"resolution": 9,
"results": [
{
"cell": "89195da4d03ffff",
"open_space_m2": 2286,
"green_m2": 2598,
"green_share": 0.028,
"cover": {
"trees": 0,
"shrub": 0,
"grass": 0.028,
"crops": 0,
"wetland": 0,
"built": 0.972
},
"open_space_count": 1,
"open_spaces": [
{
"id": "os_gb_b64f90ef-0a32-36ee-8c41-f06baf5f920e",
"name": "Catholic Central Library Gardens",
"class": "park",
"access": "public",
"area_m2": 2286
}
]
}
],
"next_cursor": null
}Separate the cell ids with commas. You get one row for each cell, in the order you sent them. These seven cells lie between Euston and St Pancras. The map shades each cell by its open space, from none to 1.5 ha. Select a cell to see its row.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/cells?cells=89195da4d03ffff,89195da4d07ffff,89195da4d0bffff,89195da4d0fffff,89195da4d13ffff,89195da4d17ffff,89195da4d1bffff"Shade = open_space_m20 m²1.5 ha7 H3 cells; click a cell to open its row.
| H3 cellcell | Open spaceopen_space_m2 | Greengreen_m2 | Green sharegreen_share | Map |
|---|---|---|---|---|
| 89195da4d03ffff | 2,286 m² | 2,598 m² | 3% | |
| 89195da4d07ffff | 1.5 ha | 1.2 ha | 12% | |
| 89195da4d0bffff | 0 m² | 0 m² | 0% | |
| 89195da4d0fffff | 966 m² | 2,070 m² | 2% | |
| 89195da4d13ffff | 4,482 m² | 4,466 m² | 5% | |
| 89195da4d17ffff | 0 m² | 857 m² | 1% | |
| 89195da4d1bffff | 0 m² | 835 m² | 1% |
Response
{
"resolution": 9,
"results": [
{
"cell": "89195da4d03ffff",
"open_space_m2": 2286,
"green_m2": 2598,
"green_share": 0.028,
"cover": {
"trees": 0,
"shrub": 0,
"grass": 0.028,
"crops": 0,
"wetland": 0,
"built": 0.972
},
"open_space_count": 1,
"open_spaces": [
{
"id": "os_gb_b64f90ef-0a32-36ee-8c41-f06baf5f920e",
"name": "Catholic Central Library Gardens",
"class": "park",
"access": "public",
"area_m2": 2286
}
]
},
"… 6 more rows"
],
"next_cursor": null
}Add group_by=all to get one total row instead. The same seven cells hold 5 open spaces, with 23,190 m² of open space. rollup says how each field was added up.
For a long list of cells, send POST /v1/open-spaces/cells with the same fields in a JSON body. See Long requests.
You send
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/cells?cells=89195da4d03ffff,89195da4d07ffff,89195da4d0bffff,89195da4d0fffff,89195da4d13ffff,89195da4d17ffff,89195da4d1bffff&group_by=all"You get
{
"resolution": 9,
"results": [
{
"cell_count": 7,
"open_space_m2": 23190,
"open_space_count": 5,
"green_m2": 22491,
"green_share": 0.034,
"cover": {
"trees": 0,
"shrub": 0,
"grass": 0.034,
"crops": 0,
"wetland": 0,
"built": 0.966
}
}
],
"next_cursor": null,
"rollup": {
"cell_count": "sum",
"open_space_m2": "sum",
"open_space_count": "distinct",
"open_spaces": "none",
"green_m2": "sum",
"green_share": "area_weighted_mean",
"cover": "area_weighted_mean"
}
}Send bbox (south, west, north, east) for a box, or near and radius_m for a circle. You get one row for every cell in the area, and each row has its cell id. This box around Regent's Park holds 55 cells.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/cells?bbox=51.518,-0.172,51.540,-0.140"With class=playground, only playgrounds are counted and listed. In this box, 7 of the 55 H3 cells contain one of the box's 6 playgrounds.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/cells?bbox=51.518,-0.172,51.540,-0.140&class=playground"Shade = open_space_m20 m²4,213 m²55 H3 cells; click a cell to open its row.
| H3 cellcell | Open spaceopen_space_m2 | Greengreen_m2 | Green sharegreen_share | Map |
|---|---|---|---|---|
| 89195da4803ffff | 0 m² | 3.5 ha | 37% | |
| 89195da4807ffff | 0 m² | 2.1 ha | 22% | |
| 89195da480bffff | 0 m² | 1.1 ha | 11% | |
| 89195da480fffff | 0 m² | 3,837 m² | 4% | |
| 89195da4813ffff | 2,282 m² | 9.4 ha | 100% |
5 of 55 shown · the other 50 are in the response
Response
{
"class": [
"playground"
],
"resolution": 9,
"results": [
{
"cell": "89195da4803ffff",
"open_space_m2": 0,
"green_m2": 34758,
"green_share": 0.369,
"cover": {
"trees": 0.369,
"shrub": 0,
"grass": 0,
"crops": 0,
"wetland": 0,
"built": 0.631
},
"open_space_count": 0,
"open_spaces": []
},
"… 54 more rows"
],
"next_cursor": null
}This example uses the H3 cells of two real postcodes. You can use at= to find the cell for a point. GU26 6JA in Grayshott is all trees, with no open space mapped. SP6 2BQ in Woodgreen is on Woodgreen Common, a heath.
cover takes built from satellite land cover, and takes green from it too wherever the map shows less green. This means fields and woods count as green even where no open space is named. SP6 2BQ is also in the New Forest National Park. National Parks are boundaries rather than open spaces, because towns sit inside them too.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/open-spaces/cells?cells=891959969abffff,89195956d1bffff"Shade = open_space_m20 m²1.6 ha2 H3 cells; click a cell to open its row.
| H3 cellcell | Open spaceopen_space_m2 | Greengreen_m2 | Green sharegreen_share | Map |
|---|---|---|---|---|
| 891959969abffff | 0 m² | 9.5 ha | 100% | |
| 89195956d1bffff | 1.6 ha | 9.7 ha | 100% |
All 2 shown
Response
{
"resolution": 9,
"results": [
{
"cell": "891959969abffff",
"open_space_m2": 0,
"green_m2": 95442,
"green_share": 1,
"cover": {
"trees": 1,
"shrub": 0,
"grass": 0,
"crops": 0,
"wetland": 0,
"built": 0
},
"open_space_count": 0,
"open_spaces": []
},
"… 1 more row"
],
"next_cursor": null
}/v1/catalog/{country} publishes three separate definitions of green: green cover, open space and designations. Designations are served as boundaries, because towns sit inside them.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/catalog/gb"Response
{
"results": [
"… 8 datasets",
{
"id": "open-spaces",
"…": "…",
"definitions": {
"green_cover": {
"meaning": "anything growing, seen from satellite or mapped as a park, garden, grass or wood",
"…": "…"
},
"open_space": {
"meaning": "outdoor land the public can walk into for free",
"public": ["forest", "wood", "beach", "sand", "dune", "wetland", "heath", "… 13 more"],
"restricted": ["cemetery", "grave_yard", "zoo", "camp_site"],
"totals": "open_space_m2 counts public only"
},
"designations": {
"meaning": "protected countryside; towns sit inside them, so never counted as open space",
"served_as": "boundaries of type national_park and national_landscape: /boundaries?at=…"
}
}
},
"… 1 more"
],
"…": "…"
}