How to filter an Apify dataset and export it to CSV or Excel
Short answer
Filter the dataset on the fields you care about, keep and rename only the columns you need, flatten nested objects into columns, then export. Rowmold on Apify does it in one run at $0.0002 per row kept; rows you filter out and the CSV/Excel files are free.
- Pick the scraper run's dataset in datasetIds (or pass its ID through the API).
- Add filters, e.g. {"field": "rating", "op": "gte", "value": 4} and {"field": "website", "op": "notEmpty"}.
- List fields to keep in order; rename with "as" ("title as name", "address.city as city").
- Turn on flatten for spreadsheet columns; use unwind to get one row per email or review.
- Set exportFormats to ["xlsx"] or ["csv"]: the files are linked in the run's OUTPUT record.
Copy-paste code
Python (pip install apify-client)
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("cybermax/dataset-filter-transform").call(run_input={
"datasetIds": ["YOUR_DATASET_ID"],
"filters": [{"field": "rating", "op": "gte", "value": 4}],
"fields": ["title as name", "phone", "website"],
"exportFormats": ["xlsx"],
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row)Chain after any scraper (Apify Integrations -> Run Actor)
{
"datasetIds": ["{{resource.defaultDatasetId}}"],
"filters": [{"field": "rating", "op": "gte", "value": 4}],
"monitor": true,
"monitorKey": "good-leads"
}No code: n8n, Make or Zapier
n8n: HTTP Request node (or the Apify node, action "Run an Actor and get dataset")
Method: POST
URL: https://api.apify.com/v2/acts/cybermax~dataset-filter-transform/run-sync-get-dataset-items
Auth: Header Auth -> Authorization: Bearer <your Apify token>
Body: JSON {"datasetIds": ["ID"], "filters": [{"field": "rating", "op": "gte", "value": 4}]}
Make: Apify app -> "Run an Actor" (Actor: cybermax/dataset-filter-transform, wait for finish = yes) -> "Get Dataset Items"
Zapier: Apify app -> action "Run Actor" (cybermax/dataset-filter-transform) -> "Fetch Dataset Items" -> your app
Runs longer than 5 minutes: start with POST /v2/acts/cybermax~dataset-filter-transform/runs and read the dataset when the run finishes.From an AI agent (MCP)
# Any MCP client (Claude Desktop, Claude Code, Cursor, VS Code): Apify's hosted MCP server
{
"mcpServers": {
"dataset-filter-transform": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=cybermax/dataset-filter-transform",
"--header", "Authorization: Bearer ${APIFY_TOKEN}"],
"env": { "APIFY_TOKEN": "<your Apify token>" }
}
}
}
# The agent sees one tool, cybermax--dataset-filter-transform, with the Actor's input schema.| name | rating | address.city | address.state | |
|---|---|---|---|---|
| Blue Bottle Coffee | hello@example.com | 4.6 | Oakland | CA |
| Blue Bottle Coffee | press@example.com | 4.6 | Oakland | CA |
| Intelligentsia | info@example.org | 4.5 | Chicago | IL |
Source: Rowmold (Apify Actor cybermax/dataset-filter-transform) README, real Apify run on 10 Nov 2026
Filter on numbers and dates, not text
Scrapers often store numbers as text ("4.5", "1,250"). Rowmold compares numbers and ISO dates as numbers and dates, so rating >= 4 and postedAt >= 2026-11-01 work as you expect.
Nested JSON into spreadsheet columns
flatten turns {"address": {"city": "Austin"}} into an address.city column; joinArrays turns ["a", "b"] into "a, b". That is what makes a clean Excel file.
Only new matching rows on a schedule
With monitor on, each run passes on only rows it has never sent before, so a daily scraper plus Rowmold becomes an alert feed you pay for only when something new matches.
Good to know
Sorting and file exports hold rows in memory: about 145,000 rows at the default 512 MB.
To merge several runs and remove duplicates first, use Rowmeld, then Rowmold.
Cartlark: Every product, price and stock level
$0.0008 per product, no start feeFiltering product data? Cartlark scrapes every product, price and stock level of any Shopify or WooCommerce store at $0.0008 per product.
Runs on your own Apify account, pay per result; failed results are not charged.Questions
Is it free to try?
Yes. Run it with no input for a free demo on sample data.
Which filters are there?
equals, notEquals, contains, notContains, startsWith, endsWith, matches (regex), gt, gte, lt, lte, in, notIn, isEmpty, notEmpty, exists, notExists, with AND or OR.
Does it change my original dataset?
No. It writes a new dataset and files.
Can an AI agent use it?
Yes. Apify's MCP server exposes it as cybermax--dataset-filter-transform.
Free: the Free API Starter Kit
Copy-paste calls for 4 APIs with free daily tiers (CVE priority, VIN recalls, US duty rates, email checks), then 5 short emails on KEV/EPSS, MCP and free data.