Your Billing and Analytics pages count different things on purpose, so the two figures will not match. This is expected, and isn't a sign of a problem.
- Billing counts every search request your application sends.
- Analytics counts searches, a deliberately smaller, de-duplicated number intended to reflect user intent rather than network volume.
How Analytics aggregates requests into searches
Algolia groups multiple search requests into a single reported search based on three things: edit distance between the queries, a 30-second window, and user ID. See Query aggregation and processing.
So a user typing "ipad" sends four search requests, "i", "ip", "ipa", "ipad", which Analytics reports as one search.
The 30-second window is worth knowing about, because it means aggregation isn't unconditional. If the user pauses:
- "i" → "ip" → "ipa" → "ipad" counts as one search
- "i" → "ip" → "ipa" → 30-second pause → "ipad" counts as two searches
By default the user ID is the user's IP address. If you search from your backend, every request arrives with your server's IP, which can distort aggregation, set an explicit user token to correct this.
Why the numbers still differ if you don't use search-as-you-type
Requests sent with analytics set to false
These are excluded from Analytics but are still billed. This is the most commonly missed explanation. See Exclude search queries from analytics.
Category and listing pages
If you use Algolia to build your category pages by applying filters, each page load sends a search request with those filter parameters applied. Another is sent every time the user changes a filter or moves to the next page of results.
Each of those is a billable search request. In Analytics they aggregate down, because they share a user ID and fall inside the same 30-second window.
Scope of the two pages
Analytics reports at the index level. The Usage page aggregates across all indices in the application, and it includes multi-query traffic that can't be attributed to any single index at all. Comparing a per-index Analytics figure against an application-wide Usage figure will always show a gap.
Replicas
Searches against a replica index are billed and reported under that replica, not under its primary.
Refinements and widgets
Every uncached refinement, a filter, a sort change, a facet selection, is a search request. Some widgets send two requests per interaction; refinementList makes one search to get refinement counts and one to get results. See How does Algolia count InstantSearch operations?
How to check which is which
| You want | Look at |
|---|---|
| The number you're billed for |
API Monitoring > Usage, or total_search_requests in the Usage API
|
| User search behaviour | The Analytics dashboard, or the Analytics API |
Don't reconcile one against the other. They are answering different questions.
Related articles
- How Algolia counts search requests, operations, and records
- What is the difference between a Search Operation and a Search Request?
- What is the difference between the Search Count vs Tracked Search Count?
- Do searches performed from the 'Index' tab of my dashboard count against my usage?
- Why has there been a spike in my search usage?