# DataVerify – Dataset Quality Auditor (`samirb00/my-actor`) Actor

Audit CSV, JSON, and Apify datasets for missing records, duplicates, empty fields, and schema violations. Measure data completeness, configure quality thresholds, and generate actionable recommendations with downloadable HTML, CSV, and JSON reports.

- **URL**: https://apify.com/samirb00/my-actor.md
- **Developed by:** [samir](https://apify.com/samirb00) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / completed dataset audit

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## DataVerify — Dataset Quality Auditor

**Catch missing records, duplicates, empty fields and schema errors before bad data reaches your workflow.**

DataVerify is a dataset validation and data quality tool for Apify datasets, CSV and JSON. Audit the output of a scraper or data pipeline, review a readable quality report, and use configurable pass/fail checks to decide whether data is ready for the next step.

No coding is required for the input form. DataVerify uses deterministic validation rules, not an LLM, and never edits your source dataset.

### What can DataVerify check?

| Feature | What it helps you detect |
|---|---|
| Record completeness | Shortfalls against an independently supplied expected count or ID list |
| Duplicate detection | Repeated rows and repeated unique identifiers |
| Empty fields | Missing or blank values in your records |
| Schema validation | Missing required fields and incorrect data types |
| Quality gates | Data that falls outside your configured acceptance thresholds |
| Audit reports | Findings, field statistics and recommended next steps |

### Who is it for?

- **Apify users and web scraping teams:** check collection results before exporting or delivering them.
- **Data analysts and e-commerce teams:** validate product, pricing, review and other structured datasets.
- **Automation developers and agencies:** add a repeatable data quality check to client workflows.
- **AI and analytics teams:** identify structural data problems before downstream processing.

### Quick start

1. Open the **Input** tab and choose **Built-in test sample** to try DataVerify with fictional data.
2. For your own data, select **Paste CSV or JSON** or **Existing Apify dataset**. In dataset mode, select a finished dataset you are authorized to read. In paste mode, select the format and paste your records.
3. Expand **Audit rules** to configure optional keys, expected counts, required fields and field types.
4. Expand **Quality gate (optional)** to set acceptance thresholds. Use `-1` to disable an individual check.
5. Start the Actor. Open **Audit overview** for the results and **Visual audit report** for the detailed report.

Fields for other source modes are ignored. The built-in sample uses its own audit rules.

### Example: find missing and duplicate records

Suppose you expect three unique records: A1, A2 and A3, but receive this CSV:

```csv
id,amount
A1,12
A1,12
A3,
```

With `id` as the unique key, the three expected IDs and both fields required, DataVerify reports:

| Metric | Result |
|---|---:|
| Records received | 3 |
| Unique records | 2 |
| Missing expected IDs | 1 (A2) |
| Completeness | 66.67% |
| Exact duplicate rows | 1 |
| Empty cells | 1 |

If you require 100% completeness and zero duplicate rows, the quality gate returns `fail`. The Actor itself can still execute successfully and deliver the audit report.

### Input and audit rules

| Setting | Purpose |
|---|---|
| Unique key field | Detects repeated or invalid keys and matches expected IDs. If omitted, distinct records are counted using exact-row identity. |
| Expected unique record count | An independently known count, not the number already present in the source dataset. Leave blank if unknown. |
| Expected IDs | One ID per line; requires a unique key field. If a count is also specified, it must match the number of IDs. |
| Required fields | One field name per line; values must be nonblank. |
| Field types | One `field:type` per line, for example `amount:number`. Supported types: string, integer, number, boolean, date (YYYY-MM-DD), object, array, any. |
| Advanced configuration | Optional legacy JSON object. Nonblank simplified fields override matching legacy keys. Use `allow_extra:false` to reject unlisted fields. |

For example, enter the required fields on separate lines:

```text
id
amount
```

### What you receive

The output dataset contains one audit summary row. Use **Audit overview**, **Quality metrics**, and **Audit metadata** to see different views of the same result. The legacy nested summary and issue counts remain available in the unfiltered dataset/API output.

For downloadable reports, open the run's **Storage → Key-value store**:

| Report | Contents |
|---|---|
| `report.html` | Self-contained visual report with metrics, thresholds, recommendations, field statistics and up to 200 retained findings |
| `FINDINGS` | CSV of retained detailed findings |
| `OUTPUT` | JSON audit report with retained findings and structured metrics |
| `SUMMARY.txt` | Plain-text summary |

HTML reports can be downloaded or printed from a browser and use no external scripts or resources. On invalid input or dataset retrieval failure, `AUDIT_ERROR` provides an explanation instead of a partial audit.

### Integrate with your automated workflow

Run your data collection Actor, audit its finished output dataset with DataVerify, and read the `quality_status` field before continuing downstream.

| Status | Meaning |
|---|---|
| `pass` | All enabled quality thresholds were met |
| `fail` | At least one enabled threshold failed |
| `unknown` | At least one enabled check could not be assessed and none failed |
| `not_configured` | No quality thresholds were enabled |

Unknown metrics do not silently pass. Check the quality status rather than relying on the Actor's execution status. DataVerify reports findings; it does not automatically repair, delete or replace records.

#### API examples

Audit pasted CSV:

```json
{"source":"inline","format":"csv","datasetText":"id,amount\nA1,12\nA1,12\nA3,","keyField":"id","expectedIds":"A1\nA2\nA3","requiredFields":"id\namount","fieldTypes":"amount:number","minCompleteness":100,"maxDuplicateRows":0}
```

Audit an existing Apify dataset (replace the placeholder with your own authorized dataset ID):

```json
{"source":"dataset","datasetId":"YOUR_DATASET_ID","keyField":"id","expectedCount":1000,"minCompleteness":99,"maxDuplicateRows":0}
```

Available threshold fields: `minCompleteness`, `minFieldFill`, `minRowPass`, `maxDuplicateRows`, `maxDuplicateKeys`, `maxSchemaViolations`, `maxMissingRecords`. Legacy `format`, `datasetText` and `optionsJson` inputs remain supported.

The Actor uses Apify's run-scoped client and requests read-only access to the selected dataset. No personal API token or arbitrary URL is required. It paginates without clean/skip filters, checks total consistency and rejects incomplete downloads and over-limit inputs. Use a finished dataset: concurrent changes that leave its total unchanged cannot be detected.

### Pricing

DataVerify is priced per completed audit, rather than per individual record checked. See the **Pricing** tab for current event prices, startup charges and platform usage terms. Review the maximum cost per run before starting an audit.

### Limits, interpretation and privacy

- **Input limits:** 10 MiB serialized input, 50,000 rows, 250 combined fields and 2 million cells. Supported formats are UTF-8 CSV with consistent headers and row widths, JSON arrays of objects, or JSON objects containing a `records` array.
- **Findings:** up to 5,000 detailed findings retained; the HTML report previews up to 200. Counts cover all accepted records. Larger datasets must be split deliberately; cross-chunk duplicate checks are not provided.
- **Completeness:** requires an independently supplied expected count or expected IDs. Without a baseline, it is unknown. A count cannot prove that the correct records were collected.
- **Validation scope:** top-level fields and supported data types only. JSON types are strict; CSV type checks interpret text. No external fact verification, semantic inference, scraping or guarantee of source accuracy.
- **Interpreting results:** optional blanks are reported but do not fail a row. Row pass rate measures configured row checks; dataset-level count and column findings are separate. First occurrences are not independently certified, categories may overlap, and row indices refer to 1-based parsed records.
- **Privacy:** cloud inputs and reports are stored on Apify and reports may contain field names or user-supplied expected IDs. Do not submit secrets or confidential, regulated or otherwise sensitive data. Review Apify access settings and retention before sharing reports. Source datasets are not edited, and CSV findings neutralize formula-like text.

### Support and feedback

Use the **Issues** tab on this Actor's page to report unexpected behavior or request features. Include the run ID, a description of the problem, and a small fictional or anonymized example that reproduces it. Do not share API tokens, private datasets or personal information in public issues.

# Actor input Schema

## `source` (type: `string`):

Choose a built-in demo, paste CSV/JSON, or select an existing authorized Apify dataset.

## `datasetId` (type: `string`):

For dataset mode only. Select a finished dataset you are authorized to read. Read-only access.

## `format` (type: `string`):

Used only when pasting data. Apify datasets are JSON.

## `datasetText` (type: `string`):

For paste mode only: UTF-8 CSV with headers or JSON array of objects. Do not include secrets.

## `keyField` (type: `string`):

Optional. Example: id. Leave blank for exact-row duplicate checks.

## `expectedCount` (type: `integer`):

Optional. Supply an independent expected count; otherwise completeness is unknown unless expected IDs are supplied. Zero is a valid expectation.

## `expectedIds` (type: `string`):

Optional. One expected ID per line. Requires a unique key field.

## `requiredFields` (type: `string`):

Optional. One field name per line.

## `fieldTypes` (type: `string`):

Optional. One field:type per line, e.g. amount:number. Types: string, integer, number, boolean, date, object, array, any.

## `optionsJson` (type: `string`):

Optional legacy configuration object. Nonblank simplified fields override matching options. Use allow_extra:false to reject unspecified fields.

## `minCompleteness` (type: `number`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## `minFieldFill` (type: `number`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## `minRowPass` (type: `number`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## `maxDuplicateRows` (type: `integer`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## `maxDuplicateKeys` (type: `integer`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## `maxSchemaViolations` (type: `integer`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## `maxMissingRecords` (type: `integer`):

Set -1 to disable; unknown metrics do not pass an enabled check.

## Actor input object example

```json
{
  "source": "inline",
  "format": "csv",
  "datasetText": "id,amount\nA1,12\nA1,12\nA3,",
  "minCompleteness": -1,
  "minFieldFill": -1,
  "minRowPass": -1,
  "maxDuplicateRows": -1,
  "maxDuplicateKeys": -1,
  "maxSchemaViolations": -1,
  "maxMissingRecords": -1
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `report` (type: `string`):

No description

## `files` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "datasetText": `id,amount
A1,12
A1,12
A3,`
};

// Run the Actor and wait for it to finish
const run = await client.actor("samirb00/my-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "datasetText": """id,amount
A1,12
A1,12
A3,""" }

# Run the Actor and wait for it to finish
run = client.actor("samirb00/my-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "datasetText": "id,amount\\nA1,12\\nA1,12\\nA3,"
}' |
apify call samirb00/my-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,samirb00/my-actor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KfZ6ajbbvcsbpIWW8/builds/edXkpXDLMvwp9wmiB/openapi.json
