---
title: "Retrieve guests (legacy)"
slug: "retrieve-guests--legacy-"
abstract: "Describes how to retrieve guests using the Sitecore CDP Guest REST API."
---
# Retrieve guests (legacy)

> [!important]
> [A newer version of this REST API (v2.1) is available](https://api-docs.sitecore.com/cdp/guest-rest-api). If you're new to this REST API, use the new version. Alternatively, if you're already using the old version, [read about the differences between v2 and v2.1](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/legacy-rest-apis/guest-rest-api-v2--legacy-/differences-between-v2-and-v2-1-of-the-guest-and-guest-data-extension-rest-apis.html "Differences between v2 and v2.1 of the Guest and Guest data extension REST APIs") so you can upgrade.

`GET /v2/guests`

Retrieves guests using their email address or other identifying information.

In the response, in `items.href`, the guest reference is the string that follows the final slash:

`"href": "<baseURL>/v2/guests/<guestRef>"`

You use the guest reference to interact with the full guest record, for example, to [retrieve](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/legacy-rest-apis/guest-rest-api-v2--legacy-/retrieve-a-guest--legacy-.html "Retrieve a guest (legacy)") or [update](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/legacy-rest-apis/guest-rest-api-v2--legacy-/update-a-guest--legacy-.html "Update a guest (legacy)") it.

You can also use the guest reference to find data about the guest in Sitecore CDP. In Sitecore CDP, click **Guests**. In the **Search** field, enter the guest reference. Then, Sitecore CDP lists the guest profile for the guest.

Retrieve guests by email:

```curl
curl -X GET '<baseURL>/v2/guests?email=jane.doe@myretailsite.com' \
-u '<username>:<password>' \
-H 'Accept: application/json'

```

```json
{
  "href": "<baseURL>/v2/guests?offset=0&limit=10&email=jane.doe@myretailsite.com",
  "offset": 0,
  "limit": 10,
  "items": [
      {
          "href": "<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03"
      }
  ]
}

```

Retrieve guests by identifiers:

```curl
curl -X GET '<baseURL>/v2/guests?identifiers.provider=BXLP&identifiers.id=123456' \
-u '<username>:<password>' \
-H 'Accept: application/json'

```

```json
{
  "href": "<baseURL>/v2/guests?offset=0&limit=10&identifiers.provider=BXLP&identifiers.id=123456",
  "offset": 0,
  "limit": 10,
  "items": [
      {
          "href": "<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03"
      }
  ]
}

```

## Customize the request

You can [search](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/using-a-collection-resource/searching-in-a-collection.html "Searching in a collection") the collection using the following query parameters:

- `firstName`
- `lastName`
- `email`
- `email.untouched`
- `phoneNumber`
- `identifiers.provider` plus `identifiers.id`
- `identityStatus`

You can [paginate](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/using-a-collection-resource/paginating-responses.html "Paginating responses") and [expand](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/legacy-rest-apis/guest-rest-api-v2--legacy-/using-link-expansion.html#UUID-bf349a03-cc74-2d12-279f-e129801d2ba2_section-idm4601636275073633411512380411 "Expanding resources") the returned resources using the following query parameters:

- `offset`
- `limit`
- `expand`