scrapewise_preview_scraper_from_curl
Same idea as scrapewise_preview_scraper_from_url but the input is a `curl`
invocation rather than a bare URL. Use this when the target endpoint needs
custom request shape — cookies, headers, an authentication bearer, or a POST
body — that wouldn't survive a plain GET. The service parses the curl line,
replays the request as instructed, then runs every applicable detection
strategy on the response. Gated by the API feature flag: only customers
whose plan includes API access can use this entry point. Like
scrapewise_preview_scraper_from_url, this is a preview / discovery endpoint:
nothing persists. Pick a candidate, then call scrapewise_create_scraper.
Args:
- body (SimpleModeWithCurlDTO, required): the curl-based descriptor.
- id (string, optional): existing scraper id if previewing changes
- name (string, required): display name for the future scraper
- groupId (string, required): owning group's MongoDB ObjectId
- curl (string, required): a full curl command (single-line or with
line continuations); supports -X / -H / -d / --cookie / etc.
Returns:
`Set<ScraperSampleDataDTO>` — one entry per detection strategy that
produced data. Each carries the candidate `scraperDTO` (ready to persist
via scrapewise_create_scraper), `sampleData` rows, and `executionTimeSec`.
Empty set means no strategy succeeded.
Examples:
- Use when: "scrape this paginated GraphQL endpoint" — paste the curl
from DevTools → preview shows which detector handles the response shape
- Use when: "the page only loads behind a session cookie" — curl carries
the cookie, the preview replays it
- Don't use when: a plain GET to a public URL works → use
scrapewise_preview_scraper_from_url (cheaper, no curl parsing)
- Don't use when: the customer's plan lacks the API feature → call would
402; check plan first via the customer/plan tools
Error Handling:
- 200 with empty Set if no strategy produced data from the response.
- 400 if the curl string is malformed (parser rejects).
- 401 Unauthorized if no Firebase JWT or API key.
- 402 if the customer's plan does not include the API feature.
- 500 INTERNAL with `correlationId` if a detector or downstream proxy
crashes mid-pass.[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_preview_scraper_from_curl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes |