scrapewise_get_scraper_sample_data
Runs the scraper synchronously against its configured source URLs (capped to a
FIRST batch / FIRST page only — NOT a full run; no pagination expansion) and
returns the parsed sample rows immediately. Use to validate a scraper config
visually before scheduling a full run via scrapewise_run_scraper. Row count is
not capped to a fixed number — it is whatever a single first-batch fetch yields
(typically single-digit to mid-double-digit, depending on the source site's
page structure and the scraper's `itemsConfig` selectors). Each row is a
dynamic key-value bag.
Args:
- id (string, path param, required): the scraper's MongoDB ObjectId.
- useCache (boolean, query param, optional, default false): if true, returns
the most-recent cached sample within the cached-sample TTL window
(typically 1 hour) — much faster but may be stale.
- preferPersisted (boolean, query param, optional, default false): if true and the
scraper has a latest data-bearing run, returns a fast sample of that run's
persisted rows instead of a live re-scrape; falls back to the live scrape when
the scraper has never produced data.
Returns:
`List<Map<String, Any>>` — each Map represents one scraped row keyed by the
scraper's configured field names. Values are typically strings; numeric and
boolean fields are post-processed if rules are configured.
Examples:
- Use when: "show me what scraper {id} produces right now" → useCache=false
- Use when: "give me a quick preview" → useCache=true (faster, possibly stale)
- Don't use when: you want the full historical dataset → use
scrapewise_get_scraper_data_group on the scraper's group
Error Handling:
- 400 (CustomerError envelope) if no scraper with the given id exists for this customer.
- 502 if the source site is unreachable (rare; check SSRF deny-list).
- 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_get_scraper_sample_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| useCache | No | ||
| forceTopTier | No | ||
| preferPersisted | No |