Keyword: product page screenshot API
Product Page Screenshot API: Capture Price, Stock, and Promo Evidence
Ecommerce teams do not only need to know that a product page returned HTML. They need proof of what a shopper saw: the visible price, stock state, sale badge, selected variant, shipping promise, and the surrounding layout. This guide shows how to build that evidence record with SnapshotFlow.
Why Product-Page Evidence Matters in 2026
Product data accuracy is a practical revenue problem. Google Merchant Center documents automatic updates for price, sale price, availability, and condition because landing-page mismatches can affect Shopping ads and free listings. Shopify's current Storefront API docs also highlight local pricing through the @inContext directive, which means the same product can expose different prices by market.
Structured data is still important: Schema.org's Offer and price properties give crawlers and commerce systems machine-readable price and availability hints. But a QA or operations reviewer often needs the rendered page as well, because crossed-out prices, member-only badges, discount callouts, variant selectors, and stock messaging are visual.
That is the gap a screenshot API fills. SnapshotFlow can render the page in Chromium, wait for the product region, capture the pixels, and return rendered text or metadata with the same request.
Sources: Google Merchant Center automatic updates, Shopify Storefront product query, Schema.org Offer, and Schema.org price.
What to Capture on a Product Page
| Evidence | SnapshotFlow setting | Why it helps |
|---|---|---|
| Visible product region | selector=main or a product-card selector |
Keeps the evidence focused on the price, stock, variant, and CTA instead of the whole page. |
| Hydrated price and stock | wait_for_selector=.product-price |
Waits for JavaScript-rendered commerce data before capture. |
| Fresh state | cache=false |
Avoids using an older cached capture when price or stock can change. |
| Reviewable text | extract_content=true and content_format=markdown |
Stores rendered page text beside the image so reviewers can search and parse the record. |
| Noisy UI cleanup | block_cookie_banners=true and hide_selectors |
Removes overlays, review carousels, or recommendations that hide the product state. |
Do not use screenshots as your only source of truth for accounting, repricing, or inventory writes. Use your commerce API or database for authoritative values; use SnapshotFlow for visual evidence and rendered-page verification.
A cURL Workflow for Product-Page Evidence
This request returns a JSON payload with a base64 WebP screenshot, the final URL, capture metadata, and rendered Markdown content.
curl "https://api.snapshotflow.com/screenshot\
?url=https%3A%2F%2Fstore.example.com%2Fproducts%2Fwool-sweater\
&response_type=base64\
&format=webp\
&width=1440\
&height=1200\
&selector=main\
&wait_for_selector=.product-price\
&cache=false\
&block_cookie_banners=true\
&extract_content=true\
&content_format=markdown\
&metadata=true" \
-H "X-Api-Key: $SNAPSHOTFLOW_API_KEY"
Expected behavior: SnapshotFlow renders the URL in Chromium, waits up to 10 seconds for .product-price, captures the main element as WebP, and returns JSON. If the selector never appears, the API returns SELECTOR_NOT_FOUND. If the page cannot be reached, expect NAVIGATION_FAILED or TIMEOUT. Failed captures are not useful evidence records; store the error separately and retry only when it is operationally safe.
Node.js Example With the SnapshotFlow SDK
The SDK uses camelCase option names and converts them to the API's snake_case query parameters.
import { SnapshotFlow } from "snapshotflow";
import { writeFile } from "node:fs/promises";
const client = new SnapshotFlow({
apiKey: process.env.SNAPSHOTFLOW_API_KEY,
});
const evidence = await client.takeJson({
url: "https://store.example.com/products/wool-sweater",
responseType: "base64",
format: "webp",
width: 1440,
height: 1200,
selector: "main",
waitForSelector: ".product-price",
cache: false,
blockCookieBanners: true,
hideSelectors: [".recommendations", ".live-chat-widget"],
extractContent: true,
contentFormat: "markdown",
metadata: true,
});
const [, encoded] = evidence.image.split(",");
await writeFile("product-page.webp", Buffer.from(encoded, "base64"));
console.log({
url: evidence.url,
format: evidence.format,
capturedAt: evidence.takenAt,
title: evidence.metadata?.title,
textPreview: evidence.content?.slice(0, 500),
});
If a human reviewer needs a link instead of an embedded image, use client.takeUrl() with the same render settings. That returns a hosted screenshot URL as plain text. If your pipeline needs both a hosted URL and extracted Markdown in the same internal record, treat that as an application-level record that stores the URL plus a JSON capture result.
Operational Edge Cases
- Variant state: product pages often change price after a size, color, country, or subscription option is selected. Use
click, query parameters, cookies, or a dedicated product URL when the page supports it. - Regional pricing: SnapshotFlow can set browser geolocation, timezone, viewport, cookies, headers, and user agent. That is not the same as IP-based country routing. Do not claim region verification unless your localization mechanism is actually controlled by those inputs.
- Authenticated storefronts: for preview stores or B2B price lists, pass cookies or authorization headers. For private networks, run SnapshotFlow self-hosted where the target is reachable.
- Cookie and promo overlays: try
block_cookie_banners=truefirst. Usehide_selectorsonly when the overlay is not part of the evidence you need to review. - Diffing later: this workflow creates the evidence record. If you also need automatic before/after comparison, pair it with SnapshotFlow's website change detection workflow.
Where This Fits in a Commerce Stack
A practical setup is simple: your scheduler or job queue selects product URLs, SnapshotFlow captures evidence, your app stores the screenshot and Markdown, and a reviewer sees only exceptions. The screenshot answers "what did the page show?" while your product API answers "what should the page show?"
For large catalogs, batch URLs into controlled groups and keep error handling per product. If the goal is visual comparison rather than a single evidence record, use batch screenshots for collection runs or visual regression testing for release gates.
FAQ
Can SnapshotFlow extract a structured price field from every product page?
No. SnapshotFlow can return rendered page text as Markdown, HTML, or plain text alongside a screenshot. Your application should parse and validate product fields from that content, structured data, or your own commerce API.
Should I use response_type=url or response_type=base64?
Use response_type=url for a reviewer-friendly hosted image link. Use response_type=base64 when your service wants to store the image, rendered text, and metadata in one JSON evidence record.
Can this replace Merchant Center, Shopify, or product-feed validation?
No. Use Merchant Center, Shopify, your product database, or your feed pipeline as the authoritative data source. SnapshotFlow adds browser-rendered visual evidence so teams can review what customers and crawlers may see on the page.
Capture Product Evidence With SnapshotFlow
Start with one product URL, pin the selector and viewport, then store the screenshot and rendered text next to your product data. When you are ready to compare product pages over time, add the diff workflow.