---
title: "Get Index Suggestions"
method: GET
path: "/v1/analytics/indexes/suggestions"
tags: ["Analytics", "Analytics - Indexes"]
---

# Get Index Suggestions

`GET /v1/analytics/indexes/suggestions`

Get index suggestions based on filter usage patterns.

## Query parameters

- `hours` integer — Time window in hours to analyze (max 30 days)
- `min_count` integer — Minimum query count threshold for suggestions

## Response `200`

Successful Response

- IndexSuggestionsResponse — Response containing index suggestions for a namespace.
  - `namespace_id` string, required — Namespace being analyzed
  - `analysis_period` string, required — Time period analyzed (e.g., '24h', '7d')
  - `suggestions` IndexSuggestion[], required — List of index suggestions
    - `field_name` string, required — Field name to index
    - `query_count_24h` integer, required — Number of queries using this field in last 24 hours
    - `query_count_7d` integer, nullable — Number of queries in last 7 days
    - `suggested_type` string, required — Suggested index type (keyword, integer, float, etc.)
    - `is_indexed` boolean, required — Whether field is already indexed
    - `first_seen` string, date-time, required — First time field was seen in filters
    - `last_seen` string, date-time, required — Most recent usage
    - `estimated_performance_gain` string, nullable — Estimated query performance improvement (e.g., '60-80%')
  - `auto_create_enabled` boolean, required — Whether auto-indexing is enabled for this namespace
  - `next_auto_create_run` string, date-time, nullable — Next scheduled auto-creation run (if enabled)

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/04b379bdbb7c/schema)
