> For the complete documentation index, see [llms.txt](https://wiki.theshop.dev/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.theshop.dev/docs/frontstore/api-client-for-laravel/example-find-products-by-keyword-and-include-sold-out-products-with-available-attributes-to-filter.md).

# Example: Find products by keyword and include sold out products with available attributes to filter

Via [TheShop Frontstore API v2](https://demo.theshop.dev/api-documentation/v2), you can search for products by a keyword and include sold out products and available attributes for filtering in the response.

{% hint style="info" %}
This package is open for partners. We are accepting pull requests for additions, edits, and/or improvements.

Each contributor will be set as a maintainer.
{% endhint %}

### API client usage

Navigate to [TheShop Frontstore API v2](https://demo.theshop.dev/api-documentation/v2#/products/43f03067f8de98b085489a6215514797).

### API docs

```php
use Theshop\ApiClient\Connector;
use Theshop\ApiClient\Requests\Products\ProductListRequest;

public function search(Connector $connector)
{
    $products = $connector->send(new ProductListRequest(
        showSoldOut: true,
        flags: ['available_attributes'],
        keyword: 'example'
    ))->data['items'];   
}
```

### Frontstore

<figure><img src="/files/V25tyACSMsZM6k8JOQoG" alt=""><figcaption></figcaption></figure>

&#x20;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &#x20;
