---
title: "TermQuery"
description: "TermQuery"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/dot-net/reference/termquery"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-06"
---

# TermQuery

## TermQuery

The TermQuery class provides a fluent builder for querying published terms within a taxonomy from the CDA.

**Note:** There's no public constructor. Obtain a TermQuery only through stack.Taxonomies(uid).Terms(), which already guarantees a valid taxonomy UID.

## SetLocale

The SetLocale method filters the terms returned by Find to those published in the specified locale. Passing a null or empty value is treated as a no-op.

```
ValidationNo exception is thrown for a null or empty locale. It's treated as a no-op.
BehaviorClient-side only. Sets a pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var result = await stack.Taxonomies("taxonomy_uid").Terms().SetLocale("hi-in").Find<MyTerm>();
```

Locale code to filter by (for example, "hi-in" or "en-us")

## IncludeFallback

The IncludeFallback method returns terms in the master locale for any term not published in the requested locale. It can be used with or without SetLocale.

```
ValidationTakes no parameters, so there's nothing to validate.
BehaviorClient-side only. Unconditionally sets include_fallback=true as a pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var result = await stack.Taxonomies("taxonomy_uid").Terms().SetLocale("hi-in").IncludeFallback().Find<MyTerm>();
```

## AddParam

The AddParam method adds a custom query parameter to the terms request. Chain this method before calling Find.

```
ValidationNo SDK-level null check is performed on key or value.
BehaviorClient-side only. Sets an arbitrary pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var result = await stack.Taxonomies("taxonomy_uid").Terms().AddParam("include_branch", "true").Find<MyTerm>();
```

Query parameter key

Query parameter value

## Depth

The Depth method limits the depth of the term hierarchy returned by Find. Depth(1) returns only root-level terms, higher values include deeper levels. Chain this method before calling Find.

```
ValidationNo SDK-level validation is performed on depth.
BehaviorClient-side only. Sets a pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var result = await stack.Taxonomies("taxonomy_uid").Terms().Depth(1).Find<MyTerm>();
```

Maximum number of hierarchy levels to include

## IncludeBranch

The IncludeBranch method includes branch information in the response for each term. Chain this method before calling Find.

```
ValidationTakes no parameters, so there's nothing to validate.
BehaviorClient-side only. Unconditionally sets include_branch=true as a pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var result = await stack.Taxonomies("taxonomy_uid").Terms().IncludeBranch().Find<MyTerm>();
```

## Skip

The Skip method sets the number of terms to skip in the result set, for pagination offset. Chain this method before calling Find.

```
ValidationNo SDK-level validation is performed on skip.
BehaviorClient-side only. Sets a pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var page2 = await stack.Taxonomies("taxonomy_uid").Terms().Skip(10).Limit(10).Find<MyTerm>();
```

Number of terms to skip. Must be greater than or equal to 0

## Limit

The Limit method sets the maximum number of terms to return. Chain this method before calling Find.

```
ValidationNo SDK-level validation is performed on limit.
BehaviorClient-side only. Sets a pending query parameter. No HTTP call is made until Find is called.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var terms = await stack.Taxonomies("taxonomy_uid").Terms().Limit(5).Find<MyTerm>();
```

Maximum result count

## IncludeCount

The IncludeCount method includes the total count of matching terms in the response. Chain this method before calling Find.

```
ValidationTakes no parameters, so there's nothing to validate.
BehaviorClient-side only. Unconditionally sets include_count=true as a pending query parameter. No HTTP call is made until Find is called. Access the count through the returned collection's Count property.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
var result = await stack.Taxonomies("taxonomy_uid").Terms().IncludeCount().Find<MyTerm>();
```

## Find

The Find method executes the term query and returns all matching published terms for the taxonomy.

```
ValidationNo additional validation is performed. The taxonomy UID was already guaranteed non-empty when this TermQuery was constructed through Taxonomy.Terms(). See Delivery API Errors for general request errors.
BehaviorMakes one HTTP GET request to /taxonomies/&#123;uid&#125;/terms. The response is unwrapped at the $.terms JSON token into the returned collection's Items.
ExampleContentstackClient stack = new ContentstackClient("api_key", "delivery_token", "environment");
ContentstackCollection<MyTerm> terms = await stack.Taxonomies("taxonomy_uid").Terms().SetLocale("hi-in").IncludeFallback().Find<MyTerm>();
```

## TermQuery | .NET Delivery SDK | Contentstack

TermQuery provides a fluent builder for querying published terms within a taxonomy in the .NET Delivery SDK.