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 means bot protection or similar access controls blocked automated fetching.
one of: found, restricted
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
True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.
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://example.com/products","schema":{"name":"products","baseSelector":"div.product","fields":[{"name":"name","selector":"h2","type":"text"},{"name":"price","selector":".price","type":"text"}]}}' \
-X POSTResponses
Structured CSS extraction result.