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

# Check if index exists

> Check whether a specified index exists in your Algolia application.

This helper method makes a request to the [Retrieve index settings](/doc/rest-api/search/get-settings) endpoint,
and returns true if that request succeeds.

## Usage

<CodeGroup>
  ```cs C# theme={"system"}
  var response = await client.IndexExistsAsync("INDEX_NAME");
  ```

  ```go Go theme={"system"}
  response, err := client.IndexExists(
    "INDEX_NAME")
  if err != nil {
    // handle the eventual error
    panic(err)
  }
  ```

  ```java Java theme={"system"}
  Boolean response = client.indexExists("INDEX_NAME");
  ```

  ```js JavaScript theme={"system"}
  const response = await client.indexExists({ indexName: 'indexExistsYES' });
  ```

  ```kotlin Kotlin theme={"system"}
  var response = client.indexExists(indexName = "INDEX_NAME")
  ```

  ```php PHP theme={"system"}
  $response = $client->indexExists(
      'INDEX_NAME',
  );
  ```

  ```python Python theme={"system"}
  response = client.index_exists(
      index_name="INDEX_NAME",
  )
  ```

  ```ruby Ruby theme={"system"}
  response = client.index_exists("INDEX_NAME")
  ```

  ```scala Scala theme={"system"}
  val response = Await.result(
    client.indexExists(
      indexName = "INDEX_NAME"
    ),
    Duration(100, "sec")
  )
  ```

  ```swift Swift theme={"system"}
  let response = try await client.indexExists(indexName: "INDEX_NAME")
  ```
</CodeGroup>

## Parameters

<Tabs>
  <Tab title="C#">
    <ParamField body="indexName" type="string" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Go">
    <ParamField body="indexName" type="string" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Java">
    <ParamField body="indexName" type="String" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="JavaScript">
    <ParamField body="indexName" type="string" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Kotlin">
    <ParamField body="indexName" type="String" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="PHP">
    <ParamField body="indexName" type="string" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Python">
    <ParamField body="index_name" type="str" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Ruby">
    <ParamField body="indexName" type="String" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Scala">
    <ParamField body="indexName" type="String" required>
      Index name to check.
    </ParamField>
  </Tab>

  <Tab title="Swift">
    <ParamField body="indexName" type="String" required>
      Index name to check.
    </ParamField>
  </Tab>
</Tabs>
