Group hits by timespan for a certain time range

Hi

Is it possible to group search hits by a timespan within a time range.
I have an index where we have a property date.

What I want to do is:
Hits between Jan 1 2022 - 21 Dec 2022 with a certain search term.
Group hits every quarter and get something like this:

1 quarter: 5956 hits
2 quarter: 3423 hits
3 quarter: 222 hits
4 quarter: 5467 hits

I am not interested in this case to get the actual content, only number of hits and grouping them.
Is this possible at all via the Algolia API/Javascript library or can this be solved in another way without to many requests due to the limit of number of hits.

Regards
O’Brian