---
title: searches
description: >-
  Reference for the ShopifyQL `searches` schema. Every metric and dimension,
  paired with worked example queries.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/searches
  md: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/searches.md
api_name: shopifyql
---

# searches

The `searches` [schema](https://shopify.dev/docs/api/shopifyql/latest/schemas) captures online store search activity with query classification fields. Use it to distinguish result availability, inferred intent, and whether queries target products, articles, or pages.

### Use cases

* **Intent distribution**: Group [`searches`](#searchesmetric-propertydetail-searches) by [`search_query_intent`](#searchesdimension-propertydetail-searchqueryintent) to summarize search intent distribution.
* **Result availability**: Filter [`search_results_were_returned`](#searchesdimension-propertydetail-searchresultswerereturned) to separate searches with and without results.
* **Query classification**: Compare [`is_product_search_query`](#searchesdimension-propertydetail-isproductsearchquery), [`is_article_search_query`](#searchesdimension-propertydetail-isarticlesearchquery), and [`is_page_search_query`](#searchesdimension-propertydetail-ispagesearchquery) flags to split searches by content type.
* **Day-of-week trend**: Trend [`searches`](#searchesmetric-propertydetail-searches) by [`day_of_week`](#searchesdimension-propertydetail-dayofweek) to see which days drive the most on-site search.

### Examples

* #### Rank top queries by whether results returned last month

  ##### Description

  Show the 50 most-run \`searches\` last month, split by whether results were returned. This example uses a \[\`GROUP\_TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#group-total-columns) subtotal per query.

  ##### ShopifyQL

  ```shopifyql
  FROM searches
    SHOW searches
    GROUP BY search_query, search_results_were_returned WITH TOTALS, GROUP_TOTALS
    HAVING searches > 5
    DURING last_month
    ORDER BY searches DESC
    LIMIT 50
  VISUALIZE searches TYPE grouped_bar
  ```

* #### Break down search volume by query intent this quarter

  ##### Description

  Break down \`searches\` by query intent this quarter. This example uses \[\`WITH TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#total-columns) to add the all-intent total to every row.

  ##### ShopifyQL

  ```shopifyql
  FROM searches
    SHOW searches
    GROUP BY search_query_intent WITH TOTALS
    DURING this_quarter
    ORDER BY searches DESC
  VISUALIZE searches TYPE donut
  ```

* #### Compare total searches to the previous month

  ##### Description

  Compare \`searches\` last month against the month before. This example uses \[\`COMPARE TO previous\_period\`]\(/docs/api/shopifyql/latest/syntax/compare-to) to benchmark your date range against the equal-length period right before it.

  ##### ShopifyQL

  ```shopifyql
  FROM searches
    SHOW searches
    WITH PERCENT_CHANGE
    DURING last_month
    COMPARE TO previous_period
  ```

* #### Track weekly searches this quarter

  ##### Description

  Track weekly \`searches\` across this quarter. This example uses \[\`WITH TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#total-columns) to add a quarter-to-date total beside the weekly rows.

  ##### ShopifyQL

  ```shopifyql
  FROM searches
    SHOW searches
    TIMESERIES week WITH TOTALS
    DURING this_quarter
    ORDER BY week ASC
  VISUALIZE searches TYPE bar
  ```

***

## Metrics

Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.

Metrics you can use when querying `FROM searches`.

* **searches**

  **INTEGER**

  Number of search queries made on your online store

### INTEGER

Whole number without decimal places, used for counts and quantities

```ts
```

***

## Dimensions

Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.

Dimensions you can use when querying `FROM searches`.

* **day**

  **DAY\_TIMESTAMP**

  The day a search happened.

* **day\_​of\_​week**

  **DAY\_OF\_WEEK**

  The day of the week a search happened, with values Monday through Sunday.

* **hour**

  **HOUR\_TIMESTAMP**

  The hour a search happened.

* **hour\_​of\_​day**

  **HOUR\_OF\_DAY**

  The hour of day a search happened, with values 0 through 23.

* **is\_​article\_​search\_​query**

  **BOOLEAN**

  Whether a visitor's search was for an article, with values `true` and `false`.

* **is\_​page\_​search\_​query**

  **BOOLEAN**

  Whether a visitor's search was for a store page, with values `true` and `false`.

* **is\_​product\_​search\_​query**

  **BOOLEAN**

  Whether a visitor's search was for a product, with values `true` and `false`.

* **minute**

  **MINUTE\_TIMESTAMP**

  The minute a search happened.

* **month**

  **MONTH\_TIMESTAMP**

  The month a search happened.

* **month\_​of\_​year**

  **MONTH\_OF\_YEAR**

  The month of the year a search happened, with values 1 through 12.

* **quarter**

  **QUARTER\_TIMESTAMP**

  The quarter a search happened.

* **search\_​query**

  **STRING**

  The term or phrase a visitor searched for on your online store.

* **search\_​query\_​intent**

  **STRING**

  What the visitor appeared to be looking for when they searched your online store.

* **search\_​results\_​were\_​returned**

  **BOOLEAN**

  Indicates whether an online store search found matching content, with values `true` and `false`. Filter by [`search_results_were_returned`](#searchesdimension-propertydetail-searchresultswerereturned) to find searches with no matches.

* **second**

  **SECOND\_TIMESTAMP**

  The second a search happened.

* **shop\_​id**

  **IDENTITY**

  The unique Shopify identifier for your store. Use [`shop_id`](#searchesdimension-propertydetail-shopid) with [`shop_name`](#searchesdimension-propertydetail-shopname) to show readable store labels.

* **week**

  **WEEK\_TIMESTAMP**

  The week a search happened.

* **week\_​of\_​year**

  **WEEK\_OF\_YEAR**

  The week of the year a search happened, with values 1 through 53.

* **year**

  **YEAR\_TIMESTAMP**

  The year a search happened.

* **shop\_​name**

  **STRING**

  Name of your store

### DAY\_TIMESTAMP

Date with the time of day removed

```ts
```

### DAY\_OF\_WEEK

Day of the week, used to group or filter data by weekday

```ts
```

### HOUR\_TIMESTAMP

Date and time with minutes and seconds removed

```ts
```

### HOUR\_OF\_DAY

Hour of the day, shown as a whole number from 0 to 23

```ts
```

### BOOLEAN

Value that is either true or false

```ts
```

### MINUTE\_TIMESTAMP

Date and time with seconds removed

```ts
```

### MONTH\_TIMESTAMP

Date for the start of a month

```ts
```

### MONTH\_OF\_YEAR

Month number within a year

```ts
```

### QUARTER\_TIMESTAMP

Date for the start of a fiscal quarter

```ts
```

### STRING

Text made of letters, numbers, or symbols

```ts
```

### SECOND\_TIMESTAMP

Date and time with fractions of a second removed

```ts
```

### IDENTITY

Unique identifier for a Shopify resource such as a customer or order

```ts
```

### WEEK\_TIMESTAMP

Date for the start of a week

```ts
```

### WEEK\_OF\_YEAR

Week number within a year

```ts
```

### YEAR\_TIMESTAMP

Date for the start of a year

```ts
```

***

## Related schemas

* [`search_queries`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/search_queries): Query-level click outcomes for which searches lead to clicks.
* [`search_conversions`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/search_conversions): Search-driven funnel volume for tracking searches downstream to checkout.
* [`sessions`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/sessions): Storewide session data for a denominator beyond search-driven traffic.

***
