Elasticsearch Serverless API logo
Elastic APIs hub
  • Elastic Cloud API
  • Elastic Cloud Billing API
  • Elastic Cloud Enterprise API
  • Elastic Cloud Serverless API
  • Elasticsearch API
  • Elasticsearch Serverless API
  • Kibana API
  • Kibana Serverless API
  • Logstash API
  • Observability Intake Serverless API
Back to hub page
API Changelog
Download source
  • JSON OpenAPI specification
  • YAML OpenAPI specification
Feedback

Topics

  • Introduction
  • Authentication

Endpoints

  • Behavioral analytics
    • Get behavioral analytics collections GET
    • Create a behavioral analytics collection PUT
    • Delete a behavioral analytics collection DELETE
    • Get behavioral analytics collections GET
  • Compact and aligned text (CAT)
    • Get aliases GET
    • Get aliases GET
    • Get component templates GET
    • Get component templates GET
    • Get a document count GET
    • Get a document count GET
    • Get CAT help GET
    • Get index information GET
    • Get index information GET
    • Get data frame analytics jobs GET
    • Get data frame analytics jobs GET
    • Get datafeeds GET
    • Get datafeeds GET
    • Get anomaly detection jobs GET
    • Get anomaly detection jobs GET
    • Get trained models GET
    • Get trained models GET
    • Get transform information GET
    • Get transform information GET
  • Cluster
    • Get cluster info GET
    • Ping the cluster HEAD
  • Connector
    • Check in a connector PUT
    • Get a connector GET
    • Create or update a connector PUT
    • Delete a connector DELETE
    • Get all connectors GET
    • Create or update a connector PUT
    • Create a connector POST
    • Cancel a connector sync job PUT
    • Get a connector sync job GET
    • Delete a connector sync job DELETE
    • Get all connector sync jobs GET
    • Create a connector sync job POST
    • Activate the connector draft filter PUT
    • Update the connector API key ID PUT
    • Update the connector configuration PUT
    • Update the connector error field PUT
    • Update the connector filtering PUT
    • Update the connector draft filtering validation PUT
    • Update the connector index name PUT
    • Update the connector name and description PUT
    • Update the connector is_native flag PUT
    • Update the connector pipeline PUT
    • Update the connector scheduling PUT
    • Update the connector service type PUT
    • Update the connector status PUT
  • Data stream
    • Get data streams GET
    • Create a data stream PUT
    • Delete data streams DELETE
    • Get the status for a data stream lifecycle GET
    • Get data stream lifecycles GET
    • Update data stream lifecycles PUT
    • Get data streams GET
    • Convert an index alias to a data stream POST
    • Update data streams POST
  • Document
    • Bulk index or delete documents PUT
    • Bulk index or delete documents POST
    • Bulk index or delete documents PUT
    • Bulk index or delete documents POST
    • Create a new document in the index PUT
    • Create a new document in the index POST
    • Get a document by its ID GET
    • Create or update a document in an index PUT
    • Create or update a document in an index POST
    • Delete a document DELETE
    • Check a document HEAD
    • Delete documents POST
    • Get a document's source GET
    • Check for a document source HEAD
    • Create or update a document in an index POST
    • Get multiple documents GET
    • Get multiple documents POST
    • Get multiple documents GET
    • Get multiple documents POST
    • Get multiple term vectors GET
    • Get multiple term vectors POST
    • Get multiple term vectors GET
    • Get multiple term vectors POST
    • Reindex documents POST
    • Get term vector information GET
    • Get term vector information POST
    • Get term vector information GET
    • Get term vector information POST
    • Update a document POST
    • Update documents POST
  • Enrich
    • Get an enrich policy GET
    • Create an enrich policy PUT
    • Delete an enrich policy DELETE
    • Run an enrich policy PUT
    • Get an enrich policy GET
  • EQL
    • Get async EQL search results GET
    • Delete an async EQL search DELETE
    • Get the async EQL status GET
    • Get EQL search results GET
    • Get EQL search results POST
  • ES|QL
    • Get a specific running ES|QL query information GET
    • Get running ES|QL queries information GET
    • Run an ES|QL query POST
  • Graph explore
    • Explore graph analytics GET
    • Explore graph analytics POST
  • Index
    • Get component templates GET
    • Create or update a component template PUT
    • Create or update a component template POST
    • Delete component templates DELETE
    • Check component templates HEAD
    • Get component templates GET
    • Add an index block PUT
    • Get tokens from text analysis GET
    • Get tokens from text analysis POST
    • Get tokens from text analysis GET
    • Get tokens from text analysis POST
    • Get index information GET
    • Create an index PUT
    • Delete indices DELETE
    • Check indices HEAD
    • Get aliases GET
    • Create or update an alias PUT
    • Create or update an alias POST
    • Delete an alias DELETE
    • Check aliases HEAD
    • Create or update an alias PUT
    • Create or update an alias POST
    • Delete an alias DELETE
    • Get index templates GET
    • Create or update an index template PUT
    • Create or update an index template POST
    • Delete an index template DELETE
    • Check index templates HEAD
    • Get aliases GET
    • Check aliases HEAD
    • Get aliases GET
    • Get aliases GET
    • Get index templates GET
    • Get mapping definitions GET
    • Get mapping definitions GET
    • Update field mappings PUT
    • Update field mappings POST
    • Get index settings GET
    • Update index settings PUT
    • Get index settings GET
    • Update index settings PUT
    • Get index settings GET
    • Get index settings GET
    • Refresh an index GET
    • Refresh an index POST
    • Refresh an index GET
    • Refresh an index POST
    • Resolve indices GET
    • Roll over to a new index POST
    • Roll over to a new index POST
    • Simulate an index POST
    • Simulate an index template POST
    • Simulate an index template POST
    • Create or update an alias POST
    • Validate a query GET
    • Validate a query POST
    • Validate a query GET
    • Validate a query POST
  • Inference
    • Perform chat completion inference POST
    • Perform completion inference on the service POST
    • Get an inference endpoint GET
    • Create an inference endpoint PUT
    • Perform inference on the service POST
    • Delete an inference endpoint DELETE
    • Get an inference endpoint GET
    • Create an inference endpoint PUT
    • Perform inference on the service POST
    • Delete an inference endpoint DELETE
    • Get an inference endpoint GET
    • Create an AlibabaCloud AI Search inference endpoint PUT
    • Create an Amazon Bedrock inference endpoint PUT
    • Create an Anthropic inference endpoint PUT
    • Create an Azure AI studio inference endpoint PUT
    • Create an Azure OpenAI inference endpoint PUT
    • Create a Cohere inference endpoint PUT
    • Create an Elasticsearch inference endpoint PUT
    • Create an ELSER inference endpoint PUT
    • Create an Google AI Studio inference endpoint PUT
    • Create a Google Vertex AI inference endpoint PUT
    • Create a Hugging Face inference endpoint PUT
    • Create an JinaAI inference endpoint PUT
    • Create a Mistral inference endpoint PUT
    • Create an OpenAI inference endpoint PUT
    • Create a VoyageAI inference endpoint PUT
    • Create a Watsonx inference endpoint PUT
    • Perform rereanking inference on the service POST
    • Perform sparse embedding inference on the service POST
    • Perform text embedding inference on the service POST
  • Info
    • Get cluster info GET
  • Ingest
    • Get pipelines GET
    • Create or update a pipeline PUT
    • Delete pipelines DELETE
    • Get pipelines GET
    • Run a grok processor GET
    • Simulate a pipeline GET
    • Simulate a pipeline POST
    • Simulate a pipeline GET
    • Simulate a pipeline POST
  • Licensing
    • Get license information GET
  • Logstash
    • Get Logstash pipelines GET
    • Create or update a Logstash pipeline PUT
    • Delete a Logstash pipeline DELETE
    • Get Logstash pipelines GET
  • Machine learning anomaly detection
    • Close anomaly detection jobs POST
    • Get calendar configuration info GET
    • Create a calendar PUT
    • Get calendar configuration info POST
    • Delete a calendar DELETE
    • Delete events from a calendar DELETE
    • Add anomaly detection job to calendar PUT
    • Delete anomaly jobs from a calendar DELETE
    • Get datafeeds configuration info GET
    • Create a datafeed PUT
    • Delete a datafeed DELETE
    • Get filters GET
    • Create a filter PUT
    • Delete a filter DELETE
    • Get anomaly detection jobs configuration info GET
    • Create an anomaly detection job PUT
    • Delete an anomaly detection job DELETE
    • Estimate job model memory usage POST
    • Force buffered data to be processed POST
    • Get info about events in calendars GET
    • Add scheduled events to the calendar POST
    • Get calendar configuration info GET
    • Get calendar configuration info POST
    • Get datafeed stats GET
    • Get datafeed stats GET
    • Get datafeeds configuration info GET
    • Get filters GET
    • Get anomaly detection job stats GET
    • Get anomaly detection job stats GET
    • Get anomaly detection jobs configuration info GET
    • Get overall bucket results GET
    • Get overall bucket results POST
    • Open anomaly detection jobs POST
    • Preview a datafeed GET
    • Preview a datafeed POST
    • Preview a datafeed GET
    • Preview a datafeed POST
    • Reset an anomaly detection job POST
    • Start datafeeds POST
    • Stop datafeeds POST
    • Update a datafeed POST
    • Update a filter POST
    • Update an anomaly detection job POST
  • Machine learning data frame analytics
    • Get data frame analytics job configuration info GET
    • Create a data frame analytics job PUT
    • Delete a data frame analytics job DELETE
    • Evaluate data frame analytics POST
    • Get data frame analytics job configuration info GET
    • Get data frame analytics job stats GET
    • Get data frame analytics job stats GET
    • Preview features used by data frame analytics GET
    • Preview features used by data frame analytics POST
    • Preview features used by data frame analytics GET
    • Preview features used by data frame analytics POST
    • Start a data frame analytics job POST
    • Stop data frame analytics jobs POST
    • Update a data frame analytics job POST
  • Machine learning trained model
    • Get trained model configuration info GET
    • Create a trained model PUT
    • Delete an unreferenced trained model DELETE
    • Create or update a trained model alias PUT
    • Delete a trained model alias DELETE
    • Get trained model configuration info GET
    • Get trained models usage info GET
    • Get trained models usage info GET
    • Evaluate a trained model POST
    • Create part of a trained model definition PUT
    • Create a trained model vocabulary PUT
    • Start a trained model deployment POST
    • Stop a trained model deployment POST
    • Update a trained model deployment POST
  • Query rules
    • Get a query rule GET
    • Create or update a query rule PUT
    • Delete a query rule DELETE
    • Get a query ruleset GET
    • Create or update a query ruleset PUT
    • Delete a query ruleset DELETE
    • Get all query rulesets GET
    • Test a query ruleset POST
  • Script
    • Get a script or search template GET
    • Create or update a script or search template PUT
    • Create or update a script or search template POST
    • Delete a script or search template DELETE
    • Create or update a script or search template PUT
    • Create or update a script or search template POST
    • Run a script GET
    • Run a script POST
  • Search
    • Get async search results GET
    • Delete an async search DELETE
    • Get the async search status GET
    • Run an async search POST
    • Run an async search POST
    • Run a scrolling search GET
    • Run a scrolling search POST
    • Clear a scrolling search DELETE
    • Run a scrolling search GET
    • Run a scrolling search POST
    • Clear a scrolling search DELETE
    • Close a point in time DELETE
    • Count search results GET
    • Count search results POST
    • Count search results GET
    • Count search results POST
    • Explain a document match result GET
    • Explain a document match result POST
    • Get the field capabilities GET
    • Get the field capabilities POST
    • Get the field capabilities GET
    • Get the field capabilities POST
    • Run multiple searches GET
    • Run multiple searches POST
    • Run multiple searches GET
    • Run multiple searches POST
    • Run multiple templated searches GET
    • Run multiple templated searches POST
    • Run multiple templated searches GET
    • Run multiple templated searches POST
    • Open a point in time POST
    • Evaluate ranked search results GET
    • Evaluate ranked search results POST
    • Evaluate ranked search results GET
    • Evaluate ranked search results POST
    • Render a search template GET
    • Render a search template POST
    • Render a search template GET
    • Render a search template POST
    • Run a search GET
    • Run a search POST
    • Run a search GET
    • Run a search POST
    • Search a vector tile GET
    • Search a vector tile POST
    • Run a search with a search template GET
    • Run a search with a search template POST
    • Run a search with a search template GET
    • Run a search with a search template POST
    • Get terms in an index GET
    • Get terms in an index POST
  • Search application
    • Get search application details GET
    • Create or update a search application PUT
    • Delete a search application DELETE
    • Get search applications GET
    • Run a search application search GET
    • Run a search application search POST
  • Security
    • Authenticate a user GET
    • Get API key information GET
    • Create an API key PUT
    • Create an API key POST
    • Invalidate API keys DELETE
    • Get roles GET
    • Create or update roles PUT
    • Create or update roles POST
    • Delete roles DELETE
    • Get builtin privileges GET
    • Get roles GET
    • Check user privileges GET
    • Check user privileges POST
    • Check user privileges GET
    • Check user privileges POST
    • Find API keys with a query GET
    • Find API keys with a query POST
    • Find roles with a query GET
    • Find roles with a query POST
    • Update an API key PUT
  • SQL
    • Clear an SQL search cursor POST
    • Delete an async SQL search DELETE
    • Get async SQL search results GET
    • Get the async SQL search status GET
    • Get SQL search results GET
    • Get SQL search results POST
    • Translate SQL into Elasticsearch queries GET
    • Translate SQL into Elasticsearch queries POST
  • Synonyms
    • Get a synonym set GET
    • Create or update a synonym set PUT
    • Delete a synonym set DELETE
    • Get a synonym rule GET
    • Create or update a synonym rule PUT
    • Delete a synonym rule DELETE
    • Get all synonym sets GET
  • Task management
    • Get task information GET
  • Transform
    • Get transforms GET
    • Create a transform PUT
    • Delete a transform DELETE
    • Get transforms GET
    • Get transform stats GET
    • Preview a transform GET
    • Preview a transform POST
    • Preview a transform GET
    • Preview a transform POST
    • Reset a transform POST
    • Schedule a transform to start now POST
    • Start a transform POST
    • Stop transforms POST
    • Update a transform POST
Powered by Bump.sh

Run a search application search Beta

GET /_application/search_application/{name}/_search
Api key auth

Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. Unspecified template parameters are assigned their default values if applicable.

Path parameters

  • name string Required

    The name of the search application to be searched.

Query parameters

  • typed_keys boolean

    Determines whether aggregation names are prefixed by their respective types in the response.

application/json

Body

  • params object

    Query parameters specific to this request, which will override any defaults specified in the template.

    Hide params attribute Show params attribute object
    • * object Additional properties

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • took number Required

      The number of milliseconds it took Elasticsearch to run the request. This value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response. It includes:

      • Communication time between the coordinating node and data nodes
      • Time the request spends in the search thread pool, queued for execution
      • Actual run time

      It does not include:

      • Time needed to send the request to Elasticsearch
      • Time needed to serialize the JSON response
      • Time needed to send the response to a client
    • timed_out boolean Required

      If true, the request timed out before completion; returned results may be partial or empty.

    • _shards object Required
      Hide _shards attributes Show _shards attributes object
      • failed number Required
      • successful number Required
      • total number Required
      • failures array[object]
        Hide failures attributes Show failures attributes object
        • index string
        • node string
        • reason object Required
          Hide reason attributes Show reason attributes object
          • type string Required

            The type of error

          • reason string

            A human-readable explanation of the error, in English.

          • stack_trace string

            The server stack trace. Present only if the error_trace=true parameter was sent with the request.

          • caused_by object
          • root_cause array[object]
          • suppressed array[object]
        • shard number Required
        • status string
      • skipped number
    • hits object Required
      Hide hits attributes Show hits attributes object
      • total object | number

        Total hit count information, present only if track_total_hits wasn't false in the search request.

        One of:
        TotalHits object number-2 number
        Hide attributes Show attributes
        • relation string Required

          Values are eq or gte.

        • value number Required
      • hits array[object] Required
        Hide hits attributes Show hits attributes object
        • _index string Required
        • _id string
        • _score number | string | null

          One of:
          number-1 number string-2 string | null
        • _explanation object
          Hide _explanation attributes Show _explanation attributes object
          • description string Required
          • details array[object] Required
          • value number Required
        • fields object
          Hide fields attribute Show fields attribute object
          • * object Additional properties
        • highlight object
          Hide highlight attribute Show highlight attribute object
          • * array[string] Additional properties
        • inner_hits object
          Hide inner_hits attribute Show inner_hits attribute object
          • * object Additional properties
            Hide * attribute Show * attribute object
            • hits object Required
        • matched_queries array[string] | object

          One of:
          array-1 array[string] object-2 object
          Hide attribute Show attribute
          • * number Additional properties
        • _nested object
          Hide _nested attributes Show _nested attributes object
          • field string Required

            Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

          • offset number Required
          • _nested object
        • _ignored array[string]
        • ignored_field_values object
          Hide ignored_field_values attribute Show ignored_field_values attribute object
          • * array[object] Additional properties
        • _shard string
        • _node string
        • _routing string
        • _source object
        • _rank number
        • _seq_no number
        • _primary_term number
        • _version number
        • sort array[number | string | boolean | null]

          A field value.

      • max_score number | string | null

        One of:
        number-1 number string-2 string | null
    • aggregations object
    • _clusters object
      Hide _clusters attributes Show _clusters attributes object
      • skipped number Required
      • successful number Required
      • total number Required
      • running number Required
      • partial number Required
      • failed number Required
      • details object
        Hide details attribute Show details attribute object
        • * object Additional properties
          Hide * attributes Show * attributes object
          • status string Required

            Values are running, successful, partial, skipped, or failed.

          • indices string Required
          • took number

            Time unit for milliseconds

          • timed_out boolean Required
          • _shards object
            Hide _shards attributes Show _shards attributes object
            • failed number Required
            • successful number Required
            • total number Required
            • failures array[object]
            • skipped number
          • failures array[object]
            Hide failures attributes Show failures attributes object
            • index string
            • node string
            • reason object Required
            • shard number Required
            • status string
    • fields object
      Hide fields attribute Show fields attribute object
      • * object Additional properties
    • max_score number
    • num_reduce_phases number
    • profile object
      Hide profile attribute Show profile attribute object
      • shards array[object] Required
        Hide shards attributes Show shards attributes object
        • aggregations array[object] Required
          Hide aggregations attributes Show aggregations attributes object
          • breakdown object Required
          • description string Required
          • time_in_nanos
          • type string Required
          • debug object
          • children array[object]
        • cluster string Required
        • dfs object
          Hide dfs attributes Show dfs attributes object
          • statistics object
            Hide statistics attributes Show statistics attributes object
            • type string Required
            • description string Required
            • time string

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • time_in_nanos
            • breakdown object Required
            • debug object
            • children array[object]
          • knn array[object]
        • fetch object
          Hide fetch attributes Show fetch attributes object
          • type string Required
          • description string Required
          • time_in_nanos number

            Time unit for nanoseconds

          • breakdown object Required
            Hide breakdown attributes Show breakdown attributes object
            • load_source number
            • load_source_count number
            • load_stored_fields number
            • load_stored_fields_count number
            • next_reader number
            • next_reader_count number
            • process_count number
            • process number
          • debug object
            Hide debug attributes Show debug attributes object
            • stored_fields array[string]
            • fast_path number
          • children array[object]
        • id string Required
        • index string Required
        • node_id string Required
        • searches array[object] Required
          Hide searches attributes Show searches attributes object
          • collector array[object] Required
          • query array[object] Required
          • rewrite_time number Required
        • shard_id number Required
    • pit_id string
    • _scroll_id string
    • suggest object
      Hide suggest attribute Show suggest attribute object
      • * array[object] Additional properties
        One of:
        CompletionSuggest object PhraseSuggest object TermSuggest object
        Hide attributes Show attributes
        • length number Required
        • offset number Required
        • text string Required
        • options
        Hide attributes Show attributes
        • length number Required
        • offset number Required
        • text string Required
        • options
        Hide attributes Show attributes
        • length number Required
        • offset number Required
        • text string Required
        • options
    • terminated_early boolean
GET /_application/search_application/{name}/_search
curl \
 --request GET 'http://api.example.com/_application/search_application/{name}/_search' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"params\": {\n    \"query_string\": \"my first query\",\n    \"text_fields\": [\n      {\"name\": \"title\", \"boost\": 5},\n      {\"name\": \"description\", \"boost\": 1}\n    ]\n  }\n}"'
Request example
Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template.
{
  "params": {
    "query_string": "my first query",
    "text_fields": [
      {"name": "title", "boost": 5},
      {"name": "description", "boost": 1}
    ]
  }
}