Skip to main content
GET
/
api
/
assets
/
geo-clusters
Cluster assets by map location
curl --request GET \
  --url https://api.example.com/api/assets/geo-clusters
{
  "data": [
    {
      "latitude": 123,
      "longitude": 123,
      "count": 123,
      "representative_asset_id": "<string>"
    }
  ]
}

Query Parameters

bbox
string
required

Map viewport as four comma-separated decimal-degree numbers min_longitude,min_latitude,max_longitude,max_latitude (west,south,east,north), e.g. -77.1,38.9,-77.0,39.0. A box whose min_longitude exceeds max_longitude (antimeridian-crossing) returns no cells — split it client-side.

cell_size
number
required

Grid cell edge in decimal degrees — the clustering granularity. Larger values give coarser clusters; the client maps map-zoom to cell_size. Must be at least 0.0001 (~11 m).

library_id
string | null

Library to cluster assets from. Optional if the user has a single library; required when they have multiple.

album_id
string | null

Return only assets that are in the album with this ID.

person_id
string | null

Return only assets containing a face belonging to this person.

local_datetime_after
string<date-time> | null

Only include assets captured strictly after this instant (ISO 8601; exclusive). Same awareness/offset semantics as on list_assets.

local_datetime_before
string<date-time> | null

Only include assets captured strictly before this instant (ISO 8601; exclusive). Same awareness/offset semantics as on list_assets.

state
enum<string>
default:live

Which set of assets to cluster: live (default — excludes trashed assets), trashed (only trashed assets), or all (both).

Available options:
live,
trashed,
all

Response

Successful Response

data
GeoCluster · object[]
required

Non-empty grid cells within the requested viewport. Not paginated: the list is capped at 1000 cells and a denser viewport returns 422 instead — coarsen cell_size or zoom in.