Markdown and extraction

Load a page in Chrome (JavaScript runs, so single-page apps work) and get its main content as clean Markdown: ready for LLMs, search indexing or archiving. 1 credit per page.

GET | POST/v1/markdown
GET | POST/v1/extract

/v1/markdown returns text/markdown. /v1/extract returns JSON with the Markdown plus metadata.

curl "https://shotlane.dev/v1/markdown?url=react.dev/learn" -H "X-API-Key: $SHOTLANE_API_KEY"

Options

ParameterDefaultDescription
url
html
—Page to load, or raw HTML.
main_contenttrueKeep just the main content, dropping navigation, footers, cookie text and ads. false converts the whole page.
selector—Convert only the first element that matches this CSS selector.
exclude_selectors—Comma-separated selectors removed first, e.g. nav,.comments.
include_imagesfalseKeep images as ![alt](src).
max_chars—Truncate the Markdown; JSON gets "truncated": true.
format—json (default on /v1/extract) or markdown (default on /v1/markdown).

Page options from screenshots work too: wait_until, wait_for_selector, delay, click, js, cookies, headers, hide_cookie_banners, block_ads, cache_ttl, proxy…

JSON output

curl "https://shotlane.dev/v1/extract?url=https://en.wikipedia.org/wiki/Headless_browser" -H "X-API-Key: $SHOTLANE_API_KEY"

{
  "url": "https://en.wikipedia.org/wiki/Headless_browser",
  "title": "Headless browser - Wikipedia",
  "description": "",
  "published": "2014-09-24",
  "markdown": "# Headless browser\n\nA **headless browser** is a [web browser](https://…) without a …",
  "word_count": 1077,
  "metadata": {"og:title": "…", "canonical": "…", "favicon": "…", "lang": "en", "status_code": 200}
}
JSON optionDefaultDescription
include_html
include_text
falseAdd the rendered html and/or plain text.

When the URL points to a PDF, it is downloaded and converted to Markdown; the JSON adds content_type and pages. Useful for agents reading papers, filings and manuals.

Without a key

Put shotlane.dev/md/ in front of any URL to get its Markdown, 20 times a day per IP without a key and with no limit when you send one. See keyless URLs.