GET 25 FREE SCREENSHOTS PER MONTH  →
Custom JavaScript icon CUSTOM JAVASCRIPT

Run your own JavaScript before the screenshot.

Add code that fetches data, adds elements, or changes the page, then capture the result.

JAVASCRIPT 3 steps
  • fetch("/api/stats") fetch
  • document.body.prepend(banner) modify
  • await wait(500) wait
  • Capture the page result

Your code runs in the page, then the screenshot is taken.

Custom JavaScript for website screenshots

PagePixels Custom JavaScript runs your own code on a web page before the screenshot is taken. Fetch data, add or remove elements, expand sections, dismiss pop-ups, or set up the page state you need, then capture the result as an image.

Custom JavaScript works with scheduling, browser automations, full-page and CSS selector captures, and Real Locations. Add it in the web app, the API, or as a Run JavaScript step inside a browser automation.

WHAT YOU CAN DO

Set up the page exactly.

DOM

Change the page

Add, remove, or edit elements.

document.querySelector(…)
SET UP

Running in four steps.

  1. Create a screenshot

    Paste the page URL.

    + Create Screenshot
  2. Add your JavaScript

    In the JavaScript field.

    JavaScript Injection
  3. Test it

    Check the result.

    Take Screenshot
  4. Save

    Runs on every capture.

    Save Screenshot
WORKS WITH

Combine it with anything.

  1. 01 Browser automations javascript step
  2. 02 Custom CSS together
  3. 03 Full page expand first
  4. 04 CSS selector build an element
  5. 05 Scheduling every run
  6. 06 Disable JavaScript opposite option
WHAT TEAMS BUILD

What people script.

  • Every run

    Expand every section

    Open accordions before capture.

  • Reports

    Add a timestamp

    Stamp the time on each capture.

  • Data

    Render live numbers

    Fetch and show data in the page.

  • Cleanup

    Remove pop-ups

    Close modals before capture.

INCLUDED AT EVERY PRICE

Every PagePixels feature works with Custom JavaScript.

Free plan through 200,000 / mo
CAPTURE Browser automations Scheduled screenshots Real Locations in 150+ countries Ad, tracker, and banner removal CSS and JS injection
UNDERSTAND AI analysis Custom HTML screenshots HTML extraction
WATCH Change notifications Archived history CDN embed URLs
DELIVER Every integration + MCP server Full REST API with SDKs Custom headers and cookies
  • Where does the code run?

    In the page, before the screenshot.

  • Can I wait for my code?

    Yes, add a wait step after it.

  • Can I use it mid-flow?

    Yes, as a browser automation step.

  • Can I disable the page’s JavaScript instead?

    Yes, with Disable JavaScript.

FREE PLAN

Start free. Upgrade when you’re ready.

Every feature and integration is included on the free plan. No credit card and no phone number required.

Free $0 / month
25 screenshots every month
30.7 MB of Real Location proxy bandwidth
25 AI Analysis credits