Faceting allows you to get a count on specific attributes available based on your search.
getFacetCounts
with facets=["*"]
will provide all the available facets with their counts.
Within your search query, you can useNote: The actual response may be different. For illustration purposes, the response has been limited.
facets=["amenities"]
to retrieve counts of each of the amenities available within your search.
Facets are returned in the response with the facets
key, where each object represents a facet.
Returned facet counts represent the whole search result,s not just the paginated one (results that are there but not returned due to pagination).