> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced usage

> Access the Algolia API client or model indices directly.

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

Sometimes you need to access the Algolia API client directly.

## Access the Algolia API client

The client is available as a singleton and uses the Algolia credentials you added to your
[Rails configuration](/doc/framework-integration/rails/getting-started/setup#configure).

For example, to get <Index /> settings:

```ruby Ruby icon=code theme={"system"}
key = AlgoliaSearch.client.get_settings("index_name")
```

## Access model indices

To access the index used by a model, use the `index_name` class method and pass it as a variable to the API client.
This method follows your naming configuration, such as per-environment settings or custom names.

```ruby Ruby icon=code theme={"system"}
index_name = Contact.index_name
# client..get_settings(index_name), ...
```
