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

# Install the AlgoliaSearchBundle

> Install the AlgoliaSearchBundle to integrate Algolia into your Symfony app.

export const ApplicationID = () => <Tooltip tip="A unique alphanumeric string that identifies an Algolia application." cta="Application ID (dashboard)" href="https://dashboard.algolia.com/account/api-keys">
    application ID
  </Tooltip>;

export const APIKey = () => <Tooltip tip="An alphanumeric string that controls access to the Algolia APIs. It defines what actions are allowed, such as searching an index or adding new records." cta="API key" href="/doc/guides/security/api-keys">
    API key
  </Tooltip>;

## Require the dependency (with Composer)

```sh Command line icon=square-terminal theme={"system"}
composer require algolia/search-bundle
```

## Register the bundle

The bundle is registered automatically.
If it doesn't register, add the following entry to `config/bundles.php`:

```php PHP icon=code theme={"system"}
return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
    // ... Other bundles ...
    Algolia\SearchBundle\AlgoliaSearchBundle::class => ['all' => true],
];
```

## Algolia credentials

You need to provide the Algolia <ApplicationID /> and Admin <APIKey />.
By default, they're loaded from the `ALGOLIA_APP_ID` and `ALGOLIA_API_KEY` environment variables.

If you use a `.env` file,
you can set them there.

```dotenv .env icon=lock-keyhole theme={"system"}
ALGOLIA_APP_ID=# Your Algolia application ID
ALGOLIA_API_KEY=# Your Algolia API key
```
