Search Facets Endpoint
GET
/search/facets/
const url = 'https://example.com/api/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/api/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
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>
FacetValueCountA single facet value with count.
object
value
required
Value
string
count
required
Count
integer
source_organization
Source Organization
Top organizations with counts
Array<object>
FacetValueCountA single facet value with count.
object
value
required
Value
string
count
required
Count
integer
srid
Srid
Top SRIDs with counts
Array<object>
FacetValueCountA single facet value with count.
object
value
required
Value
string
count
required
Count
integer
collections
Collections
Collections containing matched records
Array<object>
CollectionFacetItemA 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>
ValidationErrorobject
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": {} } ]}