With `options.method: "POST"` you can send a raw body to the target URL — the most direct way
to scrape JSON APIs.
Fields
- `method` (`"GET"` | `"POST"`, default `"GET"`) — the HTTP method used against the target.
- `body` (string) — the raw request body, a JSON string or form-encoded text. 64 KB maximum.
- `body_type` (`"json"` | `"formdata"`, default `"json"`) — how the body is encoded and
which Content-Type is set.
Rules
Breaking any of these returns `400`:
- `method: "POST"` works only with `mode: "http"`. To submit an HTML form in browser mode,
use the `fill_form` browser action.
- `body` requires `method: "POST"` — GET requests carry no body.
- `body` may not exceed 64 KB.
- `body_type` is only meaningful together with `body`; it defaults to `"json"`.
A POST costs exactly the same as a GET.
Full example
curl -X POST http://localhost:3000/webhook/unblocker \
-H "Content-Type: application/json" \
-H "x-api-key: js_YOUR_API_KEY" \
-d '{
"url": "https://httpbingo.org/post",
"selectors": [
{ "property_name": "echoed_name", "selector": "json.name", "attribute_type": "GJSON" },
{ "property_name": "echoed_plan", "selector": "json.plan", "attribute_type": "GJSON" }
],
"options": {
"mode": "http",
"method": "POST",
"body": "{\"name\":\"jetscrape\",\"plan\":\"pro\"}",
"body_type": "json"
}
}'{
"success": true,
"results": [
{
"url": "https://httpbingo.org/post",
"success": true,
"data": { "echoed_name": "jetscrape", "echoed_plan": "pro" }
}
]
}CSS selectors do not work against a JSON response; read fields with `GJSON` and dot notation
instead, for example `json.name` or `data.items.0.price`.
Form-encoded bodies
{
"options": {
"mode": "http",
"method": "POST",
"body": "username=demo&password=1234",
"body_type": "formdata"
}
}Common mistakes
- `400`, POST rejected — you used `mode: "browser"`. Switch to `http`, or use `fill_form`.
- `400`, body rejected — `method` is still GET. Add `method: "POST"`.
- Empty data — you used a CSS selector on JSON. Switch to `attribute_type: "GJSON"`.
- `400`, body too large — over 64 KB. Shrink the payload or split the request.