Search Facets Endpoint
GET
/search/facets/
const url = 'https://example.com/search/facets/?exclude_synthetic=true&spatial_predicate=intersects';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/search/facets/?exclude_synthetic=true&spatial_predicate=intersects' \ --header 'Authorization: Bearer <token>'Return record_type facet counts for the given filters.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” keywords
exclude_synthetic
Exclude Synthetic
Exclude synthetic/test datasets
boolean
Exclude synthetic/test datasets
spatial_predicate
Spatial Predicate
Spatial predicate: intersects or within
string
Spatial predicate: intersects or within
Responses
Section titled “ Responses ”Successful Response
Media type application/json
FacetCountResponse
Multi-group facet counts for the search sidebar.
object
collections
Collections
Collections containing matched records
Array<object>
CollectionFacetItemA collection facet entry.
object
dataset_count
required
Dataset Count
integer
id
required
Id
string
name
required
Name
string
keywords
Keywords
Top keyword tags with counts
Array<object>
FacetValueCountA single facet value with count.
object
count
required
Count
integer
value
required
Value
string
record_type
required
Record Type
Hit counts keyed by record type
object
key
additional properties
integer
source_organization
Source Organization
Top organizations with counts
Array<object>
FacetValueCountA single facet value with count.
object
count
required
Count
integer
value
required
Value
string
srid
Srid
Top SRIDs with counts
Array<object>
FacetValueCountA single facet value with count.
object
count
required
Count
integer
value
required
Value
string
Example
{ "collections": [], "keywords": [], "source_organization": [], "srid": []}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}