---
type: api
title: Get search application details
description: ## Required authorization
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch-serverless/operation/operation-search-application-get
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch-serverless/operation/operation-search-application-get
products:
  - Elasticsearch Serverless
---

# Get search application details

Availability: Beta

## Paths

- `GET` `/_application/search_application/{name}`

#### Path parameters

- `name` (string) — required
  The name of the search application

## Required authorization

- Cluster privileges: `manage_search_application`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs use key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  For more information about where to find API keys for the Elasticsearch endpoint (${ES_URL}) for a project, go to [Get started with Elasticsearch Serverless](https://www.elastic.co/docs/solutions/search/serverless-elasticsearch-get-started).

## Response

`application/json`

- `indices` (string[])
  Indices that are part of the Search Application.
- `analytics_collection_name` (string)
  Analytics collection associated to the Search Application.
- `template` (object)
  Search template to use on search operations.
  - `script` (string)
    The associated mustache template.
- `name` (string)
  Search Application name
- `updated_at_millis` (number)
  Last time the Search Application was updated.
## Code examples

#### Console

```console
GET _application/search_application/my-app/
```

#### JavaScript

```javascript
const response = await client.searchApplication.get({
  name: "my-app",
});
```

#### Python

```python
resp = client.search_application.get(
    name="my-app",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_application/search_application/my-app/" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.searchApplication().get(g -> g
    .name("my-app")
);
```

#### C#

```c#
var response = await client.SearchApplication.GetAsync(name: "my-app");
```

#### PHP

```php
$resp = $client->searchApplication()->get([
    "name" => "my-app",
]);
```

#### Ruby

```ruby
response = client.search_application.get(
  name: "my-app"
)
```

## Response examples

#### Search application get response example1

A sucessful response from `GET _application/search_application/my-app/`.

```json
{
  "name": "my-app",
  "indices": [ "index1", "index2" ],
  "updated_at_millis": 1682105622204,
  "template": {
    "script": {
      "source": {
        "query": {
          "query_string": {
            "query": "{{query_string}}",
            "default_field": "{{default_field}}"
          }
        }
      },
      "lang": "mustache",
      "options": {
        "content_type": "application/json;charset=utf-8"
      },
      "params": {
        "query_string": "*",
        "default_field": "*"
      }
    }
  }
}
```

