scrapewise_update_file_scraper_file
Sends a NEW version of the file to an existing uploaded-file scraper (type FILE) and starts
importing it. Uploading is free. The mode depends on `fileProtected` (scrapewise_get_scraper):
REPLACE mode (fileProtected false, the default): the file becomes a new run and, once complete,
the scraper's data. All-or-nothing: if it stops or fails, the previous file stays.
ADD mode (fileProtected true: matching uses this data; never switches back): rows are matched on
the key column (`fileKeyColumn`). New keys are added, empty cells filled, new columns added.
Existing values and rows are NEVER changed or removed. Rows without a key and repeated keys are
skipped. Re-run matching afterwards. The server picks the key column (matching's identity column,
else EAN, GTIN, EAN13, barcode, SKU, MPN, product_id, id or url); only when it cannot, send
`keyColumn` (one of `fileKeyCandidates`). Once set, it is fixed.
SYNC mode (`mode=sync`, protected scrapers only): the file is the WHOLE catalogue. Unchanged rows
keep matches and review decisions, changed rows update in place, new keys are added, missing
keys become inactive (never deleted; they return with their history). Every row needs a key. If
more than the admin limit (20 % by default) of active rows would go inactive, nothing changes;
resend the SAME file with `confirmDrop=true`. A sync waits while matching of this data runs.
Counts arrive as `syncSummary` in the load history. A column the new file lacks is dropped,
never silently: the job first fails "(SYNC_COLUMN_DROP)" with `syncColumnDrop` on its load-history
row; resend the same file with `confirmColumns=true` and `columnRemaps`.
Small files (about 1 MB of content at most per call): send the file in `content` (csv and jsonl
as text, xlsx as base64). Bigger files (CSV or JSON Lines up to 200 MB by default; Excel up to
36 MB): call WITHOUT `content`. Nothing starts; the answer is `upload`, the ONE request that
sends the file (a ready `curl -X POST -T` command plus `curl.exe` for Windows, with a
<YOUR_API_KEY> placeholder and an empty `Expect:` header, so a file over the limit usually answers
413 with a clear message). Run that command, or ask the user to upload in the portal (the
scraper box's play button). Never split a file into parts. For Excel files over 36 MB, save them
as CSV.
The import runs in the background: follow the import with `scrapewise_get_scraper_load_history`
(the `jobId` is one of its rows).
Args:
- scraperId (string, path, required): the FILE scraper, from scrapewise_get_scraper_list or a
NAME_TAKEN answer.
- body.format (string, required): csv, jsonl or xlsx.
- body.content (string, optional): the file content. Leave it out for a big file.
- body.keyColumn (string, optional): ADD mode only, when asked (400 KEY_COLUMN_REQUIRED).
Ignored in REPLACE mode and once a key column is set.
- mode (string, query, optional): sync or add. Default: the scraper's `fileSyncMode`.
- confirmDrop (boolean, query, optional): sync only; apply a file the row-drop guard refused.
- confirmColumns (query) + body.columnRemaps [{groupId, line, from, to}], max 200: sync only.
Returns:
FileScraperResultDTO: jobId; in ADD / SYNC mode also keyColumnUsed and mode (add or sync).
Without content: upload {method, url, headers, curl, curlWindows, note} only.
Examples:
- Use when: "here is this week's price list, update the uploaded list" → scraperId + content
- Don't use when: there is no uploaded-file scraper yet → use scrapewise_create_file_scraper
- Don't use when: you have web addresses to scrape → use scrapewise_run_scraper_url_list
Error Handling:
- 400 BAD_FORMAT: bad format, invalid base64 (xlsx), or Content-Type not matching the format.
- 400 NOT_A_FILE_SCRAPER; 404 SCRAPER_NOT_FOUND.
- 409 ALREADY_RUNNING: a file is still being imported; wait, then retry. In ADD mode this can
take up to about 30 minutes after a restart (the message states the live value), or
press Stop on the box, wait about a minute, then upload again.
- 400 KEY_COLUMN_REQUIRED (no key column could be picked; the message lists the columns) and
400 KEY_COLUMN_INVALID (not one of the data's columns), both before any file is sent. A file
without the key column ends the job FAILED "(KEY_COLUMN_MISSING)", nothing changed.
- 400 SYNC_NOT_APPLICABLE: mode=sync on an unprotected scraper. 400 BAD_MODE: not sync or add.
- SYNC job FAILED, nothing changed: "(SYNC_KEY_INVALID)" (a row without a key, or a key twice),
"(SYNC_TOO_LARGE)", "(SYNC_DROP_GUARD)" (resend with confirmDrop=true) or
"(SYNC_MATCHER_BUSY)" (matching kept running; send it again later),
"(SYNC_COLUMN_DROP)" (see above),
"(BAD_COLUMN_REMAPS)" (a remap does not fit the refusal; fix it and resend) or
"(SYNC_COLUMN_CHECK_FAILED)" (send the file again).
- 400 BAD_COLUMN_REMAPS: columnRemaps has a bad shape; 403 BAD_COLUMN_REMAPS: another
account's group. Nothing was saved.
- 413 FILE_TOO_LARGE / PAYLOAD_TOO_LARGE: call without content, or save Excel as CSV.
- 429 INGEST_CAPACITY*: retry after Retry-After. 503 STORAGE_UNAVAILABLE: try again shortly.
- 401 Unauthorized; 403 for a read-only API key.[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": {
"scraperId": "<scraperId>",
"body": "<body>"
},
"name": "scrapewise_update_file_scraper_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Object with the fields format, content, keyColumn. | |
| mode | No | Optional: sync (the file is the whole catalogue) or add. Default: the scraper's fileSyncMode. | |
| scraperId | Yes | the FILE scraper, from scrapewise_get_scraper_list or a NAME_TAKEN answer. | |
| confirmDrop | No | Optional, sync only: apply a file the row-drop guard refused (send the same file again). | |
| confirmColumns | No | Optional, sync only: apply a file the column guard refused (SYNC_COLUMN_DROP; send the same file again, with columnRemaps for every matcher line that reads a missing column). |