scrapewise_export_scraper_data_group
Downloads the latest run's data for the given group as a single .xlsx file.
Returns the file as binary (Content-Disposition: attachment; filename=data.xlsx).
Filters and categories supported same as scrapewise_get_scraper_data_group.
Subject to the DATA_EXPORT plan feature.
Limit: the admin value "Max rows per export" (default 1,000,000; one Excel sheet holds at
most 1,048,574 data rows). Above it the export is refused with HTTP 400 EXPORT_TOO_LARGE
and a sentence naming both numbers and how to narrow the export.
Row order: newest run first, then newest stored row first inside a run.
The Idempotency-Key header is ignored on this route (a replay used to return an empty
body); one export per user per group runs at a time — a second one gets 429 EXPORT_BUSY.
A large export can take several minutes to build before the first byte; if your HTTP
client or proxy times out, use the export-jobs routes
(POST /api/scraper/data/group/{id}/export-jobs) instead. A server restart or deploy
ends a running export — request it again.
Args:
- id (string, path param, required): the group's MongoDB ObjectId.
- categories (List<string>, query param, optional): restrict to these
customer-defined categories.
- filters (string, query param, optional): URL-encoded JSON filter expression.
Same operator envelope as scrapewise_get_scraper_data_group; an unreadable
filter is HTTP 400 INVALID_FILTER rather than an export of the whole table.
- isLastRun (boolean, query param, optional, default true): when true the file
holds only the latest run of each automation, which is what this route has
always written. Pass `false` to export every stored run, the same rows
scrapewise_get_scraper_data_group returns without the flag. Omitting it keeps
the historical behaviour, so no existing caller changes.
Returns:
200 with binary body (Excel .xlsx). Content-Disposition: attachment;
filename="data.xlsx". The sheet holds the group's own columns only - the
`_sw_row_id` the JSON read adds is bookkeeping, not scraped data, and is
deliberately not a column here.
Examples:
- Use when: "give me an Excel of group {id}'s latest products" → id only
- Use when: "Excel of just the 'discounts' category" → categories=discounts
- Use when: "Excel of everything we ever scraped for this group" → isLastRun=false
- Don't use when: you want JSON pages for an agent → use
scrapewise_get_scraper_data_group_client
Error Handling:
- 402 if customer plan lacks DATA_EXPORT feature.
- 400 (CustomerError envelope) if no group with the given id exists for this customer.
- 400 EXPORT_TOO_LARGE above the row limit (sentence names both numbers).
- 429 EXPORT_BUSY while your export of this group is being built, or when the server
is building other large exports (Retry-After).
- 503 EXPORT_DISK_LOW / EXPORT_SIZING_TIMEOUT (retry later, or use export-jobs).
- 401 Unauthorized.
- 500 INTERNAL.[runtime hint] This tool returns JSON-as-text — its response shape is dynamic (per-scraper itemsConfig, file binary, etc.) so the MCP outputSchema is omitted. Do not rely on the presence of any specific field in the response; treat the result as a string-or-object blob and parse defensively.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "scrapewise_export_scraper_data_group"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| format | No | xlsx | |
| filters | No | ||
| isLastRun | No | ||
| categories | No |