Generate web page markdown
Convert a web page URL into clean markdown.
Headers
Get your API keyAPI key (`sfk_...`)
Web page URL to fetch.
min 1 chars · max 2083 chars
Markdown extraction filter. `fit`: strip boilerplate and extract the main readable content. `raw`: full unfiltered page markdown, no content pruning. `bm25`: rank and return only the content most relevant to `query`, using the BM25 keyword-relevance algorithm — requires `query` to be set.
one of: fit, raw, bm25
Optional query string used by the bm25 filter to rank relevant content.
max 500 chars
Cache behavior. `enabled`: read from cache if present, else fetch and write to cache. `bypass`: always fetch fresh, ignoring and not updating the cache. `write_only`: always fetch fresh, but write the result to cache without reading from it first. Default: `enabled`.
one of: enabled, bypass, write_only
When true, scroll the page to load dynamically appended content (infinite scroll). Default false.
Wait for a CSS selector before extraction. Must be prefixed with "css:" (e.g. css:main). JavaScript wait conditions are not supported.
max 200 chars
Most expensive proxy tier to use. The page is tried on `datacenter` first and moves up only if it is blocked, stopping at this tier. Default: every tier (`mobile`).
one of: datacenter, residential, mobile
Most credits this call may cost (1–25). Default 1, which loads about 1.6 MB on the datacenter proxy or 190 KB on residential or mobile. Raise it for heavy pages; you're charged only for what the page uses.
≥ 1 · ≤ 25
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.
Markdown content when lookupStatus is found; null when restricted.
Primary markdown text extracted from the page.
Filtered markdown optimized for LLM consumption.
Markdown with numbered citations for outbound links.
Reference list for cited links in the markdown output.
Page metadata such as title when available.
Links discovered on the page when available.
Same-host links discovered on the page.
Absolute or page-relative link href.
Anchor text when available.
Title attribute when available.
Cross-host links discovered on the page.
Absolute or page-relative link href.
Anchor text when available.
Title attribute when available.
Media assets discovered on the page when available.
Images on the page.
Image source URL.
Alt text when available.
Optional relevance score from the crawler.
Videos on the page.
Audio elements on the page.
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
Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.
one of: true
When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.
Code example
curl "https://api.socialfetch.dev/v1/web/markdown?url=https://www.socialfetch.dev" \
-H "x-api-key: $SOCIALFETCH_API_KEY"Responses
Markdown extraction result.