***

title: get_index_info
slug: /reference/python/agents/search/migrator/get-index-info
description: Retrieve information about a search index.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Retrieve information about a search index, including its type, configuration,
and chunk/file counts. Use this to inspect an index before migrating it.

## **Parameters**

<ParamField path="index_path" type="str" required={true} toc={true}>
  Path to a `.swsearch` file. Non-`.swsearch` paths return `{"type": "unknown"}`
  with no additional data.
</ParamField>

## **Returns**

`dict[str, Any]` -- A dictionary containing:

* `type` (str) -- `"sqlite"` or `"unknown"`
* `path` (str) -- the provided path
* `config` (dict) -- index configuration (SQLite only)
* `total_chunks` (int) -- chunk count (SQLite only)
* `total_files` (int) -- file count (SQLite only)

## **Example**

```python {4}
from signalwire.search import SearchIndexMigrator

migrator = SearchIndexMigrator()
info = migrator.get_index_info("knowledge.swsearch")

print(f"Type: {info['type']}")
print(f"Chunks: {info.get('total_chunks', 'N/A')}")
print(f"Files: {info.get('total_files', 'N/A')}")
```