# How to get the raw response from downstream APIs

Add `raw=true` to any Unified API request and Apideck returns the connector's original, unmodified response
in a `_raw` property alongside its normalized data, useful for debugging, reaching fields the normalized
model doesn't expose, and getting the full context of what the downstream API actually returned.

>
> If you're on a Scale plan or higher we recommend using the [custom field
> mappings](/guides/field-mapping) feature to map the raw data to the data model you need.

## What is Raw Mode?

Raw mode returns the connector's original, unmodified response instead of running it through Apideck's
normalization process, which is useful for debugging, for reaching fields the normalized model omits, or
for getting the full context of the underlying API's output.

Raw responses are typically larger and can add latency, so use raw mode primarily for debugging rather than
in production request paths.

## How to Enable Raw Mode

Include `raw=true` as a query parameter on any Unified API request, and Apideck returns the connector's full,
unprocessed response alongside the normalized data. For example:

```
https://unify.apideck.com/crm/leads?raw=true
```

The request to the Unified API will have a `_raw` property in the response body that contains the raw response from the underlying API. If multiple pages of data are returned, the `_raw` property will contain an array of pages with the raw response for each page.

```
{
  "status_code": 200,
  "status": "OK",
  "service": "hubspot",
  "resource": "leads",
  "operation": "all",
  "data": [
    {
      "id": "551",
      "name": "Emilia Earhart",
      "first_name": "Emilia",
      "last_name": "Earhart",
      "updated_at": "2024-04-05T07:51:00.266Z",
      "created_at": "2020-10-02T14:48:17.728Z"
    }
  ],
  "_raw": {
    "pages": [
      {
        "results": [
          {
            "id": "551",
            "properties": {
              "address": "B221, Bakers Street",
              "assigned_csm": "Kristof W.",
              "associatedcompanyid": "4562962674",
              "city": "Antwerp",
              "company": "Apideck",
              "country": "Belgium",
              "createdate": "2020-10-02T14:48:17.728Z",
              "custom_field": "",
              "email": "e.earhart@noemail.com",
              "firstname": "Emilia",
              "hs_object_id": "551
            },
            "createdAt": "2020-10-02T14:48:17.728Z",
            "updatedAt": "2024-04-05T07:51:00.266Z",
            "archived": false
          },
        ],
        "paging": {
          "next": {
            "after": "7202",
            "link": "https://api.hubapi.com/crm/v3/objects/contacts?properties=company%2Cassociatedcompanyid%2Cfirstname%2Clastname%2Cemail%2Cphone%2Cjobtitle%2Cwebsite%2Chubspot_owner_id%2Clifecyclestage%2Ccity%2Ccountry%2Caddress%2Czip%2Cstate%2Cassigned_csm%2Ccustom_field%2Cknown_via%2Ct_shirt_size&limit=20&after=7202"
          }
        },
        "_headers": {},
        "_status": 200,
        "_namedParameters": {
          "raw": "true",
          "properties": "company,associatedcompanyid,firstname,lastname,email,phone,jobtitle,website,hubspot_owner_id,lifecyclestage,city,country,address,zip,state,assigned_csm,custom_field,known_via,t_shirt_size",
          "limit": 20
        }
      }
    ]
  }
}
```

## Access the raw response from the logs

View any past raw response in the [Apideck Dashboard](https://platform.apideck.com/logs) without replaying
the request: open the Unified API request and its child requests show the underlying call to the connector.

![Apideck Logs - Child Requests](/guides/raw-mode/apideck-logs.png)

## Troubleshooting

If raw mode doesn't return the fields you expect, check the connection's OAuth scopes and auth method first:
some connectors restrict which data a token can see independently of what raw mode itself returns.

## How is this different from the Proxy API

Raw mode still calls a Unified API endpoint and adds the connector's raw response alongside the normalized
one; the [Proxy API](/apis/proxy/reference) is for calling a downstream endpoint that has no Unified API
equivalent at all. Use raw mode when you need more than the normalized model returns from an endpoint
Apideck already supports, and the Proxy API when the endpoint itself sits outside the Unified Data Model.
[Read more about using the Proxy here](https://help.apideck.com/en/articles/4230978).
