Web

Generate web page markdown

Convert a web page URL into clean markdown.

GET/v1/web/markdown
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
6
urlstringrequiredquery

Web page URL to fetch.

min 1 chars · max 2083 chars

filterstringoptionalquery

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

querystringoptionalquery

Optional query string used by the bm25 filter to rank relevant content.

max 500 chars

cacheModestringoptionalquery

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

scanFullPagebooleanoptionalquery

When true, scroll the page to load dynamically appended content (infinite scroll). Default false.

waitForstringoptionalquery

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

Response fields
37

Endpoint-specific response payload.

datalookupStatus
string

Whether page content could be extracted. Restricted means bot protection or similar access controls blocked automated fetching.

one of: found, restricted

dataurl
string

URL that was fetched.

datastatus
integernullable

HTTP status code reported for the page fetch when available; null when restricted.

Markdown content when lookupStatus is found; null when restricted.

datamarkdownraw
string

Primary markdown text extracted from the page.

datamarkdownfit
stringoptional

Filtered markdown optimized for LLM consumption.

datamarkdownwithCitations
stringoptional

Markdown with numbered citations for outbound links.

datamarkdownreferences
stringoptional

Reference list for cited links in the markdown output.

datametadata
objectoptional

Page metadata such as title when available.

Links discovered on the page when available.

Same-host links discovered on the page.

datalinksinternal[]href
string

Absolute or page-relative link href.

datalinksinternal[]text
stringoptional

Anchor text when available.

datalinksinternal[]title
stringoptional

Title attribute when available.

Cross-host links discovered on the page.

datalinksexternal[]href
string

Absolute or page-relative link href.

datalinksexternal[]text
stringoptional

Anchor text when available.

datalinksexternal[]title
stringoptional

Title attribute when available.

Media assets discovered on the page when available.

Images on the page.

datamediaimages[]src
string

Image source URL.

datamediaimages[]alt
stringoptional

Alt text when available.

datamediaimages[]score
numberoptional

Optional relevance score from the crawler.

Videos on the page.

datamediavideos[]src
string
datamediavideos[]alt
stringoptional
datamediavideos[]score
numberoptional

Audio elements on the page.

datamediaaudios[]src
string
datamediaaudios[]alt
stringoptional
datamediaaudios[]score
numberoptional

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metacached
booleanoptional

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/markdown?url=https://www.socialfetch.dev" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Markdown extraction result.