Extract structured data from a web page
Extract structured fields from a web page using a CSS selector schema.
Headers
Get your API keyAPI key (`sfk_...`)
Request body
Endpoint-specific response payload.
Whether page content could be extracted. `restricted`: bot protection blocked the page on every proxy tier allowed. `budget_exceeded`: the page needed more than `maxCredits` allows before any content loaded.
one of: found, restricted, budget_exceeded
Proxy tier the page was loaded on: the tier that served it, or the last one tried. Null when not measured.
one of: datacenter, residential, mobile, null
Whether the page needed more than `maxCredits` allows. Loading stopped early, so content may be incomplete.
Data the page loaded through the proxy, in bytes, across every tier tried. Null when not measured.
≥ 0
URL that was fetched.
HTTP status code reported for the page fetch when available; null when restricted.
Structured rows extracted via CSS schema when lookupStatus is found; null when restricted.
Page metadata such as title when available.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/web/extract" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.socialfetch.dev/","schema":{"name":"socialfetch_home","baseSelector":"main","fields":[{"name":"headline","selector":"h1","type":"text"},{"name":"description","selector":"p","type":"text"}]}}' \
-X POSTResponses
Structured CSS extraction result.