---
title: "Count duplicated rows"
method: POST
path: "/datasets/{handle}/deduplicate-rows-count"
tags: ["data_cleanup"]
---

# Count duplicated rows

`POST /datasets/{handle}/deduplicate-rows-count`

Counts how many duplicates will be removed and how many rows remain when deduplicating

## Path parameters

- `handle` string, required

## Request body

- DeduplicateDeduplicateRowsRequest
  - `FilterModel` object — Filter model to use when deduplicating. Only rows matching this filter will be deduplicated. All other rows will remain.
  - `columns` string[] — List of column ids used for deduplication. Deduplication is performed based on unique tuples of values from the given columns.
  - `sortModel` StructsSortEntry[] — Sorts to use when deduplicating. If not provided, default sheet row order will be used.
    - `colId` string
    - `pivotFieldGroupId` string — if pivot mode is enabled it can be sorted by pivot field group id (the column headers in pivot mode)
    - `sort` string

## Response `200`

OK

- DeduplicateDeduplicateRowsCountRespone
  - `Message` string
  - `Success` boolean
  - `deletedRowsCount` integer
  - `remainingRowsCount` integer

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/freshdesk/apis/gigasheet-api.md) · [All operations](https://skmtc.net/freshdesk/apis/gigasheet-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/freshdesk/gigasheet-api/revisions/d1e5cbb24557/schema)
