Write, share, and carry your context everywhere. Create your free account today.

06 Variables and Filters

Raw

Web Clipper: Variables and Filters

Variables pull data out of a page. Filters reshape it. Together they are how a template turns a web page into the document you actually want.

Preset variables

Automatically pulled from every page:

VariableWhat it gives you
titleThe page title
authorThe author, where the page declares one
descriptionThe page description
publishedThe published date
domainThe site's domain
urlThe full URL
contentThe extracted article content
highlightsYour saved highlights
selectionThe text you had selected
imageThe social/share image
word countThe length of the article

Meta variables

Read any <meta> tag or Open Graph tag from the page. Anything the page tells crawlers about itself, you can use.

Selector variables

Extract any element's text or HTML using a CSS selector.

This is the escape hatch. When a page holds something no preset covers — a price, a rating, a byline in an unusual place — a selector gets it. It is also the most fragile approach, since it breaks when the site changes its markup. Prefer schema.org or meta variables where they exist.

Schema.org variables

Read the structured data embedded in the page. Many sites publish rich, reliable schema.org data — recipes, products, articles, events — and reading it is far more robust than scraping the rendered HTML.

If a page has schema.org data, use it. It is the most stable source available.

Filters

A large library transforms variable values:

  • Date formatting.
  • Case conversion.
  • Markdown conversion — turn extracted HTML into clean markdown.
  • List, table and callout formatting — turn an array into a bulleted list, a table, or a callout block.
  • Math.
  • Array and object manipulation — map, filter, join, pick.
  • HTML cleanup.

Filters chain, so you can take a raw value, clean it, reshape it, and format it in one expression.

Debugging

Inspect the page variables available for templates before clipping. It shows what the page actually exposes on this page.

When a template produces something wrong, this is the first place to look. Usually the variable you assumed exists simply is not there — the page never declared an author, or the published date is in an unexpected format.

A practical approach

  1. Inspect the variables on a page you clip often.
  2. Prefer schema.org, then meta, then selectors — in that order of robustness.
  3. Add filters to tidy the output.
  4. Reach for a prompt variable (08 AI Interpreter) only when the information genuinely is not in the page's data — a summary, a judgement, a categorization. Do not use a language model to extract something a meta tag already states exactly.