POST /v1/scrape

POST /v1/scrape

Fetch one URL. Get markdown, JSON, HTML or a screenshot. One credit. Sync.

Get your API keyCost · 1 credit (+1 with screenshot)
Overview

What this verb does.

scrape fetches one URL and returns it in any combination of markdown, JSON, HTML and screenshot. The call is synchronous and returns the full response within 60 seconds, or it fails with a structured error.

Pass actions to interact with the page before capture (click, type, scroll, wait). Pass a JSON Schema to run the LLM extractor and get validated structured fields. Pass use_session to route the fetch through your Chrome extension and scrape pages that need you to be logged in.

Request

Make the call.

Pick your language. Every snippet is a real, runnable example.

curl -X POST https://api.stekpad.com/v1/scrape \
-H "Authorization: Bearer stkpd_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product/42",
"formats": ["markdown", "json"]
}'
Parameters

Request body.

NameTypeRequiredDescription
urlstringrequiredThe URL to fetch. Must be HTTP or HTTPS.
formatsstring[]optionalAny subset of markdown, json, html, screenshot. Defaults to ["markdown"].
schemaJSON SchemaoptionalIf set, json is added to formats and the LLM extractor runs.
actionsobject[]optionalOrdered list of browser actions: wait, click, scroll, type, press_key, screenshot.
use_sessionstringoptionalDomain name. Triggers the cookie bridge for authenticated scraping.
persistbooleanoptionalDefaults to true. If false, nothing is stored — the response still has the data.
datasetobjectoptional{ id, mode } to control which dataset receives the row.
Response

What you get back.

scrape-response.json
json
{
"run_id": "run_01HZ...",
"url": "https://example.com/product/42",
"status": "completed",
"markdown": "# Product 42\n\n...",
"json": null,
"metadata": {
"title": "Product 42 — Example",
"language": "en",
"canonical": "https://example.com/product/42"
},
"dataset_id": "ds_default",
"row_id": "row_01HZ...",
"credits_charged": 1
}
Errors

Structured, typed, actionable.

CodeWhen
invalid_urlNot HTTP/HTTPS, or unparseable.
target_blockedThe site returned 403/451/captcha and stealth mode could not pass.
target_timeoutThe page did not respond within 60 seconds.
schema_validation_failedLLM extract produced JSON the schema rejected, twice.
session_unavailableuse_session was set but the cookie bridge is not connected.
insufficient_creditsWorkspace wallet at 0.

Every error includes a code, a human message, and a guidance field with the exact action to take.

Try /v1/scrape now.

Get an API key, paste the curl, watch the row land in your dataset.

POST /v1/scrape — fetch one URL | Stekpad API — Stekpad