Convert a web page URL into clean markdown.
Endpoint
/v1/web/markdown
Query
Web page URL to fetch.
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.
Optional query string used by the bm25 filter to rank relevant content.
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`.
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.
const response = await fetch( "https://api.socialfetch.dev/v1/web/markdown?url=https://www.socialfetch.dev", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);