scrapewise_create_scraper
Create-or-update by id semantics: if the request body's `id` field is empty, a
new scraper is created (with limit + plan checks); if `id` is set, the existing
scraper with that id is replaced. The body must include the full `ScraperDTO`
shape — partial updates are NOT supported. Validates the config against the
scraper type's required parameters before persisting.
Before creating, list the group (scrapewise_get_scraper_list with groupId; open a
candidate with scrapewise_get_scraper to see its config.sourceConfig.url): one scraper
per shop and data source — extend the shop's existing scraper instead of adding another.
A save that carries a `schemaId` (the portal's save sends it too) rebuilds itemsConfig
from that schema and drops fields that are not in it, and the binding cannot be removed.
To keep your own fields, create the scraper without a `schemaId`, or put the fields into
the schema. After a save, read `ruleWarnings` in the response.
Args:
- body (ScraperDTO, required): full scraper configuration including
name, type, sourceConfig (URL or curl), itemsConfig (field selectors),
pagination, optional schema reference, postProcessRules, group association.
Set `id` to update an existing scraper; omit to create.
Returns:
The persisted ScraperDTO including the assigned (or echoed) id and
server-stamped fields (createdAt, updatedAt, lastRunState). When `id` was
empty on the request, the returned DTO carries the freshly minted ObjectId
— capture it for follow-up calls. On a create, `warning` is set when many
automations of the same endpoint were created in this group in the last 10
minutes: the create still succeeded, but a list belongs in ONE automation —
use `scrapewise_run_scraper_url_list` for the rest.
Examples:
- Use when: "create a new scraper for shop X" → body with id omitted
- Use when: "change scraper {id}'s URL" → call scrapewise_get_scraper
first, mutate the returned DTO, send it back here
- Don't use when: you only need to read the config → use scrapewise_get_scraper
- Don't use when: you want to delete → use scrapewise_delete_scraper
- Don't use when: you have many URLs to scrape. Do NOT create one scraper per URL.
Create ONE scraper and attach the addresses as its link list —
`scrapewise_run_scraper_url_list` does the whole thing in one call, or
`scrapewise_create_scraper_site` attaches a list to a scraper you already have.
Error Handling:
- 400 if body validation fails (missing required fields like `name` /
`groupId` / `sourceConfig.url`, malformed selectors, invalid pagination
type, etc.); the error envelope includes which field failed.
- 400 (CustomerError envelope) if `id` is set on the request but no scraper
with that id exists for this customer (cross-tenant leak guard) — the
upsert is rejected rather than silently creating under the foreign id.
- 402 if customer plan's scrapers-limit is reached on a CREATE (id empty).
- 401 Unauthorized if no valid Authorization header.
- 500 INTERNAL on unexpected server error.[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": {
"body": "<body>"
},
"name": "scrapewise_create_scraper"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | full scraper configuration including name, type, sourceConfig (URL or curl), itemsConfig (field selectors), pagination, optional schema reference, postProcessRules, group association. Set `id` to update an existing scraper; omit to create. |