POST /v1/scrape
Scrape a single URL and return its content as clean markdown. Optionally extract structured listing data (business name, phone, address, hours, rating, and more) using a JSON-LD cascade + heuristic pipeline. No LLM runs.
The engine automatically escalates the fetch method when needed: plain HTTP first, then headless Playwright, then hosted browser tiers where they are configured. Extra unblocking for sites that refuse every standard level is not yet available (see Hard sites).
Request
POST /v1/scrape
Content-Type: application/json
x-api-key: YOUR_KEYBody
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | The URL to scrape. Must be a valid http:// or https:// URL. | |
formats | string[] | No | ["markdown"] | Which outputs to return: markdown, rawHtml, links, screenshot, json, branding, summary. Requested outputs appear under a formats object. |
includeHtml | boolean | No | false | Shortcut for including raw HTML in the response. |
extractListing | boolean | No | true | Run the listing extraction pipeline (JSON-LD → Open Graph → regex). |
schema / jsonSchema | object | No | When formats includes json, extract structured data matching this schema via the LLM layer. Same limits as Extract; over a limit is a 400 with code: "schema_too_large". | |
actions | object[] | No | Browser actions before capture (forces Playwright): click, scroll, wait, write, press, screenshot, pdf. See Browser actions. | |
onlyMainContent | boolean | No | false | Strip nav/boilerplate, keep the main content. |
includeTags / excludeTags | string[] | No | Keep only / drop these CSS selectors before conversion. | |
removeBase64Images | boolean | No | false | Strip inline base64 images from the markdown. |
forcePlaywright | boolean | No | false | Skip plain fetch and render with Playwright. |
waitFor | number | No | Milliseconds to wait after load before capture (Playwright). Capped at 30,000; it shares the 30-second budget with any actions. | |
cookies / headers | string / object | No | Cookie string and custom headers forwarded with the request. | |
acceptPartial | boolean | No | false | Return an auth-walled page instead of failing. The response then carries partial: true and partial_reason: "auth_wall". |
ignoreRobotsTxt | boolean | No | false | robots.txt is respected by default; set true to opt out. |
maxAge | number | No | 0 | Serve a stored copy if it is fresher than this many ms. 0 = always fetch fresh. On /v1 the cache is off unless you ask for it: when you leave maxAge out, the service default applies, which is 0 (always fresh). The /v2 door uses a 2-day window when maxAge is not sent. metadata.cacheWindowMs shows the window each request used. Send maxAge: 0 to always get a fresh fetch. A cache hit costs 0 credits unless the request also asks for a json format with a schema, a summary or a screenshot. |
minAge | number | No | Cache-only mode: return a cached copy at least this fresh, or 404 with code: "no_cached_data". No live fetch runs. | |
storeInCache | boolean | No | true | Save this response to the cache. |
zeroDataRetention | boolean | No | false | Never store the response, and purge any cached copy for this URL and options. |
parsers | object[] | No | PDF URLs only: [{ "type": "pdf", "maxPages": 20 }] reads only the first 20 pages and charges for at most 20. | |
region | string | No | Region hint for the proxy tier (for example "br", "mx"). | |
maxCostUsd | number | No | Ceiling on what one fetch may spend on the proxy tier. | |
timeout | number | No | Total time in milliseconds the fetch levels may spend on this page, from 1000 up to your plan's ceiling: 30000 on Free, 120000 on paid plans (GET /v1/pricing serves it as request_caps.scrape_timeout_ms). Without it the standard budget applies. A hard, bot-protected site can need more time than the standard budget; a page that is not fetched in time returns 422 and costs nothing. Not counted: the robots.txt check, a site's crawl delay and output formats such as json or summary. A fraction, null or a value outside the range (including above your plan's ceiling) is a 400 with code: "invalid_timeout". Not used for PDF URLs. |
Hard sites: not yet available. Extra unblocking for sites that refuse every standard fetch level is a paid-plan feature that is not switched on yet. Today every plan stops after the standard levels and returns the usual answer for a blocked page (422, no charge). GET /v1/pricing already shows which plans will include it, as hard_site_unblocking.
Browser actions
Actions run in order after the page loads. An action that fails is skipped and the rest still run. At most 20 actions per request (otherwise 400 with code: "invalid_action"), and all actions together, plus waitFor, run at most 30 seconds.
| Field | Used by | Description |
|---|---|---|
type | all | click, scroll, wait, write, press, screenshot or pdf |
selector | click, write, press, scroll, wait, screenshot | CSS selector of the target element |
text | write | Text to type |
key | press | Key to press, for example "Enter" |
ms | wait, scroll | Milliseconds to wait |
executeJavascript (running your own script in the page) is coming soon and is not callable yet: a request that includes it returns 400 with code: "action_not_available" before anything runs or is charged.
With screenshot in formats, frames from screenshot actions come back in formats.screenshot.images.
A request with screenshot actions always runs fresh: it never reads or writes the cache, so maxAge has no effect and minAge returns 400 with code: "cache_not_applicable".
Cache
- What is stored: only a complete, successful page with real text. Failed fetches, bot walls, pages answered with an error status, incomplete (
partial) pages and near-empty pages are never stored. - What the copy matches: a stored copy is reused only for a request with the same URL and the same fetch options (
cookies,headers,forcePlaywright,waitFor,acceptPartial,actions,region,ignoreRobotsTxt,extractListing). Output options such asformats,onlyMainContent,includeTagsandexcludeTagsare applied to the stored page on every request, so they do not need a separate copy. - Your cookies and headers stay yours: a page fetched with
cookiesorheadersis stored for your account only. It is never served to another account, even one sending the same values. The default window never applies to these requests or to requests withactions: they are fetched fresh unless you sendmaxAge. - Zero data retention: a request with
zeroDataRetention(or a key or account that has it on) never reads or writes the cache. - Every response says where it came from:
metadata.cached,metadata.cacheAgeMsandmetadata.cachedAton a hit, andmetadata.cacheWindowMson every page.
In the page, WebSockets are checked against the same address rules as other requests, and WebRTC, WebTransport and web workers are not available.
{
"url": "https://example.com",
"actions": [
{ "type": "click", "selector": "#load-more" },
{ "type": "wait", "ms": 1000 },
{ "type": "screenshot" }
],
"formats": ["markdown", "screenshot"]
}Example request
curl -X POST https://api.superscraper.dev/v1/scrape \
-H "x-api-key: ss_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.iana.org/about",
"extractListing": true
}'That page has no schema.org markup, so listing holds only name and description
(_extraction_method: "regex-cascade"). The example response below is from a business page that
does publish schema.org JSON-LD, which fills many more listing fields.
Response
HTTP 200 on success, HTTP 422 if the page could not be fetched. A page whose plain HTML has almost no text (a JavaScript app) is rendered in a browser automatically. When every level gets a page with no readable text, the answer is 422 with code: "empty_content". Failed scrapes are not charged.
Body
| Field | Type | Description |
|---|---|---|
url | string | Canonical URL after any redirects |
markdown | string | Page content converted to clean markdown |
html | string | undefined | Raw HTML (only present when includeHtml: true) |
listing | object | undefined | Listing fields read from the page (see below). Present on every successful page scrape unless extractListing is false |
formats | object | Requested outputs, e.g. formats.markdown, formats.links, formats.json (present when formats[] was set) |
format_errors | object | undefined | Present only when a requested json or summary could not be produced. One { code, message } per failed format, and that format is null in formats. code is extraction_unavailable (the model is temporarily unavailable), extraction_failed (no valid JSON, or an empty summary) or no_content (the page had no text). The page was still fetched, so its 1 credit stands; the failed format adds nothing. |
metadata.fetchMethod | string | How the page was fetched: "plain" (an HTTP request), "playwright" (a real browser) or "stealth" (a proxy route) |
metadata.extractionMethod | string | Repeats listing._extraction_method: "json-ld" or "regex-cascade" |
metadata.completeness | number | Repeats listing._completeness, 0–1 |
metadata.cached | boolean | Whether this response was served from cache |
metadata.cacheAgeMs | number | Age of the cached copy (present when cached: true) |
metadata.cachedAt | string | When the cached copy was fetched, as an ISO 8601 time (present when cached: true) |
metadata.cacheWindowMs | number | The freshness window this request used: your maxAge, or the service default when you sent none. 0 means always fresh (no stored copy was read) |
metadata.truncated | boolean | undefined | true when markdown is not the whole page converted to Markdown |
metadata.truncated_reason | string | undefined | With truncated: "body_too_large" (the download was cut at 20 MB), "markdown_input_too_large" (the HTML was over 2 MB after scripts and styles; only its start was converted), "structure_too_deep" (the HTML was nested too deep or had too many elements to parse; markdown is its plain text) or "conversion_timeout" (the page could not be parsed or converted inside its time budget; markdown is the plain text of the page) |
metadata.latencyMs | number | Total fetch + extraction time in milliseconds |
cascade.level | number | null | The fetch tier that served the content (0 proxy tier, 1 plain HTTP, 2 Playwright, 3–4 managed browser tiers), or null when nothing was served or the answer came from cache |
cascade.attempts | object[] | Every tier tried, in order: { rung, level, ok, latency_ms, error_class } |
unblock.attempts | object[] | One entry per proxy provider tried: { provider, ok, latency_ms, error_class, outcome, cost_class }, plus region_honoured (boolean) when the request set region: true if that provider could route through the requested country. Empty when the proxy tier was not used. |
fallback | object | undefined | { used: true, from, to } when an earlier tier failed and a later tier served complete content |
partial / partial_reason | true / string | undefined | Present only when the served content is incomplete: timeout, auth_wall or js_not_rendered. Never set together with fallback. |
ok | boolean | true on success |
error | string | undefined | Error message when ok is false |
A .pdf URL (or application/pdf content type) short-circuits to PDF extraction and returns { url, text, markdown, isPdf, ok, pages_total, pages_parsed, credits_charged }. It is billed like /v1/parse: 1 credit per page parsed, held before the first page is read. Send parsers: [{ "type": "pdf", "maxPages": 20 }] to read and pay for at most 20 pages. A private, loopback or metadata target returns 400 with code: "blocked_url".
Listing object
Present on every successful page scrape unless you send extractListing: false. Only the fields that were found are set, except _completeness and _extraction_method, which are always set. Fields come from schema.org JSON-LD first (a business, product, recipe, event, article or organization entity, including @graph and an array @type), then Open Graph tags, then the page text.
| Field | Type | Description |
|---|---|---|
name | string | Business name |
description | string | Short description |
phone | string | Primary phone number |
email | string | Contact email |
website | string | Business website URL |
address | string | Street address |
city | string | City |
state | string | State / province |
zip | string | Postal code |
country | string | Country |
lat | number | Latitude |
lng | number | Longitude |
rating | number | Average rating (e.g. 4.7) |
review_count | number | Total review count |
price_range | string | Price range string (e.g. "$$") |
price_min | number | Minimum price |
price_max | number | Maximum price |
hours | object | Business hours (structure varies by source) |
amenities | string[] | List of amenities or features |
hero_image | string | URL of the primary image |
photo_urls | string[] | All photo URLs |
license_number | string | Professional license number |
capacity | number | Capacity (e.g. for venues) |
founded_year | number | Year the business was founded |
schema_markup_types | string[] | JSON-LD @type values found on the page |
_completeness | number | 0–1: weighted share of core fields (name, phone, address, city, state) and bonus fields (rating, price range, description, photos) found. Not an accuracy score. |
_extraction_method | string | "json-ld" when a schema.org entity in the page's JSON-LD was read, otherwise "regex-cascade" (Open Graph tags and text patterns) |
Example response
{
"url": "https://www.northside-roasters.example/cafes/downtown",
"markdown": "# Northside Coffee Roasters\n\n**4.8** ★ · 214 reviews · Coffee roaster · Portland, OR\n\n> Small-batch coffee, roasted daily.\n\n## Contact\n\n- **Phone:** (503) 555-0142\n- **Address:** 2210 N Williams Ave, Portland, OR 97227\n\n## Hours\n\nMon–Fri 7am–6pm · Sat 8am–5pm · Sun 8am–2pm",
"listing": {
"name": "Northside Coffee Roasters",
"phone": "(503) 555-0142",
"address": "2210 N Williams Ave",
"city": "Portland",
"state": "OR",
"zip": "97227",
"country": "US",
"lat": 45.5401,
"lng": -122.6669,
"rating": 4.8,
"review_count": 214,
"price_range": "$$",
"hours": {
"monday": "7:00 AM-6:00 PM",
"tuesday": "7:00 AM-6:00 PM",
"wednesday": "7:00 AM-6:00 PM",
"thursday": "7:00 AM-6:00 PM",
"friday": "7:00 AM-6:00 PM",
"saturday": "8:00 AM-5:00 PM",
"sunday": "8:00 AM-2:00 PM"
},
"hero_image": "https://www.northside-roasters.example/images/cafe-downtown.jpg",
"_completeness": 0.92,
"_extraction_method": "json-ld"
},
"metadata": {
"fetchMethod": "plain",
"latencyMs": 487
},
"ok": true
}robots.txt
By default, SuperScraper follows the site's robots.txt, as described in RFC 9309. Send ignoreRobotsTxt: true to opt out (for example, for a site you own).
- Rules are matched on the path and query the engine will request. Percent-encoded letters and digits count as the plain characters (
/%70rivateis/private), while an encoded/(%2F) stays different from/. Paths are case-sensitive. - No
robots.txt(404 or 410), arobots.txtthat answers 401 or 403, and arobots.txtthat is a web page instead of a rules file all allow the request. - When
robots.txtcannot be read because the site answers 429 or 5xx, or does not answer in time, the request goes ahead by default. - A
Crawl-delayis honoured between requests to the same host, up to 10 seconds. - By default, when a page redirects to a new path or another site,
robots.txtis also checked for the new address, and a disallowed address ends the request withrobots_disallowed(not charged).
Rate limits
Requests per minute depend on your plan. See Rate limits.