Dataset Filter & Transform
Pricing
from $2.00 / 1,000 row kepts
Dataset Filter & Transform
Filter rows by rule (AND/OR conditions, 14 operators) and transform them (rename, drop/keep fields, trim/case, computed fields, type casting, regex extraction) for any Apify dataset or JSON array, then download as CSV/Excel. No scraping, works on data you already have.
Pricing
from $2.00 / 1,000 row kepts
Rating
0.0
(0)
Developer
Adam Pearce
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Stop writing one-off scripts to clean up scraper output. Dataset Filter & Transform takes any Apify dataset (or a plain JSON array you paste in) and lets you filter rows by rule and transform fields — rename, drop, trim, uppercase/lowercase, cast types, build a computed field from arithmetic, extract text with a regex, or template a new field from existing ones — all from a JSON config, no code, no spreadsheet formulas to babysit. Point it at the output of any scraper on the Apify Store and get back exactly the rows and fields you actually wanted, plus a ready-to-open CSV or Excel file.
Why use Dataset Filter & Transform?
Every scraper dumps more than you need: rows you don't want, messy strings, numbers stored as "$1,234.50" text, fields with the wrong name for your CRM import. The usual fix is a throwaway Python script or a pile of Excel formulas, redone every time. This Actor turns that into a reusable, scheduled, API-callable step:
- Sales & lead gen: keep only leads in your target country with a phone number, trim and lowercase emails, compute a lead score.
- E-commerce: keep only in-stock products under a price threshold, cast price strings to real numbers, compute a margin field.
- Data pipelines: chain this after any scraper (via Apify's dataset-to-dataset integrations or a schedule) to always hand the next step clean, filtered data.
- CRM prep: rename scraped field names to match your import template before exporting to CSV.
Because it runs on Apify, you get scheduling, API access, dataset integrations (Zapier, Make, Google Sheets, webhooks), and full run history for free.
How to use Dataset Filter & Transform
- Click Try for free (or Start) on this Actor.
- Either pick an existing dataset in Dataset to process, or paste rows into Data (inline).
- Add Transform steps — a JSON list of operations applied in order (see below).
- Add Filter conditions — rows are kept only if they pass, using AND or OR.
- Pick export formats (CSV / Excel) if you want a downloadable file, and run.
The default input runs in a couple of seconds against a small built-in example so you can see exactly how it behaves before pointing it at your own data.
Transform steps
Each step is one JSON object; steps run top to bottom, so a later step can use an earlier step's output (e.g. trim a field, then reference it in a template).
op | What it does | Example |
|---|---|---|
rename | Rename a field | {"op":"rename","from":"e-mail","to":"email"} |
drop | Remove fields | {"op":"drop","fields":["internal_id"]} |
keep | Keep only listed fields, drop the rest | {"op":"keep","fields":["name","email"]} |
trim / uppercase / lowercase | String case/whitespace ops | {"op":"trim","field":"name"} |
cast | Convert to number, string, or boolean | {"op":"cast","field":"price","to":"number"} |
addField | Build a new field from a template | {"op":"addField","field":"fullName","template":"{{first}} {{last}}"} |
compute | Arithmetic over numeric fields | {"op":"compute","field":"total","expression":"price * qty","round":2} |
regexExtract | Pull text out with a regex | {"op":"regexExtract","field":"sku","pattern":"ITEM-(\\d+)-","into":"itemNumber"} |
Number-parsing is lenient by default: "$1,234.50", "49 USD" and "(300)" (accounting negative) all read as real numbers for cast and compute.
Filter conditions
Each condition is {"field": "...", "operator": "...", "value": ...}. Combine every condition with AND (must match all) or OR (match any).
Operators: equals, notEquals, contains, notContains, startsWith, endsWith, greaterThan, lessThan, greaterOrEqual, lessOrEqual, isEmpty, isNotEmpty, matchesRegex, in, notIn.
String comparisons are case-insensitive by default ("US" matches "us"); turn on Case-sensitive filters by default, or set "caseSensitive": true on one condition, to require an exact match.
Input
See the Input tab for the full schema. The two ways to bring in data:
datasetId— point at any existing Apify dataset (yours or from another Actor's run).data— paste a JSON array directly for quick, ad-hoc jobs.
{"data": [{ "name": " jane doe ", "country": "US", "revenue": "$12,500.00", "active": "yes" }],"transforms": [{ "op": "trim", "field": "name" },{ "op": "cast", "field": "revenue", "to": "number" }],"filters": [{ "field": "country", "operator": "equals", "value": "US" },{ "field": "revenue", "operator": "greaterOrEqual", "value": 1000 }],"filterCombineMode": "AND","exportFormats": ["csv", "xlsx"]}
Output
Every kept, transformed row is pushed to the dataset:
{"name": "jane doe","country": "US","revenue": 12500,"active": "yes"}
You can download the dataset in various formats such as JSON, HTML, CSV, or Excel directly from the Apify Console, or request a ready-made CSV/Excel file via exportFormats. A run summary (rows in, kept, excluded, and any field a transform step couldn't honestly apply) is saved to the key-value store as FILTER_TRANSFORM_SUMMARY.
Pricing
Pay-per-event, no subscription:
- $0.002 per row kept (a row that passed your filter and was written out)
- $0.01 per file export (CSV or Excel)
- A small per-GB run-start fee (the platform default)
A typical cleanup of a few thousand scraped rows down to the few hundred you actually wanted costs a few dollars. Rows that get filtered out are never charged.
Tips
- Filters run after transforms, so you can compute a field and then filter on it in the same run (see the default example:
casta price string to a number, then filter on the numeric value). - Use
keepas a last transform step to guarantee a clean, fixed column set for your CSV/Excel export, regardless of what extra fields the source data carries. maxItemscaps how many input rows are loaded, useful as a cost guard on very large datasets before you're sure the filter is right.
FAQ
Does this work on any dataset? Yes — this Actor processes only the data you already have (your own dataset or pasted JSON). It doesn't scrape anything, so there's no target-site data-terms question to worry about.
What happens if a filter field doesn't exist in my data? You'll get a clear warning telling you no row had that field, so a typo doesn't just silently exclude everything with no explanation.
What happens if compute or cast can't parse a value? The field is set to null and counted in the run summary, never guessed.
Found a bug or want a feature? Open an issue on the Issues tab, checked daily.