> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Clarify: Get Resources

> Search and filter Clarify CRM people, companies, deals and custom object records with pagination and related resources. Clarify Get Resources reference.

Search and filter Clarify CRM people, companies, deals and custom object records with pagination and related resources.

> [!NOTE]
>
> Tool ID: `clarify_get_resources`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'clarify_get_resources',
  {
    "workspace": "example",
    "object": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run clarify_get_resources --input '{
  "workspace": "example",
  "object": "example"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {
        "type": "example",
        "id": "id_123",
        "attributes": {}
      }
    ],
    "included": [
      {
        "type": "example",
        "id": "id_123",
        "attributes": {}
      }
    ],
    "meta": {
      "total_records": 123
    }
  }
}
```

Use `deepline describe clarify_get_resources --json` for the latest machine-readable contract.

## Input reference

Returns a paginated JSON:API collection of an object’s resources. Use `include` to embed related resources and `filter` to narrow results by field — a bare value is an exact match, including on collection fields (`filter[email_addresses]=jane@acme.com`). shorthand operators are parsed from the value (`filter[status]=active,pending`, `filter[amount]=&gt;100`, `filter[name]=*Smith*`, `filter[assigned]=null`), or name them explicitly (`filter[start][Is on or after]=2025-01-01`, `filter[domains][Contains]=acme`). To filter on a relationship field, include that relationship: `filter[author.name]=John&include=author`.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.workspace` | `string` | Yes | — | The workspace slug — the `&#123;slug&#125;` segment of your Clarify workspace URL. |
| `payload.object` | `string` | Yes | — | The object type: a built-in entity (`person`, `company`, `deal`, …) or a custom object (`c_*`). |
| `payload.page` | `object` | No | `&#123;"offset":0,"limit":500&#125;` | Offset pagination, e.g. `page[offset]=0&page[limit]=100`. |
| `payload.sortOrder` | `object` | No | — | Sort order, e.g. `sortOrder[column]=_created_at&sortOrder[dir]=DESC`. |
| `payload.include` | `string` | No | — | Comma-separated relationship names to embed under `relationships` and return in `included`, e.g. `include=company,deals`. |
| `payload.filter` | `record` | No | — | Nested filter object keyed by field name, e.g. `filter[status]=active` or `filter[amount][Greater than]=100`. See the endpoint description for the full operator syntax. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns a paginated JSON:API collection of an object’s resources. Use `include` to embed related resources and `filter` to narrow results by field — a bare value is an exact match, including on collection fields (`filter[email_addresses]=jane@acme.com`); shorthand operators are parsed from the value (`filter[status]=active,pending`, `filter[amount]=>100`, `filter[name]=*Smith*`, `filter[assigned]=null`), or name them explicitly (`filter[start][Is on or after]=2025-01-01`, `filter[domains][Contains]=acme`). To filter on a relationship field, include that relationship: `filter[author.name]=John&include=author`.",
    "properties": {
      "workspace": {
        "type": "string",
        "description": "The workspace slug — the `{slug}` segment of your Clarify workspace URL."
      },
      "object": {
        "type": "string",
        "description": "The object type: a built-in entity (`person`, `company`, `deal`, …) or a custom object (`c_*`)."
      },
      "page": {
        "type": "object",
        "description": "Offset pagination, e.g. `page[offset]=0&page[limit]=100`.",
        "default": {
          "offset": 0,
          "limit": 500
        },
        "properties": {
          "offset": {
            "type": "number",
            "description": "The number of records to skip before the first result.",
            "default": 0,
            "minimum": 0
          },
          "limit": {
            "type": "number",
            "description": "The maximum number of records to return per page (up to 500).",
            "default": 500,
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "sortOrder": {
        "type": "object",
        "description": "Sort order, e.g. `sortOrder[column]=_created_at&sortOrder[dir]=DESC`.",
        "properties": {
          "column": {
            "type": "string",
            "description": "The field name to sort by.",
            "minLength": 1
          },
          "dir": {
            "type": "string",
            "description": "The sort direction.",
            "enum": [
              "ASC",
              "DESC"
            ]
          }
        },
        "required": [
          "column",
          "dir"
        ],
        "additionalProperties": false
      },
      "include": {
        "type": "string",
        "description": "Comma-separated relationship names to embed under `relationships` and return in `included`, e.g. `include=company,deals`."
      },
      "filter": {
        "type": "object",
        "description": "Nested filter object keyed by field name, e.g. `filter[status]=active` or `filter[amount][Greater than]=100`. See the endpoint description for the full operator syntax.",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          ]
        }
      }
    },
    "required": [
      "workspace",
      "object"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `array` | Yes | — | The page of resources. |
| `result.data.data[].type` | `string` | Yes | — | The resource type, e.g. `person` or `deal`. |
| `result.data.data[].id` | `string` | Yes | — | The unique ID of the resource. |
| `result.data.data[].attributes` | `record` | Yes | — | Field values keyed by field name. available fields depend on the object’s schema. |
| `result.data.data[].relationships` | `record` | No | — | Related resources keyed by relationship name, present when requested via `include`. |
| `result.data.included` | `array` | Yes | — | Related resources requested via `include`. |
| `result.data.included[].type` | `string` | Yes | — | The resource type, e.g. `person` or `deal`. |
| `result.data.included[].id` | `string` | Yes | — | The unique ID of the resource. |
| `result.data.included[].attributes` | `record` | Yes | — | Field values keyed by field name. available fields depend on the object’s schema. |
| `result.data.included[].relationships` | `record` | No | — | Related resources keyed by relationship name, present when requested via `include`. |
| `result.data.meta` | `object` | Yes | — | Response metadata. |
| `result.data.meta.total_records` | `number` | No | — | Total number of records across all pages. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "description": "The page of resources.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "The resource type, e.g. `person` or `deal`."
                },
                "id": {
                  "type": "string",
                  "description": "The unique ID of the resource."
                },
                "attributes": {
                  "type": "object",
                  "description": "Field values keyed by field name; available fields depend on the object’s schema.",
                  "additionalProperties": {}
                },
                "relationships": {
                  "type": "object",
                  "description": "Related resources keyed by relationship name, present when requested via `include`.",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "description": "A single resource reference, an array of references, or `null` when the relationship is empty.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "The type of the referenced resource."
                              },
                              "id": {
                                "type": "string",
                                "description": "The unique ID of the referenced resource."
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "The type of the referenced resource."
                                },
                                "id": {
                                  "type": "string",
                                  "description": "The unique ID of the referenced resource."
                                }
                              },
                              "required": [
                                "type",
                                "id"
                              ],
                              "additionalProperties": false
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "meta": {
                        "type": "object",
                        "description": "Metadata about the relationship.",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "description": "Total number of related records for a to-many relationship, independent of the number embedded in `data` (which is capped).",
                            "minimum": 0
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "data"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "type",
                "id",
                "attributes"
              ],
              "additionalProperties": false
            }
          },
          "included": {
            "type": "array",
            "description": "Related resources requested via `include`.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "The resource type, e.g. `person` or `deal`."
                },
                "id": {
                  "type": "string",
                  "description": "The unique ID of the resource."
                },
                "attributes": {
                  "type": "object",
                  "description": "Field values keyed by field name; available fields depend on the object’s schema.",
                  "additionalProperties": {}
                },
                "relationships": {
                  "type": "object",
                  "description": "Related resources keyed by relationship name, present when requested via `include`.",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "description": "A single resource reference, an array of references, or `null` when the relationship is empty.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "The type of the referenced resource."
                              },
                              "id": {
                                "type": "string",
                                "description": "The unique ID of the referenced resource."
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "The type of the referenced resource."
                                },
                                "id": {
                                  "type": "string",
                                  "description": "The unique ID of the referenced resource."
                                }
                              },
                              "required": [
                                "type",
                                "id"
                              ],
                              "additionalProperties": false
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "meta": {
                        "type": "object",
                        "description": "Metadata about the relationship.",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "description": "Total number of related records for a to-many relationship, independent of the number embedded in `data` (which is capped).",
                            "minimum": 0
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "data"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "type",
                "id",
                "attributes"
              ],
              "additionalProperties": false
            }
          },
          "meta": {
            "type": "object",
            "description": "Response metadata.",
            "properties": {
              "total_records": {
                "type": "number",
                "description": "Total number of records across all pages."
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "included",
          "meta"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.