---
schema_version: "1"
id: f40eaeb479b60cf4fe2d2712bce7e7047f898042060a903eb495eee7e2b940a9
title: Retrieve
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_accountRetrieve.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_accountRetrieve.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0f086799893737545b546328338b22d6b7163fbc7583584a04bff6c34cff0cd4
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Retrieve

## Overview

Retrieve an account based on the specified criteria

### Syntax

Retrieve(1)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                                                                                                                           |
| ------- | ------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| **1**   | string | **Required** | Criteria used to search for the account. Use a filter expression or a JSON object containing filter and additional search parameters. |

## Examples

This sample code retrieves an account based on the specified filter criteria:

```
var getAcct = Account.Retrieve({Property:"CustomerKey",SimpleOperator:"equals",Value:"MyAccount"});
```

This sample code queries across all applicable accounts and retrieves an account based on the filter criteria:

```
var query = {};

query.Filter = '{Property:"CustomerKey",SimpleOperator:"equals",Value:"MyAccount"}';
query.QueryAllAccounts = true;

var getAcct = Account.Retrieve(query);
```
