Menu
Search Using Get
Send search request
/rest/search/v2Use it in a workflow
- Add a step and choose the Coveo connector.
- Pick the Search Using Get action (under Search).
- Fill in the fields below, then reference the result from later steps as
{{searchUsingGet.response.data}}.
Request
Query parameters
qstringThe basic query expression, typically the keywords entered by the end user in a query box. **Note:** When logging a **Search** usage analytics event for a query, the `queryText` field of that event should be set to the `q` value of the corresponding query.
aqstringThe advanced query expression, typically generated by code (e.g., when toggling facet values). **Note:** When logging a **Search** usage analytics event for a query, the `advancedQuery` field of that event should be set to the `aq` value of the corresponding query (for reporting purposes).
cqstringThe constant query expression, typically populated with expressions that must apply to all queries sent from a specific search interface (e.g., from a specific tab). Once evaluated, the result sets of those expressions are kept in a special cache. **Tip:** Avoid including dynamic content in the constant query expression. Otherwise you risk filling up the cache with useless data, which can have a negative impact on performance. **Notes:** - Other parts of the query expression can also benefit from the index cache (see the `maximumAge` parameter). However, using the constant query expression allows you to explicitly cache specific result sets. - Temporal keywords (`now`, `today`, `yesterday`) in the constant query expression are only re-evaluated once per 3-4 minutes; therefore, you should avoid basing `cq` expressions on temporal keywords if you require split second accuracy.
dqstringThe disjunction query expression, typically populated by Coveo ML automatic relevance tuning models to ensure that relevant items are included in the query results. The disjunction query expression is merged with the other parts of the query expression using an `OR` operator. The resulting query expression is `(((q aq) OR (dq)) cq)`.
lqstringThe large query expression, typically populated with a case description, long textual query, or any other form of text that can help refine a query. The Coveo ML Intelligent Term Detection (ITD) feature can extract relevant keywords from the large query expression and inject those keywords in the basic query expression (see the `q` parameter).
enableDidYouMeanbooleanWhether to enable the _Did You Mean_ feature of the index, which populates the `queryCorrections` property of a successful response with keyword correction suggestions. **Notes:** - The Did You Mean feature only processes the basic query expression (see the `q` parameter). - When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array. - The Did You Mean feature will return no corrections when the query is processed by an automatic relevance tuning (ART) model whose Intelligent Term Detection (ITD) feature is enabled. **Default:** `false`
mlDidYouMeanMaxCandidatesinteger (int32)The maximum number of Coveo ML Did You Mean candidates to request from the query suggestions model. **Default:** `3`
mlDidYouMeanMinScorenumber (double)The minimum score a query suggestion may have to be allowed as a candidate for the Coveo ML query suggestions Did You Mean feature. For best results, value should typically be in range [`0.8`, `2`]. **Default:** `1.0`
mlDidYouMeanUseFacetCountbooleanWhether to use facet counts for the Coveo ML Did You Mean feature. Can improve results, but requires more processing. **Default:** `false`
enableMLDidYouMeanboolean**Important:** This feature is still in an experimental state. Whether to enable the Coveo ML query suggestions _Did You Mean_ feature, which populates the `queryCorrections` property of a successful response with keyword correction suggestions. **Notes:** - The Coveo ML query suggestions Did You Mean feature only processes the basic query expression (see the `q` parameter). - When both `enableDidYouMean` and `enableMLDidYouMean` parameter are set to `true`, the output of both features will appear in the `queryCorrections` array. **Default:** `false`
partialMatchbooleanWhether to convert a basic expression containing at least `partialMatchKeywords` to a _partial match expression_, so that any item containing at least `partialMatchThreshold` of those keywords will match the expression. If you do not set this parameter to `true`, an item must contain all of the basic expression keywords to match the expression. **Notes:** - This feature only applies to the basic expression (`q`) of a query, and to the basic `queryOverride` of its Group By operations. - When the `enableQuerySyntax` parameter is set to `true`, this feature has no effect on a basic expression containing advanced Coveo Cloud query syntax (field expressions, operators, etc.). **Default:** `false`
partialMatchKeywordsinteger (int32)The minimum number of keywords that need to be present in a basic expression to convert it to a partial match expression. **Notes:** - This parameter has no meaning unless the `partialMatch` parameter is set to `true`. - Repeated keywords in a basic expression count as a single keyword. - Thesaurus expansions in a basic expression count towards the `partialMatchKeywords` count. - Stemming expansions **do not** count towards the `partialMatchKeywords` count. See also the `partialMatchThreshold` parameter. **Default:** `5`
partialMatchThresholdstringAn absolute or relative value indicating the minimum number (rounded up) of partial match expression keywords an item must contain to match the expression. If specified, the `partialMatchThreshold` value must either be: - a 32-bits unsigned integer (e.g., `3`), - a percentage value between 0% and 100% (e.g., `75%`), - the empty string, or - the `all` string. The `""` and the `all` value are both equivalent to `100%`. **Notes:** - This parameter has no meaning unless the `partialMatch` parameter is set to `true`. - A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the `partialMatchThreshold`. See also the `partialMatchKeywords` parameter. **Examples:** - `3` - `75%` - `all` **Default:** `50%`
lqPartialMatchMaxKeywordsintegerThe maximum number of keywords from the large query expression (see the `lq` parameter) that will be included in the partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression. **Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`). Setting this parameter to a high value can negatively impact the performance of queries, while setting it too low can produce less relevant results. See also the `lqPartialMatchThreshold` parameter. **Default**: `100`
Default 100
lqPartialMatchKeywordsinteger (int32)The minimum number of keywords that need to be present in the large query expression (see the `lq` parameter) to convert it to a partial match expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression. **Note:** This parameter applies as a fallback setting when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`). See also the `lqPartialMatchThreshold` parameter. **Default**: `5`
lqPartialMatchThresholdstringAn absolute or relative value indicating the minimum number of partial match expression keywords an item must contain to match the large query expression in case the Coveo ML Intelligent Term Detection (ITD) feature cannot extract relevant keywords from the large query expression. If specified, the `lqPartialMatchThreshold` value must either be: - a 32-bits unsigned integer (e.g., `3`), - a percentage value between 0% and 100% (e.g., `75%`), - the empty string (`""`), or - the `all` string. The `""` and `all` values are both equivalent to `100%`. **Note:** This parameter applies when no Coveo ML automatic relevance tuning model is available in the query pipeline to process a query that contains a non-null large query expression (`lq`). See also the `lqPartialMatchKeywords` parameter. **Examples:** - `3` - `75%` - `all` **Default:** `50%`
wildcardsbooleanWhether to enable the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing wildcard characters (`*`) to the possible matching keywords. See also the `questionMark` parameter. See [Using Wildcards in Queries](https://docs.coveo.com/en/1580/). **Default:** `false`
questionMarkbooleanWhether to enable question mark characters (`?`) in the *wildcards* feature of the index in order to expand basic expression keywords (see the `q` parameter) containing question mark characters (`?`) to the possible matching keywords. **Note:** Setting this parameter to `true` has no effect unless you also set the `wildcards` parameter to `true`. See [Using Wildcards in Queries](https://docs.coveo.com/en/1580/). **Default:** `false`
Default false
enableQuerySyntaxbooleanWhether to interpret advanced Coveo Cloud query syntax as such in the basic query expression (see the `q` parameter). See also the `lowercaseOperators` parameter. **Default:** `true`
lowercaseOperatorsbooleanWhether to treat the `AND`, `NEAR`, `NOT`, and `OR` keywords in the basic query expression (see the `q` parameter) as Coveo Cloud query syntax operators even if those keywords are in lowercase. **Note:** Setting this parameter to `true` has no effect unless you also set the `enableQuerySyntax` parameter to `true`. **Example:** If you set this parameter, and the `enableQuerySyntax` parameter to `true`, the index interprets the `near` keyword in the basic query expression `service center near me` as the `NEAR` Coveo Cloud query syntax operator. **Default:** `false`
excerptLengthinteger (int32)The maximum length of result excerpts (in number of characters). An *excerpt* is a segmented text generated at query time by the index from the body of an item. When a query is performed, the *excerpt* yields relevant item body sections in which the queried terms are highlighted. An *excerpt* includes the most relevant sentences in which the queried keywords appear, in the order in which they appear in the item, up to the specified number of characters. **Note:** The maximum length you set using this parameter also applies to retrieved first sentences, if those are included in the results (see the `retrieveFirstSentences` parameter). **Default:** `200`
retrieveFirstSentencesbooleanWhether to include the first sentences of textual items in the query results. First sentences are typically useful when rendering result items such as emails, since the first few sentences of these kinds of items are often more relevant than a contextually generated excerpt (see the `excerptLength` parameter). **Note:** The maximum length of the retrieved sentences (in number of characters) is determined by the value of the `excerptLength` parameter. **Default:** `false`
fieldsToIncludeanyThe names of the fields to include with each item in the query results. If specified, no other fields will be included. **Note:** If you specify both an array of fields to include and an array of fields to exclude (see the `fieldsToExclude` parameter), the `fieldsToExclude` parameter has no effect at all. If you do not explicitly specify an array of values for this parameter (or for the `fieldsToExclude` parameter), each query result item will include all of its available fields.
fieldsToExcludeanyThe names of the fields to exclude from the query results. All other fields will be included with each item in the query result. **Note:** If you specify both an array of fields to include (see the `fieldsToInclude` parameter) and an array of fields to exclude, the `fieldsToExclude` parameter has no effect at all. If you do not explicitly specify an array of values for this parameter (or for the `fieldsToInclude` parameter), each query result item will include all of its available fields.
groupByanyThe Group By operations to perform on the query results, typically to extract facets.
facetsanyThe facet operations to perform on the query results.
facetOptionsanyThe global configuration options that apply to all facet requests performed along with the query (see the `facets` query parameter).
categoryFacetsanyData to easily query a hierarchical field using a path of hierarchical values.
sortCriteriastringThe criteria to use for sorting the query results. **Allowed values:** - `relevancy`: use standard index ranking factors (adjacency, TDIDF, etc.) and custom ranking expressions (QREs and QRFs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value. - `date ascending`/`date descending`: use the `@date` field to sort the query results. This field typically contains the last modification date of each item. - `qre`: use only custom ranking expressions (QREs) to compute a ranking `score` for each query result item, and sort the query results by descending `score` value. - `nosort`: do not sort the query results; the index will return result items in an essentially random order. - `@[field] ascending`/`@[field] descending`: sort using the value of a specific sortable field (replace `[field]` by the target field name). You can specify a list of comma-separated sort criteria which will be applied sequentially, i.e., if there's a tie on the 1st criterion, the API uses the 2nd criterion to break the tie. However, this only works when combining: - a `relevancy` criterion followed by one or more field or `date` criteria. - a `qre` criterion followed by one or more field or `date` criteria. - two or more field criteria (e.g., `@views descending,@likes descending`). - a single `date` criterion and one or more field criteria in any order (e.g., `@views descending, date ascending`). **Examples:** - `date ascending` - `@author ascending` - `date descending,@views descending,@likes descending` **Default:** `relevancy`
rankingFunctionsanyThe array of [ranking functions](https://docs.coveo.com/en/1448/) to execute on each query result item. The result of a ranking function is added to the result score, which can affect sorting (see the `Relevancy` and `qre` values of the `sortCriteria` parameter).
queryFunctionsanyThe array of [query functions](https://docs.coveo.com/en/1451/) to execute on each query result item. The result of a query function is stored in a temporary, dynamic field created at query time.
firstResultinteger (int32)The 0-based position of the first result to return in the non-paginated result set. Along with the `numberOfResults` parameter, this allows you to retrieve a specific page of result items. **Note:** This can't be greater than the `maximumResults` value configured for your index. By default, `maximumResults` is set to 5,000 items. **Default:** `0`
numberOfResultsinteger (int32)The number of results to return. Along with the `firstResult` parameter, this allows you to retrieve a specific page of result items. This parameter also defines the maximum number of results which can be returned by the Coveo ML Recommendations feature. **Note:** The maximum `numberOfResults` value is 2,000 items. **Default:** `10`
enableDuplicateFilteringbooleanWhether to filter out duplicates, so that items resembling one another only appear once in the query results. **Notes:** - Two items must be at least 85% similar to one another to be considered duplicates. - When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set. - Enabling this feature can make the total result count less precise, since only results up to those being retrieved (see the `firstResult` and `numberOfResults` parameters) are submitted to duplicate filtering. - Duplicate filtering and [result folding](https://docs.coveo.com/en/1466/) are mutually exclusive. **Default:** `false`
filterFieldstringThe `@`-prefixed name of the field to use to group items into distinct folded query results (see [Result Folding](https://docs.coveo.com/en/1466/)). Use a field whose value is identical for all items to group under the same folded query result. See also the `parentField`, `childField`, and `filterFieldRange` parameters. **Notes:** - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.
parentFieldstringThe `@`-prefixed name of the field to use to be able to identify an item as a parent in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)). Use a field whose value can uniquely identify each item. All items whose `childField` value is identical to the `parentField` value of another item are considered children of that other item. See also the `filterField`, `childField`, and `filterFieldRange` parameters. **Notes:** - In the index, the values of the `parentField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail. - The values of the `parentField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index). - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.
childFieldstringThe `@`-prefixed name of the field to use to be able to identify an item as a child of another item in a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)). Use a field whose value points to the `parentField` value of the intended parent. Whenever an item is a child of another item, its `childField` value must be identical to the `parentField` value of that other item. See also the `filterField`, `parentField`, and `filterFieldRange` parameters. **Notes:** - In the index, the values of the `childField` must only contain alphanumerical characters. Using a `childField` whose values contain non-indexable characters (such as underscores) will make folding fail. - The values of the `childField` must contain 60 characters or less (60 being the default maximum of characters for a word in the index). - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive.
filterFieldRangeinteger (int32)The maximum number of items to include in the `childResults` array of a folded query result (see [Result Folding](https://docs.coveo.com/en/1466/)). See also the `filterField`, `parentField`, and `childField`. **Notes:** - Result folding and duplicate filtering (using the `enableDuplicateFiltering` parameter) are mutually exclusive. **Default:** `5`
summaryLengthinteger (int32)The length of the automatically generated item summary. The Coveo Platform uses a linguistic algorithm that relies on term frequency and proximity to generate an item *summary* made of sentences identified to be the most important ones in the item. This *summary* is generated independently from the query, as opposed to a result item *excerpt*, which is generated based on query keywords. **Default:** `0`
sortFieldstringThis parameter is exposed for backward compatibility reasons. Use the `sortCriteria` parameter along with the `@[field] ascending/@[field] descending` syntax instead.
disableQuerySyntaxbooleanThis parameter is exposed for backward compatibility reasons. Use the `enableQuerySyntax` parameter instead.
staticQuerybooleanWhether to execute this query in a way that does not count against the allowed number of queries per month of a Coveo Cloud organization (QPM), but may produce cached/outdated query results (see [Rendering Static Content Using Persistent Queries](https://docs.coveo.com/en/1009/)). **Note:** Setting this parameter to `true` overwrites the `maximumAge` parameter value for this query. **Default:** `false`
userActionsanyThe parameters allowing user actions to be retrieved in query results.
commerceanyThe parameters for Coveo for Commerce.
dictionaryFieldContextanyA key-value store where each pair corresponds to the name of a dictionary field to query, along with the key to target within that field. **Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `"dictionaryFieldContext": { "price": "storeA" }` in the query means that any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field. **Note:** This cannot be used at the same time as `fieldAliases`. **Note:** This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`dictionaryFieldContext`](https://docs.coveo.com/en/56/#dictionaryfieldcontext-object-optional).
pipelinestringThe name of the query pipeline to use for this request (bypassing its conditions, if it has any). You can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `"pipeline": ""`). If a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any). **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `"default"` value. - When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491). See also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).
maximumAgeinteger (int32)The maximum age of cached results, in milliseconds. If the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index. Such cache hits improve responsiveness but still count as queries in your queries per month (QPM) count. **Note:** This parameter is automatically overridden when `staticQuery` is set to `true`. **Default:** `-1` (which corresponds to the internal default value (15 minutes)
searchHubstringThe first level of origin of the request, typically the identifier of the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter. See also the `tab` parameter.
tabstringThe second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `"default"` string, if no `tab` value was specified in the query). See also the `searchHub` parameter.
referrerstringThe third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value). Coveo Machine Learning models may use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified. See also the `context` parameter.
contextanyThe custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings. Coveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object. **Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`). See also the `referrer` parameter. **Example** `{"userAgeRange":"25-35","userRoles":["PremiumCustomer","ProductReviewer"]}`
actionsHistoryanyThe query and page view actions previously made by the current user. Coveo Machine Learning event recommendations models use this information to provide contextually relevant output. **Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script.
recommendationstringThe identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)). Coveo Machine Learning event recommendations models may use this information to provide contextually relevant output.
localestringThe locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition. Coveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object. **Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).
timezonestringThe [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items. If not specified, the default time zone of the server hosting the index is used. **Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.
formatstringThe format of a successful response. - Use `json` to get the response in the JSON format. - Use `xlsx` to generate an Excel file containing the results (binary). **Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format. **Default:** `json`
debugbooleanWhether to force a successful response to include debug information. **Notes:** - Debug information can only appear in responses in the JSON format (see the `format` parameter). - Avoid setting this parameter to `true` in production, as it has a negative impact on query performance. **Default:** `false`
indexTokenstringThe Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter. If you do not specify an `indexToken` (or `index`) value, any index mirror could be used. **Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).
visitorIdstringA GUID which represents the current user, who can either be authenticated or anonymous. `visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`. For older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.
isGuestUserbooleanWhether the current user is anonymous. Coveo Machine Learning models may use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query. **Default:** `false`
languagestringThis parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead.
mlParametersanyA map of options to pass to the Coveo ML models associated with the request's target query pipeline. **Available parameters:** - `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`. - `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered. - `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration. - `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies. - `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`. - `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates. - `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input. - `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input. - `categoryFilter` (string): The name of a category of products to get recommendations for. - `brandFilter` (string): The name of a brand of products to get recommendations for. - `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `"filters": { "originContext": "<MY-VALUE>", "originLevel2": "<MY-VALUE>" }`. **Examples:** - `{"num": 3, "padding": "trending", "maxActionsHistoryItemsToConsider": 10, "considerUserContext": false}` - `{"wordSelection": "wordsKept:4"}`
indexTypestringThe type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization. **Default:** `coveo`
indexstringThe identifier of the index mirror to forward the request to. See also the `indexToken` parameter. If you do not specify an `index` (or `indexToken`) value, any index mirror could be used. **Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).
logicalIndexstringThe identifier for a logical group of indexes that have been configured to include documents from the same sources. If you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.
maximumTimeoutMsinteger (int32)The maximum number of milliseconds to allow the request to last before timing out. **Maximum:** 10000 **Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.
analyticsanyorganizationIdstringThe unique identifier of the target Coveo Cloud organization. Specifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token.
viewAllContentbooleanWhether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege.
Response
Returns 200 with an object. Read it in later steps with {{searchUsingGet.response.data.<field>}}.
apiVersioninteger (int32)The version of the Search API that sent the query.
categoryFacetsarray<object>Hierarchical data results corresponding the to hierarchical data in the query.
fieldstringparentValuesarray<object>2 fieldsvaluesarray<object>2 fieldsdurationinteger (int32)The `requestDuration` added to the computing time (in milliseconds) that was required by the Search API.
errorsarray<string>The errors that critically changed the query behaviour. These should be addressed right away to prevent future errors.
exceptionobjectcodestringrequiredcontextstringextendedResultsobjectAdditional response attributes coming from the execution of query pipeline integrations. Currently supported properties: - `generativeQuestionAnsweringId`: A stream ID to access the generated answer.
facetsarray<object>The facet results returned by the query. These results are included in the order they were requested in the `facets` query parameter.
domainobject2 fieldsThe domain of the facet. It represents the lowest and highest values possible for this facet. **Note:** This property is only populated when the facet is a range facet and `generateAutomaticRanges: true` was requested.
fieldstringrequiredThe name of the field on which the facet is based. **Example: `author`
indexScorenumber (double)requiredThe ranking score computed by the index for this facet.
isFromAutoSelectbooleanWhether the facet was recommended by Coveo ML.
labelstringA human-readable title that describes the facet.
mlScorenumber (double)The ranking score computed by Coveo ML DNE for this facet.
moreValuesAvailablebooleanrequiredWhether additional values are available for the facet.
valuesarray<oneOf>requiredThe returned facet values.
generateAutomaticFacetsobjectAutomatically generated facets based on the `generateAutomaticFacets` request parameter.
facetsarray<object>8 fieldsgroupByResultsarray<object>The Group By results returned by the query. These results are included in the order they were requested in the `groupBy` query parameter.
Fieldstring> This property is deprecated and Coveo Cloud V1 only; The lowercase `field` should be used instead.
GlobalComputedFieldResultsarray<number (double)>> This property is deprecated and V1 only; The lowercase `globalComputedFieldResults` should be used instead.
fieldstringrequiredThe field on which the Group By operation was executed.
globalComputedFieldResultsarray<number (double)>requiredThe global computed fields that were processed by the index.
valuesarray<object>required11 fieldsThe resulting Group By values.
indexstringThe identifier of the index mirror against which the query was executed (see the `indexToken` query parameter).
indexDurationinteger (int32)The time (in milliseconds) that was required by the index to find the query items.
indexTokenstringThe Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter. If you do not specify an `indexToken` (or `index`) value, any index mirror could be used. **Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).
isFallbackToAdminbooleanWhether the admin session ID was allowed and used by the Coveo for Salesforce search engine. The value will be set to `true` when it is the case, and might be absent or set to `false` otherwise.
phrasesToHighlightobjectThe phrases to highlight in each query result item. This property is populated when the basic query expression (see the `q` query parameter) contains one or several exact phrase match requests (terms between double quote characters).
pipelinestringThe name of the query pipeline to use for this request (bypassing its conditions, if it has any). You can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `"pipeline": ""`). If a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any). **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `"default"` value. See also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).
queryCorrectionobjectProperty returned when the `queryCorrection` feature is enabled. It will either return: - The `originalQuery` and `correctedQuery` if the query was automatically corrected. - A list of `corrections` that could be be manually applied afterward.
correctedQuerystringIf the query was automatically corrected, this property indicates the corrected basic query expression (`q`) that was executed instead of the original one.
correctedQueryTriggerstringIf the query was automatically corrected, this property indicates which strategy triggered the correction. Possible values: `whenNoResults`, `alwaysOnQS`
correctionsarray<object>2 fieldsIf the query wasn't automatically corrected, this property contains the basic query expression (`q`) keyword corrections suggested by the _Did You Mean_ index feature.
originalQuerystringIf the query was automatically corrected, this property indicates the original basic query expression (`q`) that triggered the automatic query correction.
queryCorrectionsarray<object>The query corrections suggested by the index, if the `enableDidYouMean` query parameter was set to `true`.
correctedQuerystringrequiredThe resulting query expression correction suggestion.
wordCorrectionsarray<object>required4 fieldsThe word correction suggestions.
questionAnswerobjectanswerFoundbooleanrequiredanswerSnippetstringrequireddocumentIdobjectrequired2 fieldsquestionstringrequiredrawobjectrelatedQuestionsarray<object>required4 fieldsscorenumberrequiredrefinedKeywordsarray<string>The refined keywords used by the Coveo ML automatic relevance tuning model.
requestDurationinteger (int32)The `indexDuration` added to the time (in milliseconds) that was required to establish a connection between the Search API server and the index server.
resultsarray<object>The items returned for the query.
ClickUristring> This property is deprecated; it should not be populated by Search API V2 searches.
Excerptstring> This property is deprecated; it should not be populated by Search API V2 searches.
FirstSentencesstring> This property is deprecated; it should not be populated by Search API V2 searches.
PrintableUristring> This property is deprecated; it should not be populated by Search API V2 searches.
Titlestring> This property is deprecated; it should not be populated by Search API V2 searches.
UniqueIdstring> This property is deprecated; it should not be populated by Search API V2 searches.
Uristring> This property is deprecated; it should not be populated by Search API V2 searches.
absentTermsarray<string>requiredThe basic query expression terms which this query result item does not match. **Note:** > This property is populated by terms from the query pipeline-processed `q` value (not from the original `q` value).
childResultsarray<oneOf>requiredAn array of references to the children of this item, if result folding was applied (see the `filterField` query parameter). The query results contained in this field will have both their parent and child results set to `null`.
clickUristringrequiredThe hyperlinkable item URI. **Notes:** - Use the `clickUri` value when you want to create hyperlinks to the item, rather than the `uri` or `printableUri` value. - The `clickUri` value is not necessarily unique for each item.
excerptstringrequiredThe contextual excerpt generated for the item (see the `excerptLength` query parameter).
excerptHighlightsarray<object>required2 fieldsThe length and offset of each word to highlight in the item `excerpt` string.
firstSentencesstringrequiredThe first sentences retrieved from the item (see the `retrieveFirstSentences` query parameter).
firstSentencesHighlightsarray<object>required2 fieldsThe length and offset of each word to highlight in the item `firstSentences` string.
flagsstringrequiredThe flags that are set on the item by the index. Distinct values are separated by semicolons.
hasHtmlVersionbooleanrequiredWhether the index contains an HTML version of this item.
hasMobileHtmlVersionbooleanrequiredWhether the index contains a mobile HTML version of this item.
isRecommendationbooleanrequiredWhether the item score was boosted as a Coveo ML recommendation.
isTopResultbooleanrequiredWhether the item score was boosted by a featured result rule in the query pipeline.
isUserActionViewbooleanrequiredWhether the item score was boosted as a Coveo ML recommendation.
parentResultoneOfrequiredpercentScorenumber (double)requiredThe item ranking score expressed as a percentage (see the `sortCriteria` and `rankingFunctions` query parameters).
primaryidstringrequiredThe primary identifier of the item. See [primaryid field](https://docs.coveo.com/en/pa9c0434) for more details.
printableUristringrequiredThe human readable item URI. **Note:** Avoid using the `printableUri` value to create hyperlinks to the item. Use the `ClickUri` value instead.
printableUriHighlightsarray<object>required2 fieldsThe length and offset of each word to highlight in the item `printableUri` string.
rankingInfostringrequiredThe raw debug information generated by the index to detail how the item was ranked. This property is `null` unless the `debug` query parameter is set to `true`.
rankingModifierstringIf applicable, represents the type of ranking modification that was applied to this result. **Note:** When logging a **Click** usage analytics event for an opened query result item, the `rankingModifier` field of that event should be set to the `rankingModifier` value of the opened query result item, if available.
ratingnumber (double)required**Note:** The value of this property is always `3`.
rawobjectrequiredThe values of the fields which were retrieved for this item (see the `fieldsToInclude` and `fieldsToExclude` query parameters).
scoreinteger (int32)requiredThe total ranking score computed for the item (see the `sortCriteria` and `rankingFunctions` query parameters).
summarystringrequiredThe item summary (see the `summaryLength` query parameter).
summaryHighlightsarray<object>required2 fieldsThe length and offset of each word to highlight in the item `summary` string.
titlestringrequiredThe item title. **Note:** When logging a **Click** usage analytics event for an opened query result item, the `documentTitle` field of that event should be set to the `title` value of the opened query result item.
titleHighlightsarray<object>required2 fieldsThe length and offset of each word to highlight in the item `title` string.
totalNumberOfChildResultsinteger (int64)requiredThe total number of children available in the index for this item, if result folding was applied (see the `filterField` query parameter).
uniqueIdstringrequiredThe unique item identifier. You should consider the `uniqueId` value as an opaque string.
uristringrequiredThe item URI. **Notes:** - Avoid using the `uri` value to create hyperlinks to the item. Use the `ClickUri` value instead. - When logging a **Click** usage analytics event for an opened query result item, the `documentUrl` field of that event should be set to the `uri` value of the opened query result item.
searchUidstringThe query [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). Each query sent to the Search API has its own randomly generated `searchUid`. **Note:** When logging a **Search** or **Custom** usage analytics event for a query, or a **Click** usage analytics event for an opened query result item, the `searchQueryUid` field of that event should be set to the `searchUid` value of the query response.
splitTestRunstringThe name of the active A/B test for the query pipeline. This field appears only when an A/B test is active. Use it to identify the test associated with the query.
suggestedFacetsarray<object>A DNE facet suggestion.
fieldstringrequiredThe name of the field on which the DNE facet suggestion is based. **Example**: `author`
valuesarray<object>required2 fieldsThe name of the field on which the DNE facet suggestion is based. **Example**: `author`
termsToHighlightobjectThe terms to highlight in each query result item. Includes all basic query expression keywords, as well as any word stemmed from a basic query expression keyword (see the `q` query parameter), unless this keyword was preceded by the no stemming Coveo Cloud query syntax operator (`+`).
totalCountinteger (int32)The total number of items matching the query for the current user (security trimming applied). **Note:** When logging a **Search** usage analytics event for a query, the `numberOfResults` field of that event should be set to the `totalCount` value of the query (for reporting purposes).
totalCountFilteredinteger (int32)The total number of items matching the query for the current user (security trimming applied) after duplicate filtering has been applied (see the `duplicateFiltering` query parameter).
triggersarray<object>The actions to perform by the client based on the Trigger statements defined in query pipelines (see the `pipeline` query parameter). **Note:** > A Trigger statement must have a condition. Otherwise, the Search API ignores it and does not include it in the `triggers` array of the query response (see [Manage trigger rules](https://docs.coveo.com/en/3413/)).
contentanyrequiredtypestringrequiredThe type of Coveo Cloud query pipeline **Trigger** statement (see [Manage trigger rules](https://docs.coveo.com/en/3413/)).
One ofnotifyexecutequeryredirect
warningsarray<string>The errors that did not make the query fail, but should be addressed. They might be security issues, deprecated behaviors, or any other kind of concern.
{
"apiVersion": 2,
"categoryFacets": [
{
"field": "string",
"parentValues": [
{
"numberOfResults": 0,
"value": "string"
}
],
"values": [
{
"numberOfResults": 0,
"value": "string"
}
]
}
],
"duration": 1235,
"facets": [
{
"field": "author",
"indexScore": 0,
"moreValuesAvailable": false,
"values": [
null
],
"domain": {
"end": null,
"start": null
},
"isFromAutoSelect": false,
"label": "string",
"mlScore": 0
}
],
"groupByResults": [
{
"field": "@author",
"globalComputedFieldResults": [
0
],
"values": [
{
"computedFieldResults": [
243.72
],
"lookupValue": "",
"numberOfResults": 42,
"score": 0,
"value": "Bob Jones",
"valueType": "Standard"
},
{
"computedFieldResults": [
201.82
],
"lookupValue": "",
"numberOfResults": 37,
"score": 0,
"value": "Erika Miller",
"valueType": "Standard"
},
{
"computedFieldResults": [
177.56
],
"lookupValue": "",
"numberOfResults": 24,
"score": 0,
"value": "David Allen",
"valueType": "Standard"
},
{
"computedFieldResults": [
143.92
],
"lookupValue": "",
"numberOfResults": 11,
"score": 0,
"value": "Carrie Green",
"valueType": "Standard"
},
{
"computedFieldResults": [
122.85
],
"lookupValue": "",
"numberOfResults": 77,
"score": 0,
"value": "Anonymous",
"valueType": "Standard"
}
],
"Field": "string",
"GlobalComputedFieldResults": [
0
]
}
],
"index": "mycoveocloudv2organizationid-cqjd206sta1xb9qyxfhhnsu294-Indexer-2-9rbfxhp1n07cth80ckzeh3zotc",
"indexDuration": 1175,
"phrasesToHighlight": {
"cloud v2": {
"cloud": [],
"v2": []
}
},
"pipeline": "CustomerQueryPipeline",
"refinedKeywords": [
"v2",
"platform",
"cloud",
"coveo"
],
"requestDuration": 1181,
"results": [
{
"absentTerms": [
"platform",
"native",
"solution"
],
"childResults": [
null
],
"clickUri": "https://example.com/t/1/898/2",
"excerpt": "... the new Coveo Cloud V2 and Coveo Cloud V1 ... the main differences between the two Coveo Cloud versions ...",
"excerptHighlights": [
{
"length": 5,
"offset": 15
}
],
"firstSentences": "Hello, I know Coveo currently hosts organizations in two independent cloud platforms, the new Coveo Cloud V2 and Coveo Cloud V1, the original Coveo offering in the cloud. I would like to learn the main differences between the two Coveo Cloud versions ...",
"firstSentencesHighlights": [
{
"length": 5,
"offset": 15
}
],
"flags": "HasHtmlVersion;HasMobileHtmlVersion",
"hasHtmlVersion": true,
"hasMobileHtmlVersion": true,
"isRecommendation": false,
"isTopResult": false
}
]
}
Need more? See the Coveo guide for connection setup and behaviour shared by every action.