---
title: "Get the number of rows containing Presidio entities in a dataset."
method: GET
path: "/presidio-entities"
---

# Get the number of rows containing Presidio entities in a dataset.

`GET /presidio-entities`

Based on Presidio, returns the number of rows containing names, emails, phone numbers of sensitive PII. Only a sample of the rows is scanned, the first 10K rows at the moment.

## Query parameters

- `dataset` string, required

## Response `200`

The number of Presidio entities in the dataset.

- PresidioEntitiesCountResponse
  - `scanned_columns` string[], required
  - `num_rows_with_person_entities` integer, required
  - `num_rows_with_phone_number_entities` integer, required
  - `num_rows_with_email_address_entities` integer, required
  - `num_rows_with_sensitive_pii` integer, required
  - `num_scanned_rows` integer, required
  - `has_scanned_columns` boolean, required
  - `full_scan` boolean, nullable

## Other responses

- `401` — If the external authentication step on the Hugging Face Hub failed, and no authentication mechanism has been provided. Retry with authentication.
- `404` — If the repository to download from cannot be found, or if the config or split does not exist in the dataset. Note that this may be because the dataset doesn't exist, or because it is set to `private` and you do not have access.
- `422` — The 'dataset' parameter has not been provided or is invalid.
- `500` — The server crashed, the response still hasn't been generated (the process is asynchronous), or the response couldn't be generated successfully due to an error in the dataset itself. The client can retry after a time, in particular in the case of the response still being processed. If the error does not vanish, it's possibly due to a bug in the API software or in the dataset, and should be reported.
- `501` — The server does not implement the feature or Presidio is not enabled on this dataset.

---

[API](https://skmtc.net/huggingface/apis/dataset-viewer-server-api.md) · [All operations](https://skmtc.net/huggingface/apis/dataset-viewer-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/dataset-viewer-server-api/revisions/5048b8c0f4f9/schema)
