Allscreenshots
Sign inGet an API key
Blog

Guide

Turn any URL into a screenshot, markdown, and structured data — in one call

Marcin SobolewskiUpdated 8 min read

You want a screenshot of a page, the page's main content as Markdown for an LLM, and a handful of meta tags for the product card. The usual route looks something like this:

  1. Spin up a headless browser and capture the screenshot.
  2. fetch() the same URL again, parse the HTML, grab <title>, OG tags, and favicons.
  3. Pipe the body through a Readability + Markdown converter.
  4. Ship all three to an LLM for the parts you couldn't extract with selectors.

Four hops. Two browsers, sometimes three. The screenshot and the scrape don't always see the same DOM. Cookie banners get dismissed between calls, modals appear, A/B tests reshuffle results. And every hop is its own line on someone's bill.

AllScreenshots' multi-output feature collapses the whole pipeline into one request. You list the formats you want; they come back from one browser session, billed as one screenshot.

The one-call alternative

Drop an outputs array onto a regular POST /v1/screenshots request and list the formats you need.

bash
curl -X POST 'https://api.allscreenshots.com/v1/screenshots' \ -H 'X-API-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://linear.app", "blockCookieBanners": true, "responseType": "url", "outputs": [ { "type": "screenshot", "format": "png" }, { "type": "markdown", "mainContentOnly": true }, { "type": "json", "schema": { "title": { "selector": "title", "type": "text" }, "description": { "selector": "meta[name=description]", "type": "attribute", "attribute": "content" }, "ogImage": { "selector": "meta[property=\"og:image\"]", "type": "attribute", "attribute": "content" }, "themeColor": { "selector": "meta[name=theme-color]", "type": "attribute", "attribute": "content" }, "favicon": { "selector": "link[rel~=icon]", "type": "attribute", "attribute": "href" } }} ] }'

What comes back, in under three seconds on real-world pages:

json
{ "url": "https://linear.app", "outputs": { "screenshot": { "storageUrl": "https://storage.allscreenshots.com/.../screenshot.png" }, "markdown": { "storageUrl": "https://storage.allscreenshots.com/.../markdown.md", "size": 15276 }, "json": { "data": { "title": "Linear – The system for product development", "description": "Purpose-built for planning and building products with AI agents.", "ogImage": "https://linear.app/static/og/homepage.jpg", "themeColor": "#08090a", "favicon": "/favicon.ico" } } }, "renderTimeMs": 2267 }

That's the whole "fetch + screenshot + parse + Markdown" pipeline, in one response, billed as one screenshot. The five output types you can ask for are screenshot, pdf, html, markdown, and json (the last one driven by your own CSS-selector schema).

Four things you can build with it

The shape of the response stays the same across all of these; only the schema changes.

1. Brand profile / onboarding auto-fill

Users paste their company URL at signup. You return with the company name, a short description, a logo image, the brand color, and the favicon — already in the form.

Schema:

json
{ "name": { "selector": "meta[property=\"og:site_name\"]", "type": "attribute", "attribute": "content" }, "tagline": { "selector": "meta[property=\"og:title\"]", "type": "attribute", "attribute": "content" }, "description": { "selector": "meta[name=description]", "type": "attribute", "attribute": "content" }, "logoImage": { "selector": "meta[property=\"og:image\"]", "type": "attribute", "attribute": "content" }, "themeColor": { "selector": "meta[name=theme-color]", "type": "attribute", "attribute": "content" } }

What selectors can't get (industry, a non-clichéd one-liner, audience) comes from sending the screenshot and the markdown to an LLM. The URL-first onboarding post covers the UX side: how to wire this into a signup form without it feeling like spooky autofill.

A rich card for any URL someone pastes into your app. Title, description, image (or a generated screenshot when there's no OG image), favicon for the source.

Schema:

json
{ "title": { "selector": "meta[property=\"og:title\"]", "type": "attribute", "attribute": "content" }, "description": { "selector": "meta[property=\"og:description\"]", "type": "attribute", "attribute": "content" }, "image": { "selector": "meta[property=\"og:image\"]", "type": "attribute", "attribute": "content" }, "favicon": { "selector": "link[rel~=icon]", "type": "attribute", "attribute": "href" }, "siteName": { "selector": "meta[property=\"og:site_name\"]", "type": "attribute", "attribute": "content" } }

The screenshot is your fallback when the page has no OG image. One request returns both the meta tags and that fallback image, so there's no second call to make.

3. Competitor / SEO snapshots

Every Monday, capture titles, meta descriptions, headings, and canonicals across a list of competitor URLs. Diff against last week. Alert when something changes.

Schema:

json
{ "title": { "selector": "title", "type": "text" }, "metaDesc": { "selector": "meta[name=description]", "type": "attribute", "attribute": "content" }, "canonical": { "selector": "link[rel=canonical]", "type": "attribute", "attribute": "href" }, "h1": { "selector": "h1", "type": "text", "multiple": true }, "h2": { "selector": "h2", "type": "text", "multiple": true } }

Pair it with scheduled jobs and you have a competitor-tracking pipeline without a scraping cluster.

4. Lead enrichment from a company URL

A sales-tool workflow: paste a prospect URL into the CRM, get back the company name, what they do, the hero copy, and a screenshot you can put on the deal card. The markdown is the LLM's input for industry classification and a one-line summary.

json
{ "company": { "selector": "meta[property=\"og:site_name\"]", "type": "attribute", "attribute": "content" }, "tagline": { "selector": "h1", "type": "text" }, "description": { "selector": "meta[name=description]", "type": "attribute", "attribute": "content" }, "ogImage": { "selector": "meta[property=\"og:image\"]", "type": "attribute", "attribute": "content" } }

Pairing with an LLM

The screenshot covers the visual brand and anything rendered after the page loads. The markdown is the cheap textual context. Pass both.

Claude (Anthropic SDK):

typescript
import Anthropic from '@anthropic-ai/sdk'; const message = await new Anthropic().messages.create({ model: 'claude-sonnet-4-6', max_tokens: 512, messages: [{ role: 'user', content: [ { type: 'image', source: { type: 'url', url: screenshotUrl } }, { type: 'text', text: `Return JSON: { industry, oneLineDescription, audience }.\n\n${markdown.slice(0, 8000)}` }, ], }], });

OpenAI SDK:

typescript
import OpenAI from 'openai'; const response = await new OpenAI().chat.completions.create({ model: 'gpt-4.1', response_format: { type: 'json_object' }, messages: [{ role: 'user', content: [ { type: 'image_url', image_url: { url: screenshotUrl } }, { type: 'text', text: `Return JSON: { industry, oneLineDescription, audience }.\n\n${markdown.slice(0, 8000)}` }, ], }], });

The markdown comes through with mainContentOnly: true, so navigation, footer, and cookie banners are stripped before it ever hits the LLM. You're not paying tokens to teach a model about someone's site footer.

A note on billing

A multi-output request counts as one screenshot against your monthly quota, no matter how many outputs you ask for. The browser session is the expensive part. Once the page is loaded, the markdown and the selectors come for free.

Where to go from here

Got a workflow that doesn't fit one of those four? Write your own schema. We're curious what you build.

Choose an automation workflow

Use screenshot automation for repeated captures and Google Sheets integration for a URL list maintained by your team. The bulk API handles queued batches; the scheduled capture guide covers cadence, delivery and change detection.

If you are replacing an existing provider, review the ScreenshotOne comparison or Urlbox comparison for current pricing sources, capture settings and a migration checklist. API authentication explains how to keep your key on the server.

Find out how easy it is to capture and share pixel-perfect screenshots at scale using Allscreenshots. Sign up for a free account and start integrating your first screenshot API call today.

Start with one request

Free plan: 100 screenshots. No credit card.

Get an API key
  • Full-page captures
  • Popups and repeated sticky bars removed
  • Markdown, JSON and PDF output
  • Crawl a site from one URL
  • Desktop, tablet and phone in one image
  • Works in n8n, Make and Zapier
  • MCP server for AI assistants