scrapewise_run_reapply_rules
Starts a background job that re-runs the scraper's CURRENT post-scrape rules (its own rules, then its
group's rules, plus constant columns) on every stored row of one finished run and writes the results
back. It ADDS new rule columns and UPDATES values of rule columns. It never removes a column or a value:
a rule that was deleted, or that now gives nothing for a row, leaves the old value in place (counted as
keptStale). Scraped (raw) columns and currency-conversion outputs are never changed. Free (no credits),
nothing is re-scraped, matching is not started (it reads the new values on its next run).
Args:
- jobId (string, path, required): the run's id (scraperJobStatusId).
- expectedRulesHash (string, query, optional): the rulesHash from the preview; refused with 409 when
the rules changed since.
- idempotency_key (string, query): REQUIRED for AI-agent keys. A new value per new start.
Returns:
202 with the job (reapplyId, state PENDING, rowsTotal). Poll scrapewise_get_reapply_rules.
Examples:
- Use when: "apply my new cleaning rules to run {jobId}" → preview first, then run with its rulesHash.
- Don't use when: you want fresh data from the website → run the scraper instead.
Error Handling:
- 400 (CustomerError): unknown run, no data, no rules to apply, more rows than the limit.
- 409: the run is not finished, the rules changed since the preview, or a re-apply of this run is
already active (the body is that job).
- 429: too many re-apply jobs waiting or running for this customer.
- 503: switched off by an administrator.
- 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": {
"jobId": "<jobId>"
},
"name": "scrapewise_run_reapply_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | the run's id (scraperJobStatusId). | |
| idempotency_key | No | Required for AI-agent keys: a new value per new start, the same value only to retry it. | |
| expectedRulesHash | No | the rulesHash from the preview; refused with 409 when the rules changed since. |