scrapewise_stop_scraper
Stops a scraper that is currently in RUNNING state — sets `lastRunState` to
STOPPED and persists. Partial scraped data already written to the group's
collection is kept (use scrapewise_delete_scraper_data on the run's
scraperJobStatusId to clear it). Idempotent for the already-stopped case:
calling on a scraper whose state is anything other than RUNNING is a silent
no-op (the if-check skips the save). NOT idempotent for missing scraper id —
see Error Handling.
Args:
- id (string, path param, required): the scraper's MongoDB ObjectId. Get
from scrapewise_get_scraper_list (look for `lastRunState=RUNNING`).
HTTP methods: the route answers BOTH `GET /api/scraper/{id}/stop` and
`POST /api/scraper/{id}/stop`. POST is the one the 409 `SCRAPER_RUN_ACTIVE`
guidance names, and it used to answer 405 (see [stopScraperViaPost]); GET is
kept for every client written against the older shape.
Returns:
200 OK with empty body. The state transition completes synchronously before
the response is returned, so a follow-up scrapewise_get_scraper will read
the new STOPPED state. A job that had not started yet (PENDING) is
terminalised in the same call, so the scraper is immediately deletable.
Examples:
- Use when: "cancel the running scraper {id}" → id only
- Use when: you suspect a runaway scrape and want to halt it before it
consumes more proxy budget
- Don't use when: you want to stop ALL scrapers in a group → use
scrapewise_stop_scraper_group with the group id (one call vs N)
Error Handling:
- 400 (CustomerError envelope) if no scraper with the given id exists for
this customer.
- 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_stop_scraper"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | the scraper's MongoDB ObjectId. Get from scrapewise_get_scraper_list (look for `lastRunState=RUNNING`). |