# Dataset Column Profiler: check data per column (`ucchiii/dataset-column-profiler`) Actor

Profiles every column of an Apify dataset or a CSV / JSON / NDJSON file: inferred type, missing values, distinct count, top values, min / max / mean / median, mixed types, full-width and half-width mix (Japanese data), duplicate rows. Empty input = free demo.

- **URL**: https://apify.com/ucchiii/dataset-column-profiler.md
- **Developed by:** [Actor Factory](https://apify.com/ucchiii) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.07 / 1,000 profiled column

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

**Check a CSV, JSON file or Apify dataset column by column**

**A health check for the data you just received.** You got a CSV export, a scraper dataset or a file from a partner, and you want to know what is in it before you use it: which columns are half empty, which "number" column has a stray `n/a` in it, how many different values a column has, whether the ZIP codes lost their leading zeros, whether the phone numbers are a mix of full-width and half-width digits. Paste a dataset ID or a file URL, press Start, and get **one row per column** with the answers. It works from the Console form: no code, no spreadsheet. Also useful as a check before a migration or an import, and after a scrape to see which fields came back empty.

**Try it free: leave all inputs empty and press Start.** The demo profiles a built-in sample of 24 rows (it is not charged and its rows carry `_demo: true`).
**$0.0012 per file or dataset read, plus $0.0001 per column** (events `file` and `column`). Examples: a table with 5 columns costs $0.0017, 10 columns $0.0022, 30 columns $0.0042, 300 columns $0.031. The $5 monthly free credit covers about 2,200 tables of 10 columns. Reading rows is free, however many rows the table has. Failed runs, empty runs and the demo are free.

### What you get for every column

| Field | Meaning |
|---|---|
| `column` | the column name, exactly as it is in the data |
| `inferredType` | `integer`, `number`, `boolean`, `date`, `string`, `mixed` (more than one kind) or `empty` |
| `count` | values that are present |
| `missing`, `missingRate` | values that are `null`, empty, only spaces, or absent from the row, and their share of all rows |
| `distinct`, `uniqueRate`, `approximate` | number of different values (up to 100,000 per column, then `approximate: true` and `distinct` is a lower bound) |
| `topValues` | the N most frequent values with `count` and `rate` (N = **Top values per column**, default 5) |
| `typeCounts`, `mixedRate` | how many values of each kind, and the share that does not match the main kind |
| `min`, `max`, `mean`, `median`, `stdDev` | for numbers (sample standard deviation). For dates, `min` and `max` are the earliest and latest date |
| `minLength`, `maxLength`, `examples` | for text: the shortest and longest length, and example values (shortest, longest, first seen) |
| `warnings` | plain-language findings, see below |

The **REPORT** record (key-value store) has the totals: `rows`, `columns`, `duplicateRows` (rows equal to an earlier row in every column) and `duplicateRowRate`, the `encodings` that were read, `sampling` (whether only the first rows were profiled), the rows read per source, and notes.

### Sample

Input: a customer CSV with these values in the `phone` column: `03-1234-5678`, `０３-９８７６-５４３２`, ` 080-3333-4444` ...
One output row (shortened):

```json
{"column": "phone", "inferredType": "string", "count": 22, "missing": 2, "missingRate": 0.083333, "distinct": 21,
 "topValues": [{"value": "０３-９８７６-５４３２", "rank": 1, "count": 2, "rate": 0.090909}],
 "warnings": ["1 values have leading or trailing whitespace.",
              "Full-width digits (０-９) in 3 values, while 19 values use half-width digits: width is mixed."]}
```

### What it finds

- **Missing values**: `null`, empty text and whitespace-only text all count as missing. The share per column shows at a glance which fields are unusable.
- **Mixed types**: a column that is 98% numbers and 2% `n/a` is reported as `mixed` with the share of odd values, and the number statistics are still calculated from the numbers.
- **Types from text files**: a CSV has no types, so each value is read from its text. `42` is an integer, `3.14` a number, `true` / `false` a boolean, `2026-03-04`, `2026/3/4`, `2026-03-04T10:00:00+09:00` and `2026年3月4日` are dates. Values with leading zeros (`007`, `0123`) stay text, because they are IDs or ZIP codes. `1,200` stays text too.
- **Japanese data checks**: full-width digits, full-width letters and full-width spaces (U+3000), half-width katakana, and a mix of full-width and half-width in one column are reported with counts. Leading and trailing spaces, BOM characters inside values or column names, and column names with spaces are reported as well.
- **Duplicate rows**: how many rows repeat an earlier row in every column.
- **Nested values** (objects and lists in JSON or datasets) are turned into JSON text and profiled as text; the column carries a warning.
- **Encodings**: UTF-8, UTF-8 with BOM, Shift JIS (also for files that contain only kanji), Windows-1252 and Windows-1251 are detected, and the delimiter (comma, semicolon, tab, pipe) too.

### Input example

```json
{
  "fileUrls": ["https://raw.githubusercontent.com/mwaskom/seaborn-data/master/titanic.csv"],
  "topN": 5
}
```

A dataset, only three columns, with values hidden: `{"datasetIds": ["<id>"], "columns": ["email", "country", "age"], "maskValues": true}`.

### Inputs

- **Apify datasets** (resource picker, read permission only) and **File URLs** (public CSV / TSV / JSON / NDJSON links), mixed freely and read as one table. Up to 20 sources.
- **Max rows**: default 200,000, at most 1,000,000. If the data has more rows, only the first rows (in the order read, not a random sample) are profiled; `REPORT.sampling` says so. Wide tables are read up to about 600,000 cells (rows × columns), so a 300-column table is read for its first 2,000 rows; the report says so, and the **Columns** option lets you profile fewer columns over more rows.
- **Top values per column**: 1 to 100, default 5.
- **Columns**: profile only these columns. Names that do not exist are listed in the REPORT and are not charged.
- **Mask values**: see below.

### Personal data and Mask values

Top values and text examples are actual values from your data, so they can contain personal data such as names, e-mail addresses or phone numbers. You are responsible for the data you profile and for who can see the output. Turn on **Mask values** to leave the values out: the top values then show only `rank`, `count` and `rate`, and `examples` is empty. The other numbers (counts, missing, distinct count, number and date ranges, lengths) are still given.

### Limits

- **Up to 300 columns per run.** With more, the run fails without charging; use **Columns** to choose the ones you need.
- Rows are processed one at a time. Distinct values and top values are kept in memory with a limit of 100,000 per column and a shared limit across all columns; when it is reached the column is marked `approximate`. The median is calculated from a sample of up to 100,000 numbers per column (`medianApproximate`).
- Files: 50 MB each (a JSON array is read whole; use NDJSON for bigger files), 60 seconds per request, up to 3 attempts for connection errors, timeouts and server errors. Binary files (Excel, PDF, images, zip, anything with NUL bytes, including UTF-16) are refused; save them as UTF-8 or Shift JIS CSV first.
- Source URLs must be public `http` or `https` links. Addresses on internal networks (localhost, private ranges, cloud metadata) are blocked, also after redirects.

### Pricing

Pay per event: **$0.0012 per file or dataset read** (event `file`, once per source) and **$0.0001 per column** in the output (event `column`). Reading input rows is free. Nothing is charged when the run fails, when no column is written or in the demo. Set a maximum charge per run: the Actor then writes only the columns that fit the budget after the file fee (never past it) and says so in the REPORT. If the budget is lower than the price of one file plus one column ($0.0013), the run stops at once without charging.

### Use cases

- Check a file or dataset you received before you load it anywhere
- Find the columns that are mostly empty, constant or full of one odd value
- Find a number column that is really text because of `n/a`, `-` or a unit
- Check a scrape: which fields came back, which are empty, how many distinct values there are
- Compare the shape of an old and a new export before a migration
- Find full-width / half-width mixes in names, phone numbers and codes before matching or importing Japanese data

### FAQ

**Does it change my data?** No. It only reads the source and writes a new dataset with the profile.
**Why is my number column `mixed`?** At least one value is not a number (often `n/a`, `-` or an empty-looking string). `typeCounts` and `mixedRate` tell how many; the number statistics still use the numbers.
**Why is a ZIP code column `string` and not `integer`?** Values with leading zeros are kept as text on purpose.
**Why is `distinct` marked approximate?** The column has more than 100,000 different values, or the memory limit for all columns was reached. `distinct` is then a lower bound.
**Does a missing column in some rows count as missing?** Yes: a row without the column counts as a missing value.
**What are the row counts for a file that is bigger than Max rows?** Only the first rows are read. The REPORT says how many.
**Is Excel supported?** No. Save the sheet as CSV first.

If this Actor saved you time, a rating on the Store helps others find it.

### More tools from the same developer

- [Dataset Type Caster](https://apify.com/ucchiii/dataset-type-caster) — turn text columns into real numbers, booleans and dates: currencies, 1,200 vs 1.200, and Japanese era dates
- [CSV Validator](https://apify.com/ucchiii/csv-validator) — validate CSV and TSV files against your rules and list every bad row and column
- [Group By & Aggregate](https://apify.com/ucchiii/dataset-groupby-aggregate) — group dataset or CSV rows by columns and get counts, sums, averages, medians and pivot tables, one row per group
- [Filter CSV, JSON or Dataset Rows by Condition](https://apify.com/ucchiii/filter-rows) — keep only the rows of a CSV, JSON file or dataset that match simple conditions like country = US or price > 100
- [Dataset Sampler](https://apify.com/ucchiii/dataset-sampler) — take a random, systematic, first/last or stratified sample of a CSV, JSON file or dataset, reproducible with a seed

# Actor input Schema

## `datasetIds` (type: `array`):

Datasets to profile (the 'defaultDatasetId' of a finished run). You can paste a dataset URL from Apify Console too. Several datasets and files are read in the order given and profiled as one table. Up to 20 in total. Leave this and 'File URLs' empty to run a free demo on a built-in sample (not charged).

## `fileUrls` (type: `array`):

Public http(s) links to CSV, TSV, JSON or NDJSON files (up to 50 MB each; a JSON array is read whole, use NDJSON for bigger files). The encoding (UTF-8, UTF-8 with BOM, Shift JIS, Windows-1252) and the delimiter are detected. Binary files (Excel, PDF, images, zip) are refused. Links to internal networks are blocked.

## `maxRows` (type: `integer`):

The most rows to read across all sources. If the data has more, only the first rows (in the order read, not a random sample) are profiled and the run report says so. Default: 200,000. Limit: 1,000,000.

## `topN` (type: `integer`):

How many of the most frequent values to list for each column, with their counts. Default: 5.

## `columns` (type: `array`):

Profile only these columns (exact names, case-sensitive; nested fields are shown as JSON text). Leave empty to profile every column (up to 300). Names that no row has are reported in the run report and are not charged.

## `maskValues` (type: `boolean`):

Turn on when the data contains personal information. The top values and the text examples are then left out: you get only their counts and shares, and the other statistics (type, missing, distinct count, number and date ranges, lengths). Default: off.

## Actor input object example

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/titanic.csv"
  ],
  "maxRows": 200000,
  "topN": 5,
  "maskValues": false
}
```

# Actor output Schema

## `profiles` (type: `string`):

One row per column: inferred type, counts, missing values, distinct count, top values, statistics and warnings. Download as CSV, JSON, Excel and more.

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

Record REPORT: total rows, number of columns, duplicate rows, the encodings that were read, whether only the first rows were profiled, and the rows read per source.

# 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 = {
    "fileUrls": [
        "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/titanic.csv"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ucchiii/dataset-column-profiler").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 = { "fileUrls": ["https://raw.githubusercontent.com/mwaskom/seaborn-data/master/titanic.csv"] }

# Run the Actor and wait for it to finish
run = client.actor("ucchiii/dataset-column-profiler").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 '{
  "fileUrls": [
    "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/titanic.csv"
  ]
}' |
apify call ucchiii/dataset-column-profiler --silent --output-dataset

```

## MCP server setup

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

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/hVpHlnVmdcTLQHc8D/builds/jyhcEhtyRlbEPHYEX/openapi.json
