Use Case

Extract data from any web page — alongside the screenshot

Screenshot and scrape in one request. Use JavaScript trackers to pull structured values — prices, rankings, view counts, or any DOM element — and get them back in the same API response as the screenshot.

How it works

One request, screenshot plus data

Trackers are JavaScript snippets attached to a screenshot request. When the page is fully rendered, each tracker's JavaScript expression is evaluated against the live DOM and the result is returned alongside the screenshot URL in the API response.

Because trackers run after the page has fully rendered — including JavaScript-driven content — they work on dynamic SPAs, infinite scroll pages, and content loaded via AJAX, not just static HTML.

  • Run multiple trackers per request in a single API call
  • Works on JavaScript-rendered and SPA content
  • Reuse tracker definitions with the input variable
  • Combine with automation steps for authenticated pages
  • Returns screenshot evidence with every data point
API response — trackers
{
  "id": 48291,
  "status": "finished",
  "storage_url": "https://...",
  "trackers": [
    {
      "id": "page_title",
      "name": "Page Title",
      "value_type": "string",
      "return": [{
        "found": 1,
        "shot": 1,
        "name": "Page Title",
        "value": "My SaaS Dashboard"
      }]
    },
    {
      "id": "price",
      "name": "Product Price",
      "value_type": "number",
      "return": [{
        "found": 1,
        "shot": 1,
        "name": "Product Price",
        "value": "49.99"
      }]
    }
  ]
}

API Example

Capture a page and extract values in one call

Pass trackers alongside any screenshot request. Each tracker runs against the fully rendered DOM after the page loads.

curl -X POST https://api.screenshotcenter.com/v1/screenshot \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/product/B09ABC1234",
    "trackers": [
      {
        "id": "product_price",
        "name": "Product Price",
        "name_type": "string",
        "value": "document.querySelector(\".price\").textContent",
        "value_type": "number"
      },
      {
        "id": "in_stock",
        "name": "In Stock",
        "name_type": "string",
        "selector": ".availability",
        "value": "document.querySelector(\".availability\").textContent",
        "value_type": "string"
      },
      {
        "id": "page_title",
        "name": "Page Title",
        "name_type": "string",
        "value": "document.title",
        "value_type": "string"
      }
    ],
    "size": "page",
    "format": "png"
  }'

Use Cases

What teams extract with page trackers

Trackers turn every screenshot into a structured data point. Here are the most common workflows teams automate when they combine page capture with data extraction.

🛒

Price and inventory monitoring

Track product prices, stock status, and delivery dates across competitor or supplier pages in real time. Combine the screenshot with extracted price data for a complete audit trail.

  • Monitor competitor pricing on Amazon, eBay, or your own category
  • Alert when a product goes out of stock or back in stock
  • Track promotional pricing and discount windows
📈

SEO rank tracking

Capture Google search result pages and extract your site's position for any keyword. Get both the visual evidence and the numeric rank in one API call.

  • Track your domain's SERP position for target keywords
  • Monitor rank changes after on-page or link-building changes
  • Compare rankings across different countries by routing captures through different regions
🛍️

Amazon product rank monitoring

Extract a product's category rank and search position from Amazon pages. Correlate rank fluctuations with campaigns, reviews, and price changes using timestamped screenshots.

  • Track Best Seller Rank in your product category
  • Monitor search rank for specific product IDs
  • Alert on rank drops before they impact revenue
📊

Social media and content metrics

Pull view counts, like counts, subscriber numbers, and engagement metrics from public social pages alongside a screenshot — no platform API required.

  • YouTube video view counts and like counts
  • Twitter/X retweet, like, and quote-tweet counts
  • LinkedIn post engagement for brand monitoring
🔍

Content change detection

Extract text values from specific page elements — headlines, prices, version numbers, legal notices — and detect changes over time without image diffing.

  • Monitor when a competitor's homepage headline changes
  • Track software version numbers on download pages
  • Alert when terms of service or legal pages are updated
📡

Competitive intelligence

Systematically collect structured data points from competitor pages at scale. Enrich your competitive database with fresh, time-stamped values without building a separate scraper.

  • Pricing intelligence across SaaS competitor pages
  • Feature availability tracking from competitors' feature tables
  • Job posting counts as a growth signal

Tracker Parameters

Tracker definition reference

Each tracker is a JSON object sent in the trackers array. Required fields are id, name, and value.

FieldRequiredDescription
idrequiredUnique identifier for this tracker in the response
namerequiredFixed label, or JavaScript to compute a label from the page
valuerequiredJavaScript expression that returns the value to extract
name_typeoptional"string" (default) or "javascript" — whether name is code or a fixed string
value_typeoptional"string" (default) or "number" — whether to cast the returned value
selectoroptionalCSS selector or XPath that must be present for the tracker to run
inputoptionalPlaceholder variable substituted into name, value, and selector as <input>

Ready-to-Use Examples

Copy-paste tracker definitions

Drop these tracker definitions directly into your API request. Each one targets a specific data point on well-known platforms.

Page title
{
  "id": "page_title",
  "name": "Page Title",
  "name_type": "string",
  "value": "document.title",
  "value_type": "string"
}
Google search rank
{
  "id": "google_search_rank",
  "name": "document.querySelectorAll('input[aria-label]')[0].value",
  "name_type": "javascript",
  "selector": "a[href*='<input>']",
  "input": "example.com",
  "value": "(function(){
    var cls = document.querySelectorAll(\"a[href*='<input>'] > h3\")[0]
              .getAttribute('class').split(' ').join('.');
    return Array.from(document.querySelectorAll(`a > h3.${cls}`))
      .filter(x => x.offsetParent != null)
      .findIndex(x => x.parentNode.href.includes('<input>')) + 1;
  })()",
  "value_type": "number"
}
Amazon product rank
{
  "id": "amazon_category_rank",
  "name": "document.querySelectorAll('h1')[0].textContent",
  "name_type": "javascript",
  "input": "B09ABC1234",
  "selector": "//*[@id='<input>']",
  "value": "document.evaluate(
    '//*[@id=\"<input>\"]',document,null,
    XPathResult.FIRST_ORDERED_NODE_TYPE,null
  ).singleNodeValue.parentNode.parentNode
   .querySelectorAll('span')[0].textContent",
  "value_type": "number"
}
YouTube view count
{
  "id": "youtube_views",
  "name": "document.querySelectorAll(
    '#title > h1 > yt-formatted-string')[0].textContent + ' (Views)'",
  "name_type": "javascript",
  "value": "document.querySelectorAll(
    'span.view-count')[0].textContent",
  "value_type": "number"
}

Advanced Pattern

Combine trackers with automation steps

Use automation steps to log in, navigate, or interact with the page before trackers run. This lets you extract data from authenticated dashboards, gated reports, or multi-step checkout flows — all in a single API request.

  • Log in to a SaaS product and extract your current MRR or user count
  • Navigate a client portal and extract invoice totals
  • Accept a cookie banner, then track product prices on a live shop
Read: Screenshot pages behind a login →
curl -X POST https://api.screenshotcenter.com/v1/screenshot \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://app.example.com/login",
    "steps": [
      {"command": "type",     "element": "#email",    "value": "[email protected]"},
      {"command": "type",     "element": "#password", "value": "your-password"},
      {"command": "click",    "element": "#submit"},
      {"command": "sleep",    "value": "3"},
      {"command": "navigate", "value": "https://app.example.com/dashboard"},
      {"command": "sleep",    "value": "2"}
    ],
    "trackers": [
      {
        "id": "mrr",
        "name": "Monthly Recurring Revenue",
        "name_type": "string",
        "selector": ".mrr-value",
        "value": "document.querySelector(\".mrr-value\").textContent",
        "value_type": "number"
      }
    ]
  }'

Start extracting data alongside screenshots

Get 500 free captures to test trackers in your workflow. No credit card required. Define your first tracker in minutes — no separate scraping infrastructure needed.

Frequently asked questions

What JavaScript context does the tracker run in?

Trackers run inside the fully rendered Chromium page, with access to the complete DOM, including elements rendered by JavaScript frameworks. The same context as if you typed code into the browser DevTools console.

Can I run multiple trackers in a single request?

Yes. Pass an array of tracker objects to the trackers parameter. All trackers run against the same rendered page and results are returned together in the response.

What does the response look like?

Each tracker in the response includes a return array. Each entry has found (1 or 0), shot (shot index), name, and value. If the selector was not found on the page, found is 0 and no value is returned.

Can I use trackers with automation steps?

Yes. Trackers and steps work together. You can log in, navigate to a dashboard, wait for data to load, and then extract values — all in a single API request.

What is the input variable used for?

The <input> placeholder lets you write a reusable tracker definition and substitute a specific value at runtime — for example, a product ID or domain name — without duplicating the JavaScript for each target.

Can I extract data without taking a screenshot?

Trackers always run alongside a screenshot capture. The screenshot provides visual evidence and context for the extracted data, which is useful for audits, monitoring, and compliance workflows.