---
title: "predictiveSearch"
description: "Array of predictive search results."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/products/queries/predictive-search'
  md: 'https://developer.shopline.com/docs/storefront-api/products/queries/predictive-search.md'
---
# predictiveSearch

Array of predictive search results.

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`PredictiveSearchResult`

## Arguments

* `limit`

  [Int](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  The number of results is limited to a range of 1 to 10, with a default value of 10.

* `query`

  [String!](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  The search query.

## Returns

* `products`

  [[Product]](https://developer.shopline.com/docs/storefront-api/products/objects/product.md)

  Products that match the search parameters.

* `queries`

  [[SearchQuerySuggestion!]](https://developer.shopline.com/docs/storefront-api/products/objects/search-query-suggestion.md)

  The query suggestions that are relevant to the search query.

## Code Example

```graphql
 {
	predictiveSearch(limit, query ) 
		 {
			# PredictiveSearchResult fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

