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

# .list()

> Fetch multiple products

```javascript theme={null}
openbridge.products.list()
openbridge.products.list().limit(20).select(['title', 'handle'])
openbridge.products.list().collection('sale').limit(10)
```

Fetches a list of products. Supports chaining methods to configure the query.

## Chainable Methods

| Method                | Description                              |
| --------------------- | ---------------------------------------- |
| `.limit(count)`       | Limit number of results (default: 250)   |
| `.after(cursor)`      | Fetch results after cursor (pagination)  |
| `.before(cursor)`     | Fetch results before cursor (pagination) |
| `.search(query)`      | Filter by search query                   |
| `.collection(handle)` | Filter by collection handle or GID       |
| `.select(fields)`     | Limit returned fields                    |

## Returns

[`ProductsResult`](/api/types/products#productsresult)

```typescript theme={null}
{
  items: ShopifyProduct[]
  pageInfo: ShopifyPageInfo
}
```

## Examples

### Basic

```javascript theme={null}
const { items, pageInfo } = await openbridge.products.list()
```

### With limit

```javascript theme={null}
const { items } = await openbridge.products
    .list()
    .limit(20)
```

### With field selection

```javascript theme={null}
const { items } = await openbridge.products
    .list()
    .limit(20)
    .select(['title', 'handle', 'priceRange'])
```

### From collection

```javascript theme={null}
const { items } = await openbridge.products
    .list()
    .collection('new-arrivals')
    .limit(8)
```

### With search

```javascript theme={null}
const { items } = await openbridge.products
    .list()
    .search('blue shirt')
    .limit(10)
```

### Full chain

```javascript theme={null}
const { items, pageInfo } = await openbridge.products
    .list()
    .collection('sale')
    .limit(12)
    .select([
        'title',
        'handle',
        'priceRange',
        'featuredImage',
        'availableForSale'
    ])
```

### Pagination

```javascript theme={null}
const page1 = await openbridge.products.list().limit(10)

if (page1.pageInfo.hasNextPage && page1.pageInfo.endCursor) {
    const page2 = await openbridge.products
        .list()
        .limit(10)
        .after(page1.pageInfo.endCursor)
}
```
