Here we will show you how you can perform queries based on tags
Query by IncludeTags
<?php
// $results will be include all documents with the tag "include" or "me"
$results = $api->getDocuments()
->includeTags(["include", "me"])
->execute();
Query by ExcludeTags
<?php
// $results will exclude all documents with the "exclude me" tag
$results = $api->getDocuments()
->excludeTags(["exclude"])
->execute();
Combine IncludeTags & ExcludeTags
<?php
// $results will hold all documents with the tag "sports",
// except the documents with the "soccer" tag.
$results = $api->getDocuments()
->includeTags(["sports"])
->excludeTags(["soccer"])
->execute();