Populate forms
Fill search boxes, login fields, filters, and other inputs.
Host a script at your own URL, reference it with script_url, and the browser executes it against the rendered page before capture — ideal for larger, reusable scripts. For a short snippet passed directly in the request, run inline JavaScript instead.
const input = document.querySelector(
'input[name=q]'
);
input.value = 'Car Rental';
input.form.submit();The script runs after the browser renders the page and before Add Screenshots creates the image.
Fill search boxes, login fields, filters, and other inputs.
Close consent banners, dialogs, and other obstructive UI.
Open tabs, accordions, menus, and application states.
Combine scripts with click, wait, scroll, and storage options.
Keep the script at a URL accessible to the capture browser and reference it with script_url.
Publish the file from your CDN, object storage, or another public HTTPS URL.
Include the encoded script location in a Screenshot API request or request template.
The browser executes the script, settles the page, and produces the screenshot.
This example enters "Car Rental" into Google search and submits the form before capture.
https://api.addscreenshots.com/screenshots
?apikey=YOUR_API_KEY
&script_url=https://example.com/google.js
&url=https://google.comconst input = document.querySelector('input[name=q]');
input.value = 'Car Rental';
input.form.submit();The hosted script has populated and submitted the search before the image is captured.

Create the API key, host the script, and reuse the same request in schedules or templates.