Count trips per filter value
get_facetsGet facet counts for filterable fields, respecting current filters.
CRITICAL: You MUST include ALL established filters in every call — especially niche, market, adults, children, and arrivalWeeks/arrivalMonths. The facetFields parameter only controls which breakdowns are returned, NOT which filters are applied. If you omit a filter like arrivalWeeks, the counts will include ALL dates — giving misleading numbers that won't match actual availability for the user's requested dates.
Example — WRONG: User wants ski in France next week for 2 people. You call get_facets with niche="ski", market="dk", countries=["france"], facetFields=["destinationSlug"]. This returns counts across ALL dates — showing destinations that may have 0 results for next week.
Example — RIGHT: Same scenario. You call get_facets with niche="ski", market="dk", countries=["france"], arrivalWeeks=["2026-W15"], adults=2, children=0, facetFields=["destinationSlug"]. This returns only destinations with actual availability for next week with 2 adults.
Returns: { totalCount, facets: { fieldName: { value: count, ... }, ... }, hierarchical } hierarchical lists field pairs (e.g. country ↔ destination) whose bucket counts are not expected to sum to totalCount.
Common use cases:
Check destination availability: facetFields=["countrySlug", "destinationSlug"] — include arrivalWeeks + adults + children
Check date availability: facetFields=["arrivalYearWeek", "arrivalYearMonth"] — include destination/country + adults + children
Explore filter options: facetFields=["durationDays", "provider"] — include ALL current filters
Answer "where else can I go?": facetFields=["countrySlug", "destinationSlug"] — include ALL current filters (dates, travelers)
Facetable fields — common (every niche): countrySlug, destinationSlug, provider, centrumDistanceRange, priceRange, pricePerPersonRange, durationDays, arrivalYearWeek, arrivalYearMonth, arrivalDate, stars, guestRatingBucket, transport, accommodationType, mealPlanType, accommodationFeatures. Niche-scoped (only meaningful on that niche): ski — skiPassIncluded, skiLiftDistanceRange, skiBusDistanceRange, skiSlopeDistanceRange, guideIncluded, transferIncluded; golf — greenFeeIncluded, courseDistanceRange, golfRoundsRange, golfTripType, golfBagIncluded, guideIncluded, transferIncluded; surf — surfSchoolIncluded, beachDistanceRange, waveType; diving — diveCenter; hiking — difficultyLevel, dailyDistanceRange, trailheadDistanceRange, tripFormat, routeDistanceRange, elevationGainRange, luggageTransportIncluded, guideIncluded, gpxAvailable; charter — beachDistanceRange, guideIncluded, transferIncluded; cycling — difficultyLevel, cyclingType, tripFormat, routeDistanceRange, elevationGainRange, eBikeAvailable, luggageTransportIncluded, guideIncluded, bikeRentalAvailable, gpxAvailable; football — league, homeTeam, awayTeam, team, matchDate, hotelIncluded; carrental — carSupplier, carClass, carBodyType, transmission, fuelType, seats, zeroExcess, pickupStation, pickupStationType; f1 — guideIncluded, hotelIncluded, race, season, raceDate, ticketType, raceDays, transferIncluded; running — guideIncluded, hotelIncluded, race, season, raceDate, transferIncluded, distances, terrain, raceSeries, entryIncluded; americanfootball — guideIncluded, league, homeTeam, awayTeam, team, matchDate, hotelIncluded, season, transferIncluded, gameType; yoga — transferIncluded, retreatFocus, yogaLevel, yogaStyles, meditationIncluded, vegetarianMeals, danishInstructor; triathlon — guideIncluded, hotelIncluded, race, season, raceDate, transferIncluded, entryIncluded, tripType, triathlonDistance, raceBrand, bikeTransportIncluded; cruise — guideIncluded, cruiseType, cruiseLine, cabinType, cruiseRegion, embarkationCountry, flightIncluded, drinksIncluded, excursionsIncluded; coach — guideIncluded, excursionsIncluded, coachTripType, pickupRegion; holidayhome — beachDistanceRange, maxPersons, bedrooms, houseSizeRange, petsAllowed, consumptionIncluded, freeCancellation; roundtrip — excursionsIncluded, tourFormat, danishGuide, guaranteedDeparture; citybreak — transferIncluded, excursionsIncluded, escorted; dance — transferIncluded, danceStyles, danceLevel, soloWelcome.
Always pass facetFields to limit which facets are returned (improves performance). Filtered facets exclude their own filter to keep all options visible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| utm | No | ||
| niche | Yes | ||
| races | No | ||
| teams | No | ||
| adults | No | ||
| market | Yes | ||
| oneWay | No | ||
| leagues | No | ||
| pageUrl | No | ||
| seasons | No | ||
| adClicks | No | ||
| children | No | ||
| escorted | No | ||
| maxPrice | No | ||
| minPrice | No | ||
| minSeats | No | ||
| minStars | No | ||
| raceDays | No | ||
| terrains | No | ||
| widgetId | No | ||
| countries | No | ||
| distances | No | ||
| durations | No | ||
| fuelTypes | No | ||
| gameTypes | No | ||
| providers | No | ||
| tripTypes | No | ||
| waveTypes | No | ||
| cabinTypes | No | ||
| carClasses | No | ||
| diveCenter | No | ||
| pickupTime | No | ||
| raceBrands | No | ||
| raceDateTo | No | ||
| raceSeries | No | ||
| transports | No | ||
| yogaLevels | No | ||
| yogaStyles | No | ||
| zeroExcess | No | ||
| boundingBox | No | ||
| cruiseLines | No | ||
| cruiseTypes | No | ||
| danceLevels | No | ||
| danceStyles | No | ||
| danishGuide | No | ||
| departureTo | No | ||
| dropoffTime | No | ||
| facetFields | No | ||
| matchDateTo | No | ||
| minBedrooms | No | ||
| petsAllowed | No | ||
| soloWelcome | No | ||
| ticketTypes | No | ||
| tourFormats | No | ||
| tripFormats | No | ||
| arrivalDates | No | ||
| arrivalWeeks | No | ||
| carBodyTypes | No | ||
| carSuppliers | No | ||
| cyclingTypes | No | ||
| destinations | No | ||
| gpxAvailable | No | ||
| previewToken | No | ||
| raceDateFrom | No | ||
| arrivalMonths | No | ||
| beachDistance | No | ||
| consentReplay | No | ||
| cruiseRegions | No | ||
| dailyDistance | No | ||
| departureFrom | No | ||
| elevationGain | No | ||
| entryIncluded | No | ||
| golfTripTypes | No | ||
| guideIncluded | No | ||
| hotelIncluded | No | ||
| matchDateFrom | No | ||
| mealPlanTypes | No | ||
| pickupRegions | No | ||
| routeDistance | No | ||
| transmissions | No | ||
| coachTripTypes | No | ||
| courseDistance | No | ||
| drinksIncluded | No | ||
| eBikeAvailable | No | ||
| flightIncluded | No | ||
| maxGuestRating | No | ||
| minGuestRating | No | ||
| onlyDiscounted | No | ||
| pickupStations | No | ||
| skiBusDistance | No | ||
| centrumDistance | No | ||
| dropoffStations | No | ||
| golfBagIncluded | No | ||
| houseSizeRanges | No | ||
| skiLiftDistance | No | ||
| skiPassIncluded | No | ||
| vegetarianMeals | No | ||
| danishInstructor | No | ||
| difficultyLevels | No | ||
| freeCancellation | No | ||
| golfRoundsRanges | No | ||
| greenFeeIncluded | No | ||
| marketingConsent | No | ||
| skiPassDaysCount | No | ||
| skiSlopeDistance | No | ||
| transferIncluded | No | ||
| hikingTripFormats | No | ||
| maxPricePerPerson | No | ||
| minPricePerPerson | No | ||
| trailheadDistance | No | ||
| accommodationTypes | No | ||
| excursionsIncluded | No | ||
| identityPersistent | No | ||
| meditationIncluded | No | ||
| pickupStationTypes | No | ||
| surfSchoolIncluded | No | ||
| triathlonDistances | No | ||
| yogaRetreatFocuses | No | ||
| bikeRentalAvailable | No | ||
| consumptionIncluded | No | ||
| guaranteedDeparture | No | ||
| embarkationCountries | No | ||
| onlyMultiDestination | No | ||
| accommodationFeatures | No | ||
| bikeTransportIncluded | No | ||
| departureDateFlexDays | No | ||
| cyclingDifficultyLevels | No | ||
| luggageTransportIncluded | No | ||
| includeUnratedGuestRating | No |