---
title: "Generic properties"
slug: "generic-properties"
abstract: "How to query entities using generic properties."
---
# Generic properties

You can query entities by generic properties of known datatypes.

To do this, use the following construct:

```text
DATATYPE('PropertyName') OPERATOR PropertyValue

```

## String

For instance, to query all entities with a certain `Title`:

```http
GET http://<HOSTNAME>/api/entities/query?query=String('Title')=='title'

```

You can also search for an empty string:

```text
/api/entities/query?query=String('Title')==""

```

This can be used for [multi-language queries](https://doc.sitecore.com/ch/en/developers/cloud-dev/generic-properties.html#UUID-0ec7bf8d-2abf-7256-dbbb-0d7cd57459a2_N1727789514167 "Multilanguage properties") as well:

```text
/api/entities/query?query=String('Title', 'en-US')==""

```

> [!note]
> Property values initially have a *null* value. It is only when a value is added and then removed that it becomes an empty string.

## Integer

For instance, to query all entities with a certain `IntProperty`:

```http
GET http://<HOSTNAME>/api/entities/query?query=Int('IntProperty')==1

```

## Long

For instance, to query all entities with a certain `LongProperty`:

```http
GET http://<HOSTNAME>/api/entities/query?query=Long('LongProperty')==5000000000

```

## Decimal

For instance, to query all entities with a certain `DecimalProperty`:

```http
GET http://<HOSTNAME>/api/entities/query?query=Decimal('DecimalProperty')==1.5

```

## Float

For instance, to query all entities with a certain `FloatProperty`:

```http
GET http://<HOSTNAME>/api/entities/query?query=Float('FloatProperty')==1.5

```

## DateTime

For instance, to query all entities created after a certain date:

```http
GET http://<HOSTNAME>/api/entities/query?query=DateTime('CreatedOn') gte 20141213

```

The *DateTime* representation follows the international standard ISO8601 covering the exchange of date and time-related data.

There are two formats available via the REST API itself: *YYYYMMDD* and *YYYYMMDDTHHMMSS*.

The following formats are available via the Querying API:

## Basic formats

- *yyyyMMdd*
- *yyyyMMddTHHmmsszzz*
- *yyyyMMddTHHmmsszz*
- *yyyyMMddTHHmmssZ*
- *yyyyMMddTHHmmss*
- *yyyy-MM-ddTHHmmss*

## Extended formats

- *yyyy-MM-ddTHH:mm:sszzz*
- *yyyy-MM-ddTHH:mm:sszz*
- *yyyy-MM-ddTHH:mm:ssZ*

## All of the above with reduced accuracy

- *yyyyMMddTHHmmzzz*
- *yyyyMMddTHHmmzz*
- *yyyyMMddTHHmmZ*
- *yyyy-MM-ddTHH:mmzzz*
- *yyyy-MM-ddTHH:mmzz*
- *yyyy-MM-ddTHH:mmZ*

## Accuracy reduced to hours

- *yyyyMMddTHHzzz*
- *yyyyMMddTHHzz*
- *yyyyMMddTHHZ*
- *yyyy-MM-ddTHHzzz*
- *yyyy-MM-ddTHHzz*
- *yyyy-MM-ddTHHZ*

## Boolean

Booleans do not support any operators, but can be negated.

For instance, to query all draft entities:

```http
GET http://<hostname>/api/entities/query?query=Bool('IsDraft')

```

## Multilanguage properties

To use multilanguage properties when querying entities, specify the culture to filter on.

For instance, to fetch all the `M.Brand` entities with the *fruitful* `Brandlabel`, in *en-US*:

```http
GET http://<HOSTNAME>/api/entities/query?query=Definition.Name == "M.Brand" AND String("BrandLabel", "en-US") == "Fruitful"

```