Method: projects.matchIntents

Finds the intents that match a given query.

HTTP request

POST https://actions.googleapis.com/v2/{project=projects/*}:matchIntents

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Required. The project being tested, indicated by the Project ID. Format: projects/{project}

Request body

The request body contains data with the following structure:

JSON representation
{
  "query": string,
  "locale": string
}
Fields
query

string

Required. User query as plain text.

locale

string

Required. Locale to use to evaluate the query, such as "en". The format should follow BCP 47: https://tools.ietf.org/html/bcp47 See the list of supported languages in https://developers.google.com/assistant/console/languages-locales

Response body

If successful, the response body contains data with the following structure:

Response for finding matching intents.

JSON representation
{
  "matchedIntents": [
    {
      object (Intent)
    }
  ]
}
Fields
matchedIntents[]

object (Intent)

Intents matched, ordered from most to least relevant. Only the first 50 matches are returned.

Intent

Represents an intent.

JSON representation
{
  "name": string,
  "params": {
    string: {
      object (IntentParameterValue)
    },
    ...
  },
  "query": string
}
Fields
name

string

Required. The name of the last matched intent.

params

map (key: string, value: object (IntentParameterValue))

Required. Represents parameters identified as part of intent matching. This is a map of the name of the identified parameter to the value of the parameter identified from user input. All parameters defined in the matched intent that are identified will be surfaced here.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

query

string

Optional. Typed or spoken input from the end user that matched this intent. This will be populated when an intent is matched, based on the user input.