Skip to content
getgeolens.com

Search Facets Endpoint

GET
/search/facets/
curl --request GET \
--url 'https://example.com/api/search/facets/?exclude_synthetic=true&spatial_predicate=intersects' \
--header 'Authorization: Bearer <token>'

Return record_type facet counts for the given filters.

q
Any of:
string

Full-text search query

bbox
Any of:
string

Bounding box: minx,miny,maxx,maxy

keywords
Any of:
Array<string>

Filter by keywords

geometry_type
Any of:
string

Filter by geometry type

srid
Any of:
integer

Filter by SRID

source_organization
Any of:
string

Filter by source organization

datetime
Any of:
string

OGC datetime interval

exclude_synthetic
Exclude Synthetic

Exclude synthetic/test datasets

boolean
default: true

Exclude synthetic/test datasets

spatial_predicate
Spatial Predicate

Spatial predicate: intersects or within

string
default: intersects
Allowed values: intersects within

Spatial predicate: intersects or within

geometry
Any of:
string

GeoJSON geometry for spatial filter

collection_id
Any of:
string format: uuid

Filter by collection membership

Successful Response

Media type application/json
FacetCountResponse

Multi-group facet counts for the search sidebar.

object
record_type
required
Record Type

Hit counts keyed by record type

object
key
additional properties
integer
keywords
Keywords

Top keyword tags with counts

Array<object>
default:
FacetValueCount

A single facet value with count.

object
value
required
Value
string
count
required
Count
integer
source_organization
Source Organization

Top organizations with counts

Array<object>
default:
FacetValueCount

A single facet value with count.

object
value
required
Value
string
count
required
Count
integer
srid
Srid

Top SRIDs with counts

Array<object>
default:
FacetValueCount

A single facet value with count.

object
value
required
Value
string
count
required
Count
integer
collections
Collections

Collections containing matched records

Array<object>
default:
CollectionFacetItem

A collection facet entry.

object
id
required
Id
string
name
required
Name
string
dataset_count
required
Dataset Count
integer
Example
{
"keywords": [],
"source_organization": [],
"srid": [],
"collections": []
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}