The generated API clients are a work in progress, you can also find our stable clients on the Algolia documentation.

Skip to main content

Usage API (1.0.0)

Download OpenAPI specification:Download

API to retrieve usage statistics for HTTP requests made to Algolia applications.

Use the Usage API key for authentication.

Get usage.

Returns usage statistics over a specified period.

The specified period must be within the last 90 days. However, the period of data retention can be extended to a maximum of 365 days.

Authorizations:
BasicAuth
path Parameters
statistic
required
string
Example: records,max_qps,region_max_qps

The statistics to retrieve. To retrieve several queries, separate them with commas.

Statistics

The usage statistics cover several sets of operations: search, access control lists, indexing, records, synonyms, Rules, and Insights. They also return metrics on: total operations, total Query Suggestions operations, processing time, indices, queries per second, search capacity, and degraded queries.

To avoid unnecessary calls, you can request all or some of the following sets of statistics with a grouping option.

Search operations

ACL operations

Indexing operations

Record operations

Synonym operations

Rule operations

  • batch_rules_operations: number of batch rules operations
  • clear_rules_operations: number of delete rule operations
  • delete_rules_operations: number of clear rules operations
  • get_rules_operations: number of get rule operations
  • save_rules_operations: number of save rule operations
  • search_rules_operations: number of search rules operations

Insights operations

  • insights_operations: number of operations on the Insights API.

Total operations

  • total_search_operations: sum of all search operations
  • total_search_requests: number of search requests. The number of billed search requests is equal to this value minus querysuggestions_total_search_requests
  • total_recommend_requests: number of Recommend requests
  • total_acl_operations: sum of all ACL operations
  • total_indexing_operations: sum of all indexing operations
  • total_records_operations: sum of all record operations
  • total_synonym_operations: sum of all synonym operations
  • total_rules_operations: sum of all Rule operations
  • total_write_operations: number of Write operations
  • total_read_operations: number of Read operations
  • total_operations: sum of all operations

Total Query Suggestions operations

Query Suggestions operations are a subset of total_search_operations.

  • querysuggestions_total_search_operations: number of Query Suggestions search operations
  • querysuggestions_total_search_requests: number of Query Suggestions search requests
  • querysuggestions_total_acl_operations: sum of all Query Suggestions ACL operations
  • querysuggestions_total_indexing_operations: number of Query Suggestions indexing operations
  • querysuggestions_total_records_operations: number of Query Suggestions record operations
  • querysuggestions_total_synonym_operations: number of Query Suggestions synonym operations
  • querysuggestions_total_rules_operations: number of Query Suggestions Rule operations
  • querysuggestions_total_write_operations: number of Query Suggestions Write operations
  • querysuggestions_total_read_operations: number of Query Suggestions Read operations
  • querysuggestions_total_operations: sum of all Query Suggestions operations

Processing time

  • avg_processing_time: average processing time (in milliseconds)
  • 90p_processing_time: 90th percentile of processing time (in milliseconds)
  • 99p_processing_time: 99th percentile of processing time (in milliseconds)
  • queries_above_last_ms_processing_time: number of queries that take one or more seconds to process

Indices

  • records: number of records
  • data_size: the size of the indices' records (in bytes)
  • file_size: the size of the indices' records and metadata (in bytes)

Maximum QPS (query per second)

  • max_qps: maximum queries per second over the time range (per server)
  • region_max_qps: maximum queries per second over the time range (per region)
  • total_max_qps: maximum queries per second across all servers

Used search capacity

  • used_search_capacity: maximum search capacity used (in percentage per server)
  • avg_used_search_capacity: average search capacity used (in percentage per server)
  • region_used_search_capacity: maximum search capacity used (in percentage per region)
  • region_avg_used_search_capacity: average search capacity used (in percentage per region)
  • total_used_search_capacity: maximum search capacity used (in percentage for all servers)
  • total_avg_used_search_capacity: average used search capacity (in percentage for all servers)

Degraded queries

Use these statistics to monitor the impact of degraded queries.

  • degraded_queries_ssd_used_queries_impacted: percentage of queries that made the Algolia search engine read from the server's SSD.
  • degraded_queries_ssd_used_seconds_impacted: percentage of seconds affected by a ssd_used degradation.
  • degraded_queries_max_capacity_queries_impacted: percentage of queries degraded because all search threads were used.
  • degraded_queries_max_capacity_seconds_impacted: percentage of seconds affected by a max_capacity degradation.

Some statistics provide information about the percentage of time when queries were degraded during the specified period. For example, if degraded_queries_max_capacity_seconds_impacted shows 50%, there were max_capacity problems half of the time. These issues might not happen continuously but at different times during the specified period.

Grouping

query Parameters
startDate
required
string
Example: startDate=2023-08-12T14:30:00Z

Start date in ISO-8601 format.

endDate
required
string
Example: endDate=2023-08-19T16:45:00Z

End date in ISO-8601 format.

granularity
string (granularity)
Default: "daily"
Enum: "hourly" "daily"

Return hourly or daily statistics.

  • hourly: the maximum time range for this granularity is 7 days
  • daily: the maximum time range for this granularity is 365 days.

Responses

Response samples

Content type
application/json
{
  • "statistics": [
    ]
}

Get usage for an index.

Returns index usage statistics over a specified period.

The specified period must be within the last 90 days. However, the period of data retention can be extended to a maximum of 365 days.

Authorizations:
BasicAuth
path Parameters
statistic
required
string
Example: records,max_qps,region_max_qps

The statistics to retrieve. To retrieve several queries, separate them with commas.

Statistics

The usage statistics cover several sets of operations: search, access control lists, indexing, records, synonyms, Rules, and Insights. They also return metrics on: total operations, total Query Suggestions operations, processing time, indices, queries per second, search capacity, and degraded queries.

To avoid unnecessary calls, you can request all or some of the following sets of statistics with a grouping option.

Search operations

ACL operations

Indexing operations

Record operations

Synonym operations

Rule operations

  • batch_rules_operations: number of batch rules operations
  • clear_rules_operations: number of delete rule operations
  • delete_rules_operations: number of clear rules operations
  • get_rules_operations: number of get rule operations
  • save_rules_operations: number of save rule operations
  • search_rules_operations: number of search rules operations

Insights operations

  • insights_operations: number of operations on the Insights API.

Total operations

  • total_search_operations: sum of all search operations
  • total_search_requests: number of search requests. The number of billed search requests is equal to this value minus querysuggestions_total_search_requests
  • total_recommend_requests: number of Recommend requests
  • total_acl_operations: sum of all ACL operations
  • total_indexing_operations: sum of all indexing operations
  • total_records_operations: sum of all record operations
  • total_synonym_operations: sum of all synonym operations
  • total_rules_operations: sum of all Rule operations
  • total_write_operations: number of Write operations
  • total_read_operations: number of Read operations
  • total_operations: sum of all operations

Total Query Suggestions operations

Query Suggestions operations are a subset of total_search_operations.

  • querysuggestions_total_search_operations: number of Query Suggestions search operations
  • querysuggestions_total_search_requests: number of Query Suggestions search requests
  • querysuggestions_total_acl_operations: sum of all Query Suggestions ACL operations
  • querysuggestions_total_indexing_operations: number of Query Suggestions indexing operations
  • querysuggestions_total_records_operations: number of Query Suggestions record operations
  • querysuggestions_total_synonym_operations: number of Query Suggestions synonym operations
  • querysuggestions_total_rules_operations: number of Query Suggestions Rule operations
  • querysuggestions_total_write_operations: number of Query Suggestions Write operations
  • querysuggestions_total_read_operations: number of Query Suggestions Read operations
  • querysuggestions_total_operations: sum of all Query Suggestions operations

Processing time

  • avg_processing_time: average processing time (in milliseconds)
  • 90p_processing_time: 90th percentile of processing time (in milliseconds)
  • 99p_processing_time: 99th percentile of processing time (in milliseconds)
  • queries_above_last_ms_processing_time: number of queries that take one or more seconds to process

Indices

  • records: number of records
  • data_size: the size of the indices' records (in bytes)
  • file_size: the size of the indices' records and metadata (in bytes)

Maximum QPS (query per second)

  • max_qps: maximum queries per second over the time range (per server)
  • region_max_qps: maximum queries per second over the time range (per region)
  • total_max_qps: maximum queries per second across all servers

Used search capacity

  • used_search_capacity: maximum search capacity used (in percentage per server)
  • avg_used_search_capacity: average search capacity used (in percentage per server)
  • region_used_search_capacity: maximum search capacity used (in percentage per region)
  • region_avg_used_search_capacity: average search capacity used (in percentage per region)
  • total_used_search_capacity: maximum search capacity used (in percentage for all servers)
  • total_avg_used_search_capacity: average used search capacity (in percentage for all servers)

Degraded queries

Use these statistics to monitor the impact of degraded queries.

  • degraded_queries_ssd_used_queries_impacted: percentage of queries that made the Algolia search engine read from the server's SSD.
  • degraded_queries_ssd_used_seconds_impacted: percentage of seconds affected by a ssd_used degradation.
  • degraded_queries_max_capacity_queries_impacted: percentage of queries degraded because all search threads were used.
  • degraded_queries_max_capacity_seconds_impacted: percentage of seconds affected by a max_capacity degradation.

Some statistics provide information about the percentage of time when queries were degraded during the specified period. For example, if degraded_queries_max_capacity_seconds_impacted shows 50%, there were max_capacity problems half of the time. These issues might not happen continuously but at different times during the specified period.

Grouping

index
required
string
Example: YOUR_INDEX_NAME

Index name.

query Parameters
startDate
required
string
Example: startDate=2023-08-12T14:30:00Z

Start date in ISO-8601 format.

endDate
required
string
Example: endDate=2023-08-19T16:45:00Z

End date in ISO-8601 format.

granularity
string (granularity)
Default: "daily"
Enum: "hourly" "daily"

Return hourly or daily statistics.

  • hourly: the maximum time range for this granularity is 7 days
  • daily: the maximum time range for this granularity is 365 days.

Responses

Response samples

Content type
application/json
{
  • "statistics": [
    ]
}