---
title: searches
description: >-
  Reference for the ShopifyQL `searches` table. Every metric and dimension,
  paired with worked example queries.
api_version: 2026-07
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

### Examples

* ####

  ##### 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
  ```

* ####

  ##### 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
  ```

* ####

  ##### 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
  ```

* ####

  ##### 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

A whole number without decimal places, used for counts, quantities, and other discrete numeric values.

```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

A date value truncated to day precision.

```ts
```

### DAY\_OF\_WEEK

A day within a week, used for weekday-based grouping and filtering.

```ts
```

### HOUR\_TIMESTAMP

A timestamp truncated to hour precision.

```ts
```

### HOUR\_OF\_DAY

An hour within a day, typically represented as an integer from 0 to 23.

```ts
```

### BOOLEAN

A true or false value representing binary states.

```ts
```

### MINUTE\_TIMESTAMP

A timestamp truncated to minute precision.

```ts
```

### MONTH\_TIMESTAMP

A date value representing the start of a month.

```ts
```

### MONTH\_OF\_YEAR

A month number within a year.

```ts
```

### QUARTER\_TIMESTAMP

A date value representing the start of a fiscal quarter.

```ts
```

### STRING

A sequence of characters representing text data.

```ts
```

### SECOND\_TIMESTAMP

A timestamp truncated to second precision.

```ts
```

### IDENTITY

A unique identifier for a Shopify resource such as a customer, product, or order.

```ts
```

### WEEK\_TIMESTAMP

A date value representing the start of a week.

```ts
```

### WEEK\_OF\_YEAR

A week number within a year.

```ts
```

### YEAR\_TIMESTAMP

A date value representing 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.

***
