---
title: "Explain why a document ranked for a query"
method: POST
path: "/v1/indexes/{index_id}/explain"
tags: ["Search"]
---

# Explain why a document ranked for a query

`POST /v1/indexes/{index_id}/explain`

## Request

- Base URL: `https://cold-api.coldstate.ai`
- URL: `https://cold-api.coldstate.ai/v1/indexes/{index_id}/explain`
- Auth: HTTP bearer

## Path parameters

- `index_id` string, required

## Request body

- ExplainRequest
  - `query` string, required
  - `doc_id` string, required: "doc_42" or "42"

## Response `200`

OK

## Other responses

- `401`: Missing or invalid API key
- `404`: Document not found
- `429`: Rate or quota limit exceeded

---

[API](https://skmtc.dev/coldstate/apis/coldstate-api.md) · [All operations](https://skmtc.dev/coldstate/apis/coldstate-api/llms.txt) · [OpenAPI document](https://skmtc.dev/coldstate/apis/coldstate-api/revisions/609b567f955c?raw)
