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

# Search Products

> Search for products by keyword

# Search Products

There is no dedicated `/search/products.json` endpoint with faceted
aggregations. Product search is available in two real forms, depending on
whether you are building a storefront experience or calling the OAuth App
API.

## Option 1 — Storefront predictive search

`GET /search/suggest.json` runs against your store's storefront origin (no
OAuth token required) and returns Shopify-style predictive-search results
across products, collections, articles and pages.

```bash theme={null}
curl -X GET "https://your-store.launchmystore.io/search/suggest.json?q=t-shirt&resources[type]=product&resources[limit]=10"
```

### Parameters

<ParamField query="q" type="string" required>
  Search query string. (Alias: `query`.)
</ParamField>

<ParamField query="resources[type]" type="string" default="product,collection,article,page">
  Comma-separated resource types to search. Allowed values: `product`,
  `collection`, `article`, `page`. (Alias: `type`.)
</ParamField>

<ParamField query="resources[limit]" type="integer" default="10">
  Maximum results per resource type (capped at 50). (Alias: `limit`.)
</ParamField>

### Example Response

The response matches the Shopify predictive-search shape: a `resources.results`
object keyed by resource type. There are no `filters`/facet aggregations.

```json theme={null}
{
  "resources": {
    "results": {
      "products": [
        {
          "id": "prod_abc123",
          "title": "Classic Cotton T-Shirt",
          "handle": "classic-cotton-t-shirt",
          "description": "A comfortable everyday t-shirt...",
          "published_at": "2024-01-15T10:00:00Z",
          "vendor": "MyBrand",
          "product_type": "Apparel",
          "tags": ["cotton", "casual", "summer"],
          "price": "25.00",
          "price_min": "25.00",
          "price_max": "25.00",
          "available": true,
          "image": "https://cdn.launchmystore.io/images/tshirt-1.jpg",
          "featured_image": "https://cdn.launchmystore.io/images/tshirt-1.jpg",
          "url": "/products/classic-cotton-t-shirt"
        }
      ],
      "collections": [],
      "articles": [],
      "pages": []
    }
  }
}
```

## Option 2 — App API product listing with title filter

The OAuth App API does not expose a search route. Instead, use
`GET /api/v1/products.json` with the `title` query parameter, which performs a
case-insensitive substring match on the product name. This requires the
`read_products` scope.

```bash theme={null}
curl -X GET "https://api.launchmystore.io/api/v1/products.json?title=t-shirt&page=1&limit=50" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

### Parameters

<ParamField query="title" type="string">
  Case-insensitive substring match on the product name.
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number for pagination.
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of results per page.
</ParamField>

<ParamField query="status" type="string">
  Filter by product status.
</ParamField>

<ParamField query="handle" type="string">
  Filter by exact handle.
</ParamField>

<ParamField query="ids" type="string">
  Filter by a comma-separated list of product IDs.
</ParamField>

<Note>
  There are no `sort`, `vendor`, `product_type`, `tag`, `collection_id`,
  `price_min`, `price_max`, `available`, or `fields` filters on this endpoint,
  and no faceted `filters` aggregation block. Unrecognized query parameters are
  ignored.
</Note>

### Example Response

The App API returns the platform response envelope (`status`, `state`,
`message`, `data`). The `data` object carries the matching products plus paging
counters. See [List Products](/api-reference/products/list) for the full field
list.

```json theme={null}
{
  "status": 200,
  "state": "success",
  "message": null,
  "data": {
    "products": [
      {
        "id": "prod_abc123",
        "name": "Classic Cotton T-Shirt",
        "handle": "classic-cotton-t-shirt",
        "status": "active",
        "variants": []
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 50
  },
  "count": null,
  "pagination": null
}
```
