Title: Scrape a website (unblocker) Upstream: POST /webhook/scrape-wp with a single unblocker format
Scrapes one or more URLs through JetScrape's main engine. Cloudflare, anti-bot protection and JavaScript rendering are handled upstream. Provide selectors to extract structured fields; the tool returns the scraped data plus a diagnostics block.
Parameters
apiKey(string, required) — the user's JetScrape API key.url(string) — a single URL. Provideurlorurls.urls(string array) — several URLs in one request. When both are given,urlswins.selectors(Selector array) — extraction rules. See Selector Reference.mode("http"\|"browser") — rendering mode. Start withhttp; switch tobrowseronly with evidence that the data needs rendering. If omitted everywhere, the engine picks its own default, which is nothttp.wait_until("load"\|"domcontentloaded"\|"networkidle") — page lifecycle event to wait for before extraction.actions(Action array) — browser interactions performed before extraction. See Browser Actions.options(Options object) — humanize, proxy, timeouts, headers, POST body, network capture, company name. See Request Options.max_items(number) — cap on extracted items. Forwarded insideoptions.
Minimal call
{
"name": "scrape_unblocker",
"arguments": {
"apiKey": "js_YOUR_API_KEY",
"url": "https://example.com/products",
"mode": "http",
"selectors": [
{ "property_name": "title", "selector": "h1.product-title", "attribute_type": "TEXT" },
{ "property_name": "price", "selector": "span.price", "attribute_type": "TEXT" }
]
}
}Fuller call
{
"name": "scrape_unblocker",
"arguments": {
"apiKey": "js_YOUR_API_KEY",
"urls": [
"https://shop.example.com/c/dresses",
"https://shop.example.com/c/shoes"
],
"mode": "browser",
"wait_until": "networkidle",
"actions": [
{ "type": "click", "selector": "#accept-cookies" },
{ "type": "scroll", "direction": "down", "amount": 1200 },
{ "type": "wait", "milliseconds": 800 }
],
"selectors": [
{ "property_name": "page_url", "attribute_type": "URL" },
{ "property_name": "name[]", "selector": ".product-card .name", "attribute_type": "TEXT" },
{ "property_name": "price[]", "selector": ".product-card .price", "attribute_type": "TEXT" },
{
"property_name": "link[]",
"selector": ".product-card a",
"attribute_type": "ATTRIBUTE",
"attribute": "href"
}
],
"options": {
"company_name": "shop-example",
"humanize": true,
"use_proxy": true,
"wait_seconds": 2,
"timeout_seconds": 90,
"retry_count": 2
},
"max_items": 50
}
}The URL selector tags each result row with the page it came from. Rows of a multi-URL scrape carry no URL of their own and their order does not reliably follow urls.
What the server sends upstream
The arguments are packed into one unblocker format. selectors, mode, wait_until and actions sit on the format; options and max_items sit under options. Two normalisations happen on the way:
options.headersgiven as an object is serialised into theName:Valueline list the backend expects.- A
URLorBODYselector with noselectorstring gets a placeholder, because the engine validatesselectoras non-empty for every type and then ignores it for those two.
Response
The engine uses different envelopes depending on how it was called; the MCP server tolerates all of them and appends diagnostics at the top level.
- Single URL —
{ "unblocker": { "job", "steps", "results" }, "diagnostics" }. - Several URLs —
{ "job", "steps", "results", "diagnostics" }, no wrapper. - The response also carries the ids of what was created:
company_id,config_id,routine_id,job_idanddispatch_id.
{
"unblocker": {
"job": { "id": 789, "status": "completed" },
"results": [
{
"result": {
"page_url": "https://shop.example.com/c/dresses",
"name": ["Dress A", "Dress B"],
"price": ["₺1.299", "₺899"],
"link": ["/p/dress-a", "/p/dress-b"]
}
}
]
},
"config_id": 4412,
"routine_id": 5120,
"diagnostics": {
"rows": 1,
"fields": 4,
"per_row": [
{
"row": 0,
"empty_fields": [],
"array_lengths": { "name": 2, "price": 2, "link": 2 },
"aligned": true
}
],
"empty_in_all_rows": [],
"warnings": []
}
}Shapes are illustrative; the field names inside result are exactly your property_name values.
http or browser?
- JSON endpoint or server-rendered HTML —
http. Faster, cheaper, and where a run should start. - A clean http attempt came back empty in diagnostics — that is the evidence to switch to
browser. - Clicks, scrolling, forms —
browser; actions only run there. - HTTP POST to the target —
httponly. In browser mode use thefill_formaction. - Network capture —
browseronly. For discovery usediscover_api_endpointsinstead.
Errors
400— invalid body or a rule violation, such asmethod: "POST"in browser mode orcapture_optionswithoutcapture_network.401— missing or invalid API key.402— insufficient credits.403— the URL is blacklisted.504— the upstream service did not answer in time.
A selector that matches nothing returns "" and the job still reports completed, success_count: 1, failed_count: 0. Read diagnostics on every response and believe it over the status. See Reading Diagnostics.
Every call creates a company, config and routine. Pass options.company_name so repeated work on one site stays in one folder, keep the routine_id, and re-run with run_routine instead of sending the selectors again.