> ## 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.

# ClickHouse Cloud: Clickhouse Usage Cost Get

> Get organization usage costs. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Get organization usage costs.

<Info>
  Tool ID: `clickhouse_usage_cost_get`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'clickhouse_usage_cost_get',
  {
    "organizationId": "123e4567-e89b-42d3-a456-426614174000",
    "from_date": "2026-01-15",
    "to_date": "2026-01-15"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute clickhouse_usage_cost_get --input '{
  "organizationId": "123e4567-e89b-42d3-a456-426614174000",
  "from_date": "2026-01-15",
  "to_date": "2026-01-15"
}' --json
```

## Example response

The static output schema is not detailed enough to generate a reliable example. Use `deepline tools get clickhouse_usage_cost_get --json` for the complete live contract.

## Input reference

Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days). All days in both the request and the response are evaluated based on the UTC timezone.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.organizationId` | `string` | Yes | — | ID of the requested organization. Format: `uuid`. |
| `payload.from_date` | `string` | Yes | — | Start date for the report, e.g. 2024-12-19. Format: `date`. |
| `payload.to_date` | `string` | Yes | — | End date (inclusive) for the report, e.g. 2024-12-20. This date cannot be more than 30 days after from\_date (for a maximum queried period of 31 days). Format: `date`. |
| `payload.filter` | `array` | No | — | Filter criteria to apply when retrieving the usage cost report. Currently, only filtering by resource tags is supported. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days). All days in both the request and the response are evaluated based on the UTC timezone.",
    "properties": {
      "organizationId": {
        "type": "string",
        "description": "ID of the requested organization.",
        "format": "uuid"
      },
      "from_date": {
        "type": "string",
        "description": "Start date for the report, e.g. 2024-12-19.",
        "format": "date"
      },
      "to_date": {
        "type": "string",
        "description": "End date (inclusive) for the report, e.g. 2024-12-20. This date cannot be more than 30 days after from_date (for a maximum queried period of 31 days).",
        "format": "date"
      },
      "filter": {
        "type": "array",
        "description": "Filter criteria to apply when retrieving the usage cost report. Currently, only filtering by resource tags is supported.",
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "organizationId",
      "from_date",
      "to_date"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.status` | `number` | No | — | HTTP status code. |
| `result.data.requestId` | `string` | No | — | Unique id assigned to every request. UUIDv4 Format: `uuid`. |
| `result.data.result` | `object` | No | — | — |
| `result.data.result.grandTotalCHC` | `number` | No | — | Grand total cost of usage in ClickHouse Credits (CHCs). |
| `result.data.result.costs` | `array` | No | — | List of daily, per-entity usage cost records. |
| `result.data.result.costs[].dataWarehouseId` | `string` | No | — | ID of the dataWarehouse this entity belongs to (or is). Format: `uuid`. |
| `result.data.result.costs[].serviceId` | `string \| null` | No | — | ID of the service this entity belongs to (or is). Set to null for dataWarehouse entities. Format: `uuid`. |
| `result.data.result.costs[].date` | `string` | No | — | Date of the usage. ISO-8601 date, based on the UTC timezone. Format: `date`. |
| `result.data.result.costs[].entityType` | `"datawarehouse" \| "service" \| "clickpipe"` | No | — | Type of the entity. Allowed: `datawarehouse`, `service`, `clickpipe`. |
| `result.data.result.costs[].entityId` | `string` | No | — | Unique ID of the entity. Format: `uuid`. |
| `result.data.result.costs[].entityName` | `string` | No | — | Name of the entity. |
| `result.data.result.costs[].metrics` | `object` | No | — | — |
| `result.data.result.costs[].metrics.storageCHC` | `number` | No | — | Cost of storage in ClickHouse Credits (CHCs). Applies to dataWarehouse entities. |
| `result.data.result.costs[].metrics.backupCHC` | `number` | No | — | Cost of backup in ClickHouse Credits (CHCs). Applies to dataWarehouse entities. |
| `result.data.result.costs[].metrics.computeCHC` | `number` | No | — | Cost of compute in ClickHouse Credits (CHCs). Applies to service and clickpipe entities. |
| `result.data.result.costs[].metrics.dataTransferCHC` | `number` | No | — | Cost of data transfer in ClickHouse Credits (CHCs). Applies to clickpipe entities. |
| `result.data.result.costs[].metrics.initialLoadCHC` | `number` | No | — | Cost of initial load and resyncs in ClickHouse Credits (CHCs). Applies to clickpipe entities. |
| `result.data.result.costs[].metrics.publicDataTransferCHC` | `number` | No | — | Cost of data transfer in ClickHouse Credits (CHCs). Applies to service entities. |
| `result.data.result.costs[].metrics.interRegionTier1DataTransferCHC` | `number` | No | — | Cost of tier1 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. |
| `result.data.result.costs[].metrics.interRegionTier2DataTransferCHC` | `number` | No | — | Cost of tier2 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. |
| `result.data.result.costs[].metrics.interRegionTier3DataTransferCHC` | `number` | No | — | Cost of tier3 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. |
| `result.data.result.costs[].metrics.interRegionTier4DataTransferCHC` | `number` | No | — | Cost of tier4 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities. |
| `result.data.result.costs[].totalCHC` | `number` | No | — | Total cost of usage in ClickHouse Credits (CHCs) for this entity. |
| `result.data.result.costs[].locked` | `boolean` | No | — | When true, the record is immutable. Unlocked records are subject to change until locked. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "status": {
            "type": "number",
            "description": "HTTP status code."
          },
          "requestId": {
            "type": "string",
            "description": "Unique id assigned to every request. UUIDv4",
            "format": "uuid"
          },
          "result": {
            "properties": {
              "grandTotalCHC": {
                "type": "number",
                "description": "Grand total cost of usage in ClickHouse Credits (CHCs)."
              },
              "costs": {
                "type": "array",
                "description": "List of daily, per-entity usage cost records.",
                "items": {
                  "properties": {
                    "dataWarehouseId": {
                      "type": "string",
                      "description": "ID of the dataWarehouse this entity belongs to (or is).",
                      "format": "uuid"
                    },
                    "serviceId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the service this entity belongs to (or is). Set to null for dataWarehouse entities.",
                      "format": "uuid"
                    },
                    "date": {
                      "type": "string",
                      "description": "Date of the usage. ISO-8601 date, based on the UTC timezone.",
                      "format": "date"
                    },
                    "entityType": {
                      "type": "string",
                      "description": "Type of the entity.",
                      "enum": [
                        "datawarehouse",
                        "service",
                        "clickpipe"
                      ]
                    },
                    "entityId": {
                      "type": "string",
                      "description": "Unique ID of the entity.",
                      "format": "uuid"
                    },
                    "entityName": {
                      "type": "string",
                      "description": "Name of the entity."
                    },
                    "metrics": {
                      "properties": {
                        "storageCHC": {
                          "type": "number",
                          "description": "Cost of storage in ClickHouse Credits (CHCs). Applies to dataWarehouse entities."
                        },
                        "backupCHC": {
                          "type": "number",
                          "description": "Cost of backup in ClickHouse Credits (CHCs). Applies to dataWarehouse entities."
                        },
                        "computeCHC": {
                          "type": "number",
                          "description": "Cost of compute in ClickHouse Credits (CHCs). Applies to service and clickpipe entities."
                        },
                        "dataTransferCHC": {
                          "type": "number",
                          "description": "Cost of data transfer in ClickHouse Credits (CHCs). Applies to clickpipe entities."
                        },
                        "initialLoadCHC": {
                          "type": "number",
                          "description": "Cost of initial load and resyncs in ClickHouse Credits (CHCs). Applies to clickpipe entities."
                        },
                        "publicDataTransferCHC": {
                          "type": "number",
                          "description": "Cost of data transfer in ClickHouse Credits (CHCs). Applies to service entities."
                        },
                        "interRegionTier1DataTransferCHC": {
                          "type": "number",
                          "description": "Cost of tier1 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities."
                        },
                        "interRegionTier2DataTransferCHC": {
                          "type": "number",
                          "description": "Cost of tier2 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities."
                        },
                        "interRegionTier3DataTransferCHC": {
                          "type": "number",
                          "description": "Cost of tier3 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities."
                        },
                        "interRegionTier4DataTransferCHC": {
                          "type": "number",
                          "description": "Cost of tier4 inter-region data transfer in ClickHouse Credits (CHCs). Applies to service entities."
                        }
                      },
                      "additionalProperties": false
                    },
                    "totalCHC": {
                      "type": "number",
                      "description": "Total cost of usage in ClickHouse Credits (CHCs) for this entity."
                    },
                    "locked": {
                      "type": "boolean",
                      "description": "When true, the record is immutable. Unlocked records are subject to change until locked."
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          }
        },
        "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

* [ClickHouse Cloud provider guide](/docs/providers/clickhouse/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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