---
title: "SearchAfter API (V2) examples"
slug: "searchafter-api--v2--examples"
abstract: "Examples showing how to use the SearchAfter API to query M.Asset, to perform a full-text query, and to query for entities that are not root taxonomies."
---
# SearchAfter API (V2) examples

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

## M.Asset query

The following request searches `M.Asset` and examines the `Title` property for the `DoesNotEqual` value `A_text`. The results are sorted by the date created in descending order. All properties and relations are in the default culture.

```csharp
{
    "filter": {
        "left": {
            "name": "M.Asset",
            "type": "DefinitionName"
        },
        "right": {
            "value": "A text",
            "operator": "DoesNotEqual",
            "property_name": "Title",
            "type": "StringProperty"
        },
        "operator": "And",
        "type": "Logical"
    },
    "take": 25,
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ],
    "load_configuration": {
        "load_entities": true,
        "culture_option": {
            "load_option": "None"
        },
        "property_option": {
            "load_option": "all"
        },
        "relation_option": {
            "load_option": "all"
        }
    }

```

## Full-text query

The following request is a full-text query where the results are sorted by the date created in descending order and only the title property is displayed in the default culture.

```csharp
{
    "filter": {
        {
            "value": "something awesome",
            "type": "FullText"
        }
    },
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ],
    "load_configuration": {
        "culture_option": {
            "load_option": "None"
        },
        "property_option": {
            "load_option": "Custom",
            "properties": ["Title"]
        },
        "relation_option": {
            "load_option": "None"
        }
    }
}

```

## Entity query

This request filters entities that were created after 2024-03-04. The results are sorted by the date created in descending order.

```csharp
{
    "filter": {
        {
            "value": "2024-03-04",
            "operator": "LessThanOrEquals",
            "property_name": "createdon",
            "culture": "en-us",
            "type": "DateTimeProperty"
        }
    },
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ]
}

```

## Entity query returning those not root taxonomies

This request returns entities that are not root taxonomies.

```csharp
{
    "filter": {
        {
            "type": "Negating",
            "query":
            {
               "type": "RootTaxonomyItem",
            }
        }
    },
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ]
}

```