> For the complete documentation index, see [llms.txt](https://docs.comfortable.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.comfortable.io/sdk/php/query-by-type.md).

# Query by Type

```php
<?php
use Comfortable\Filter;

$type = 'news';
$results = $api->getDocuments()
  ->filter(
    (new Filter)
      ->addAnd('contentType', 'equal', $type, 'meta')
    )
    ->execute();
```
