---
title: "Entry"
description: "Entry"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/javascript-browser/reference/entry"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-20"
---

# Entry

## Entry

An initializer is responsible for creating Entry object.

## language

Sets the language code of which you want to retrieve data.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').language('language_code').toJSON().fetch();
```

language code. e.g. 'en-us', 'ja-jp', etc.

## addParam

Includes query parameters in your queries.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').addParam('include_count', 'true').toJSON().fetch();
```

URL parameter key.

Value corresponding to the parameter.

## addQuery

Adds query to Entry object

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').addQuery('include_content_type', true).toJSON().fetch();
```

Key of the query

Value of the query

## only

Displays values of only the specified fields of entries or assets in the response

```
The only function with field_uid will include the data of only the specified fields for each entry and exclude the data of all other fields.
import Contentstack from 'contentstack'; 
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').only('title').toJSON().fetch();

The only function with an array of field_uids will include multiple fields for each entry and exclude the data of all other fields.
import Contentstack from 'contentstack';
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').only(['title', 'description']).toJSON().fetch();

In only, we have the only with a reference parameter, where you need to enter the UID of the reference field in place of "reference_field_uid", and the second parameter to include the data of only the specified field_uid for each entry and exclude the data of all other fields.
import Contentstack from 'contentstack';
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference('reference_field_uid').only('reference_field_uid','title').toJSON().fetch();

In only, we have the only with a reference parameter with an array, where you need to enter the UID of the reference field in place of "reference_field_uid", and the second parameter with an array of fields to include the data of only the specified array of field_uids for each entry and exclude the data of all other fields.
import Contentstack from 'contentstack';

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference('reference_field_uid').only('reference_field_uid',['title', 'description']).toJSON().fetch();
```

Field UID of content type

## except

Displays all data of an entries or assets excluding the data of the specified fields.

```
The except function with field_uid will exclude the data of only the specified fields for each entry and includes the data of all other fields.
import Contentstack from 'contentstack'; 
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').except('title').toJSON().fetch();

The except function with an array of field_uids will except multiple fields for each entry and include the data of all other fields.
import Contentstack from 'contentstack';
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').except(['title', 'description']).toJSON().fetch();

In except, we have the only with a reference parameter, where you need to enter the UID of the reference field in place of "reference_field_uid", and the second parameter to except the data of only the specified field_uid for each entry and include the data of all other fields.
import Contentstack from 'contentstack';
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference('reference_field_uid').except('reference_field_uid','title').toJSON().fetch();

In except, we have the only with a reference parameter with an array, where you need to enter the UID of the reference field in place of "reference_field_uid", and the second parameter with an array of fields to except the data of only the specified array of field_uids for each entry and include the data of all other fields.
import Contentstack from 'contentstack';

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference('reference_field_uid').except('reference_field_uid',['title', 'description']).toJSON().fetch();
```

Field UID of content type

## includeReference

Fetches the entire content of referenced entry.

```
Include Reference with reference_field_uids as array:
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference(['reference_field_uid','other_reference_field_uid']).toJSON().fetch();
Include Reference with reference_field_uids and its children reference
import Contentstack from 'contentstack';

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference(['reference_field_uid', 'reference_field_uid.child_reference_field_uid']).toJSON().fetch();
Include Reference with reference_field_uid:
import Contentstack from 'contentstack';

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReference('reference_field_uid').toJSON().fetch();
```

Field UID of content type

## includeReferenceContentTypeUID

This method also includes the content type UIDs of the referenced entries returned in the response.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeReferenceContentTypeUID().toJSON().fetch();
```

## includeEmbeddedItems

Include Embedded Objects (Entries and Assets) along with entry/entries details.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeEmbeddedItems().toJSON().fetch();
```

## includeContentType

Include the details of the content type along with the entry/entries details.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeContentType().toJSON().fetch();Your response should look like this:
 [
  [
    {
      "uid": "blt3458ba16457349d2",
      "locale": "en-us",
      "_in_progress": false,
      "created_at": "2024-09-24T21:37:12.148Z",
      "created_by": "bltcd145d6b20c55b33",
      "title": "Test1",
      "updated_at": "2024-11-11T23:56:55.437Z",
      "updated_by": "bltcd145d6b20c55b33",
      "publish_details": {
        "time": "2024-11-11T23:56:59.408Z",
        "user": "bltcd145d6b20c55b33",
        "environment": "blt47ebc22ff5bb18d9",
        "locale": "en-us"
      }
    }
  ],
  {
    "title": "ct1",
    "description": "",
    "schema": [
      {
        "data_type": "text",
        "display_name": "Title",
        "field_metadata": { "_default": true, "version": 3 },
        "mandatory": true,
        "uid": "title",
        "unique": true,
        "multiple": false,
        "non_localizable": false
      }
    ],
    "uid": "ct1",
    "created_at": "2024-09-24T21:23:33.625Z",
    "updated_at": "2024-09-24T21:24:42.841Z",
    "inbuilt_class": false,
    "_version": 2
  }
]
```

## includeBranch

Include the Branch for publish content.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').includeBranch().toJSON().fetch();
```

## includeFallback

Include the fallback locale publish content, if specified locale content is not publish.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
Stack.ContentType('content_type_uid;).Entry('entry_uid').includeFallback().fetch();
```

## fetch

Fetches a particular entry based on the provided entry UID.

```
import Contentstack from 'contentstack'

const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').language('language_code').toJSON().fetch();
```

Fetch options to fetch particular entry

## Variants

Variants are different versions of content designed to meet specific needs or target audiences. This feature allows content editors to create multiple variations of a single entry, each customized for a particular variant group or purpose.

When Personalize creates a variant in the CMS, it assigns a "Variant Alias" to identify that specific variant. When fetching entry variants using the Delivery API, you can pass variant aliases in place of variant UIDs in the x-cs-variant-uid header.

```
Single Variant: This method retrieves the details of a specific entry variant.
Example:
import Contentstack from 'contentstack'
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').variants('variant_uid/variant_alias').toJSON().fetch()
Layering Variants: This method retrieves the details of entry variants based on the applied query
Example:
import Contentstack from 'contentstack'
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').variants(['variant_uid1/variant_alias1','variant_uid2/variant_alias2']).toJSON().fetch()
Note:All methods in the Query section are applicable for variants filtering as well.
Add Query in Variants: This method adds a query to the entry object
Example:
import Contentstack from 'contentstack'
const Stack = Contentstack.Stack({'api_key': 'api_key', 'delivery_token': 'delivery_token', 'environment': 'environment'});
const result = await Stack.ContentType('content_type_uid').Entry('entry_uid').variants('variant_uid/variant_alias').addQuery('include_content_type', true).toJSON().fetch()
```

## Entry

uid of the entry

Uid of the entry

## Entry | JavaScript Browser Delivery SDK | Contentstack

The Entry class in the JavaScript Browser Delivery SDK creates an Entry object so you can fetch and read a single content entry from your Contentstack stack.