Spreadsheets and data workflows
Use Google Apps Script to capture screenshots from spreadsheet data and write results back to cells. Perfect for enriching URL lists with screenshots, building monitoring dashboards, or generating visual reports from sheet data.
Install, configure, and start capturing.
In your Google Sheet, go to Extensions → Apps Script. This opens the script editor.
Use UrlFetchApp.fetch() to call the ScreenshotDEV API. Parse the JSON response to get the screenshot URL.
function captureScreenshot(url) {
var apiUrl = "https://api.screenshotdev.com/v1/screenshot"
+ "?url=" + encodeURIComponent(url)
+ "&access_key=ak_live_your_key"
+ "&format=png"
+ "&store=true";
var response = UrlFetchApp.fetch(apiUrl, {
muteHttpExceptions: true
});
var data = JSON.parse(response.getContentText());
return data.screenshot_url;
}Read URLs from column A, capture screenshots, and write the results to column B. Use =IMAGE() in column C to display thumbnails.
function captureAll() {
var sheet = SpreadsheetApp.getActiveSheet();
var urls = sheet.getRange("A2:A").getValues();
for (var i = 0; i < urls.length; i++) {
if (!urls[i][0]) continue; // skip empty rows
var screenshotUrl = captureScreenshot(urls[i][0]);
var row = i + 2;
// Write screenshot URL to column B
sheet.getRange(row, 2).setValue(screenshotUrl);
// Add =IMAGE() formula in column C
sheet.getRange(row, 3).setFormula(
'=IMAGE("' + screenshotUrl + '")'
);
}
}Go to Triggers in Apps Script (clock icon) to run the function on a schedule — hourly, daily, or weekly.
/**
* Capture screenshots for all URLs in column A.
* Writes screenshot URL to column B,
* =IMAGE() formula to column C.
*
* Column A: URL to capture
* Column B: Screenshot CDN URL (auto-filled)
* Column C: Inline thumbnail (auto-filled)
*/
var API_KEY = "ak_live_your_key";
function captureScreenshot(url) {
var apiUrl = "https://api.screenshotdev.com/v1/screenshot"
+ "?url=" + encodeURIComponent(url)
+ "&access_key=" + API_KEY
+ "&format=png"
+ "&store=true"
+ "&width=1280"
+ "&block_ads=true";
var response = UrlFetchApp.fetch(apiUrl, {
muteHttpExceptions: true
});
if (response.getResponseCode() !== 200) {
return "Error: " + response.getResponseCode();
}
var data = JSON.parse(response.getContentText());
return data.screenshot_url;
}
function captureAll() {
var sheet = SpreadsheetApp.getActiveSheet();
var lastRow = sheet.getLastRow();
if (lastRow < 2) return;
var urls = sheet.getRange(2, 1, lastRow - 1, 1).getValues();
for (var i = 0; i < urls.length; i++) {
var url = urls[i][0];
if (!url) continue;
var row = i + 2;
// Skip if already captured
var existing = sheet.getRange(row, 2).getValue();
if (existing) continue;
var screenshotUrl = captureScreenshot(url);
sheet.getRange(row, 2).setValue(screenshotUrl);
sheet.getRange(row, 3).setFormula(
'=IMAGE("' + screenshotUrl + '")'
);
// Respect rate limits
Utilities.sleep(500);
}
}
/**
* Add a custom menu to trigger manually.
*/
function onOpen() {
SpreadsheetApp.getUi()
.createMenu("ScreenshotDEV")
.addItem("Capture all URLs", "captureAll")
.addToUi();
}Pro tip: Add a custom menu with onOpen() so anyone with the sheet can trigger captures manually. Use Utilities.sleep(500) between requests to respect rate limits.
No credit card required
Paste a list of URLs and automatically enrich each row with a screenshot thumbnail. Great for lead research and prospecting.
Track multiple pages in a sheet. Schedule daily captures and see visual changes over time.
Generate screenshots for a batch of URLs — product pages, blog posts, or landing pages — and export the CDN URLs.
Capture client websites periodically and embed thumbnails in shared sheets for visual progress tracking.
100 free API calls per month. No credit card. No complex setup.