---
title: "SearchAfter API (V3) examples"
slug: "searchafter-api--v3--examples"
abstract: "Examples showing how to use the SearchAfter API to filter entities."
---
# SearchAfter API (V3) examples

The following [`SearchAfter` request](https://doc.sitecore.com/ch/en/developers/cloud-dev/searchafter-api--v3-.html "SearchAfter API (V3)") examples illustrate how to use the SearchAfter API with query filters.

## M.Asset query

This request returns entities that match the definition name.

```csharp
// by definition name
// returns entities that match the definition
var filter = QueryFilterBuilder.Definition.Name == "M.Asset"

var searchAfterQuery = new SearchAfterQuery(
  filter,
  new List<Sorting>{new() { Field = "created_on", Order = QuerySortOrder.Desc }})
  {
    Take = Take,
    LoadConfiguration = new EntityLoadConfiguration
    {
      CultureLoadOption =  new CultureLoadOption(new CultureInfo("en-us")),
      PropertyLoadOption = PropertyLoadOption.All,
      RelationLoadOption = RelationLoadOption.All
    }
  };

IEntitySearchAfterResult result = await _client.Querying.SearchAfterAsync(searchAfterQuery);

```

## Full-text query

This request returns entities that match the exact text.

```

// full-text filter
// returns entities that match the text
var filter = QueryFilterBuilder.FullText == "A description";

```

## Entity query

This request returns entities that match the definition.

```

// definition id filter
// returns entities that match the definition
var filter = QueryFilterBuilder.Definition.Id == 40;

```

## Entity query returning entities that match the definition and title

This request returns entities that match the definition and the title.

```

// logic filter
// returns entities that match the definition AND the title
var filter = QueryFilterBuilder.Definition.Name == "M.Asset" &amp;&amp; QueryFilterBuilder.String("Title") == "Brilliant";

```

## Entity query returning entities that match the definition and a specific relation

This request returns entities that match the definition and have a specific parent for a relation.

```

// logic filter
// returns entities that match the definition AND have a specific parent for a specific relation
var filter = QueryFilterBuilder.Definition.Name == "M.Setting" &&
                QueryFilterBuilder.Parent("SettingCategoryToSettings").Id == 344;

```

## Entity query returning entities created by a specific user

This request returns entities created by a specific user.

```

// created by filter
// returns entities that were created by a specific user
var filter = QueryFilterBuilder.CreatedBy == 6;

```

## Entity query returning those not root taxonomies

This request returns entities that are not root taxonomy items.

```

// negating filter
// returns entities that ARE NOT `is_root_taxonomy_item`
var filter = !QueryFilterBuilder.IsRootTaxonomyItem;

```