Skip to main content
GET
/
search
/
{id}
/
stats
Get Index Stats
curl --request GET \
  --url https://api.upstash.com/v2/search/{id}/stats \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.upstash.com/v2/search/{id}/stats"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://api.upstash.com/v2/search/{id}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.upstash.com/v2/search/{id}/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.upstash.com/v2/search/{id}/stats"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.upstash.com/v2/search/{id}/stats")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.upstash.com/v2/search/{id}/stats")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "pending_index_count": 1,
  "current_vector_count": 1000,
  "daily_query_count": 100,
  "daily_update_count": 10,
  "monthly_query_count": 1000,
  "monthly_update_count": 1000,
  "monthly_bandwidth_usage": 7000,
  "storage_usage": 7000,
  "monthly_cost": 0.5,
  "daily_update_requests": [
    {
      "x": "2025-10-19 18:33:05.244068975 +0000 UTC",
      "y": 1
    }
  ],
  "daily_query_requests": [
    {
      "x": "2025-10-19 18:33:05.244068975 +0000 UTC",
      "y": 7
    }
  ],
  "daily_bandwidths": [
    {
      "x": "2025-10-19 18:33:05.244068975 +0000 UTC",
      "y": 7
    }
  ],
  "days": [
    "Sunday",
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday"
  ],
  "query_throughput": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 7
    }
  ],
  "update_throughput": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 7
    }
  ],
  "query_latency_mean": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "query_latency_99": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "update_latency_mean": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "update_latency_99": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "embeds_latency_mean": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "embeds_latency_99": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "vector_count": [
    {
      "x": "2025-10-23 17:35:00.000 +0000 UTC",
      "y": 2
    }
  ],
  "data_size": [
    {
      "x": "2025-10-23 17:35:00.000 +0000 UTC",
      "y": 76
    }
  ],
  "daily_rerank_count": 0,
  "monthly_rerank_count": 10,
  "daily_rerank_requests": [
    {
      "x": "2025-10-19 18:33:05.244068975 +0000 UTC",
      "y": 1
    }
  ],
  "rerank_latency_mean": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ],
  "rerank_latency_99": [
    {
      "x": "2025-10-23 17:34:00.000 +0000 UTC",
      "y": 0
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The ID of the search index

Query Parameters

period
enum<string>
default:1h

Time period for statistics aggregation. Each period returns 60 datapoints with intervals adjusted to the period length.

Exceptionally for 30 days, it returns 240 datapoints with 3-hour intervals for increased granularity.

Available options:
1h,
3h,
12h,
1d,
3d,
7d,
30d

Response

200 - application/json

Statistics for the specified search index retrieved successfully

pending_index_count
integer

Number of pending index operations

Example:

1

current_vector_count
integer

Current number of vectors in the index

Example:

1000

daily_query_count
integer

Total number of query operations executed today

Example:

100

daily_update_count
integer

Total number of update operations executed today

Example:

10

monthly_query_count
integer

Total query operations in current month

Example:

1000

monthly_update_count
integer

Total update operations in current month

Example:

1000

monthly_bandwidth_usage
integer

Total bandwidth used in current month (bytes)

Example:

7000

storage_usage
integer

Current storage used (bytes)

Example:

7000

monthly_cost
number<float>

Total cost in current month

Example:

0.5

daily_update_requests
object[]

Daily update requests over time

Example:
[
{
"x": "2025-10-19 18:33:05.244068975 +0000 UTC",
"y": 1
}
]
daily_query_requests
object[]

Daily query requests over time

Example:
[
{
"x": "2025-10-19 18:33:05.244068975 +0000 UTC",
"y": 7
}
]
daily_bandwidths
object[]

Daily bandwidth usage over time

Example:
[
{
"x": "2025-10-19 18:33:05.244068975 +0000 UTC",
"y": 7
}
]
days
string[]

Days of the week for measurement

Example:
[
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday"
]
query_throughput
object[]

Query throughput over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 7
}
]
update_throughput
object[]

Update throughput over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 7
}
]
query_latency_mean
object[]

Average query latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
query_latency_99
object[]

99th percentile query latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
update_latency_mean
object[]

Average update latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
update_latency_99
object[]

99th percentile update latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
embeds_latency_mean
object[]

Average embedding latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
embeds_latency_99
object[]

99th percentile embedding latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
vector_count
object[]

Vector count over time

Example:
[
{
"x": "2025-10-23 17:35:00.000 +0000 UTC",
"y": 2
}
]
data_size
object[]

Data size over time

Example:
[
{
"x": "2025-10-23 17:35:00.000 +0000 UTC",
"y": 76
}
]
daily_rerank_count
integer

Total number of rerank operations executed today

Example:

0

monthly_rerank_count
integer

Total rerank operations in current month

Example:

10

daily_rerank_requests
object[]

Daily rerank requests over time

Example:
[
{
"x": "2025-10-19 18:33:05.244068975 +0000 UTC",
"y": 1
}
]
rerank_latency_mean
object[]

Average rerank latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]
rerank_latency_99
object[]

99th percentile rerank latency over time

Example:
[
{
"x": "2025-10-23 17:34:00.000 +0000 UTC",
"y": 0
}
]