# 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="https://871955768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhizHIFUJAg8dDa2gWQUt%2Fuploads%2F15snZ3AUb24MUTdtdCZI%2Ffrontstore_en_sold_out.png?alt=media&#x26;token=11f2a6a6-ec26-4d29-86a5-ff56d579a621" alt=""><figcaption></figcaption></figure>

&#x20;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &#x20;
