> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search (similar) dataset

> LayersQL Search (similar) dataset reference for analyzing similar product API requests, source products, click-through rates, and downstream conversions.

* **Label:** Search (Similar)
* **Description:** Similar item search analytics.
* **Default group key:** `product_id`

## Metrics

* **requests (requests)**
  * Number of similar search requests.
  * Example: COUNT\_DISTINCT(requests)
* **results\_count (results)**
  * Results returned per search request.
  * Example: AVG(results\_count)
* **total\_sales (USD)**
  * Sales attributed to similar search.
  * Example: SUM(total\_sales)
* **quantity\_purchased (items)**
  * Number of items purchased from similar search traffic.
  * Example: SUM(quantity\_purchased)
* **view\_sessions (sessions)**
  * Sessions where a product was viewed from similar search results.
* **cart\_sessions (sessions)**
  * Sessions where a product from similar search results was added to cart.
* **quantity\_added\_to\_cart (items)**
  * Items added to cart from similar search results.

## Dimensions

* **product\_id:** Product ID used as the similar search anchor.
* **query\_type:** Type of search query.
* **num\_results:** Number of results returned.
* **shopping\_channel:** The shopping channel (e.g., online\_store).
* **billable:** Whether this request is counted for billing.
* **attribution\_token:** Token used to attribute downstream events/purchases.
* **experiment\_id:** Experiment identifier.
* **experiment\_group:** Experiment group/variant.
* **device:** Device category.
* **os:** Operating system.
* **geo\_country:** Two-letter country code.
* **geo\_state:** Up to three-letter province code.
* **geo\_city:** City name as captured.
* **marketing\_source:** UTM source.
* **marketing\_medium:** UTM medium.
* **marketing\_campaign:** UTM campaign.

## Examples

Similar search requests by product (last 7 days)

```sql theme={null}
FROM search_similar
SHOW COUNT_DISTINCT(requests)
GROUP BY product_id
SINCE -7d
```

Similar search revenue by country (this month)

```sql theme={null}
FROM search_similar
SHOW SUM(total_sales)
GROUP BY geo_country
SINCE this_month
```

## Next steps

* [LayersQL syntax](/platform/layersql/syntax)
* [LayersQL functions](/platform/layersql/functions)
* [Datasets overview](/platform/layersql/datasets)
