Web

Generate web page markdown

Convert a web page URL into clean markdown.

get/v1/web/markdown

Request

  • Base URL: https://api.socialfetch.dev
  • URL: https://api.socialfetch.dev/v1/web/markdown
  • Auth: one of:
    • API key in header x-api-key
    • none

Query parameters

urlstring required

Web page URL to fetch.

filter'fit' | 'raw' | 'bm25'

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.

querystring

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

cacheMode'enabled' | 'bypass' | 'write_only'

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.

scanFullPageboolean

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

waitForstring

Wait for a CSS selector before extraction. Must be prefixed with "css:" (e.g. css:main). JavaScript wait conditions are not supported.

Response

Markdown extraction result.

Changes

No recorded changes to this operation across all 1 revision of this API.