October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Mountain View desk8 min

How to Capture Bulk Screenshots of URLs from Google Sheets with Apps Script

Turn a Google Sheet URL list into a resumable screenshot workflow with Apps Script and a browser-rendering API.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Google Sheets as a URL queue, Apps Script to validate rows and call a browser-based screenshot API, and the sheet (or Drive) to store the results. UrlFetchApp sends HTTP requests; it is not a dependable browser renderer for modern JavaScript-heavy pages. The API must do the rendering, while your script handles batching, errors, and output.

Set up the sheet and choose where screenshots go

Use one row per page and keep the input and results in separate columns. For example:

As an Amazon Associate I earn from qualifying purchases.

Column Purpose Example
A Input URL https://example.com/
B Status Pending, OK, or an error summary
C Screenshot Inserted image, public image URL, or Drive link
D Error details HTTP status or validation message

Choose the output method before writing the capture loop; the provider’s response format and image size determine which methods work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Insert the image blob over the grid

When the API returns image bytes, Apps Script can place them at a sheet row and column with Sheet.insertImage(blob, column, row). Google documents a maximum supported blob size of 2 MB for this method. Check the response content type and size before insertion. An over-grid image is positioned on top of cells; it is not text stored inside the screenshot cell.

#1 Best Overall

Put a public image URL in the sheet

A URL avoids moving the image blob through the script for display, but Google’s URL-based image insertion requires a publicly accessible URL. Do not expose private page captures merely to make the image render. Review both the provider’s access model and the content’s sensitivity.

Save a Drive copy and record its link

DriveApp.createFile(blob) can create a Drive file from the returned image. This is useful when the sheet should contain a link rather than an image over every row. It requires Drive authorization; the method does not decide who can access the file. Set and review sharing deliberately.

Choose a screenshot API that fits the job

Before implementing the request, verify the selected provider’s current API endpoint, authentication method, accepted parameters, output format, limits, and data-handling terms. A screenshot provider should render the page in a browser and return either image bytes or an image URL; ordinary Apps Script fetching does not supply that browser rendering.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Rendering: Check JavaScript completion, wait conditions, viewport and device options, full-page capture, and whether login or custom headers are supported.
  • Output: Confirm the returned format and dimensions, whether the API returns bytes or a hosted URL, and whether its image sizes fit the chosen sheet or Drive route.
  • Throughput: Check API rate limits, latency, retry guidance, and plan limits. Apps Script quotas do not override provider limits.
  • Storage and access: Find out whether hosted URLs expire, how captures are retained, and where page rendering and storage occur. Do not assume a geographic or retention guarantee.
  • Secrets and errors: Determine how API keys should be stored and how the service identifies throttling, failed page loads, and non-image responses.

ScreenshotNeo is one browser-based option: it offers clean captures that remove supported consent banners, popups, and chat widgets, and bills only clean shots.

Build a resumable Apps Script workflow

The example below shows the control flow, not a provider-specific request. Replace the marked request function with the screenshot API’s documented endpoint, authentication, parameters, and response handling. No third-party endpoint or parameter names are assumed here. This version expects the function to return an image blob and records a status for each processed row.

  1. Open the script editor: In the spreadsheet, select Extensions > Apps Script, then create a script bound to the spreadsheet.
  2. Set the API key securely: Use the service’s documented secret-handling approach. Do not put a live key in a cell that collaborators can read. If using Script Properties, add the key in the project settings and read it with PropertiesService.
  3. Start with a small chunk: Test a few URLs and inspect the result rows, response types, and execution duration before increasing the chunk.
  4. Run the function and authorize it: Apps Script will request access needed for external requests and spreadsheet edits. Drive authorization is needed only if you add Drive file creation.

Example script:

const SHEET_NAME = 'Sheet1';
const FIRST_DATA_ROW = 2;
const CHUNK_SIZE = 10;

function captureNextChunk() {
  const sheet = SpreadsheetApp.getActive().getSheetByName(SHEET_NAME);
  if (!sheet) throw new Error(`Sheet not found: ${SHEET_NAME}`);

  const lastRow = sheet.getLastRow();
  if (lastRow < FIRST_DATA_ROW) return;

  const props = PropertiesService.getScriptProperties();
  const nextRow = Math.max(
    FIRST_DATA_ROW,
    Number(props.getProperty('NEXT_ROW') || FIRST_DATA_ROW)
  );
  const endRow = Math.min(lastRow, nextRow + CHUNK_SIZE - 1);
  const rows = sheet.getRange(nextRow, 1, endRow - nextRow + 1, 4).getValues();

  rows.forEach((row, index) => {
    const sheetRow = nextRow + index;
    const rawUrl = String(row[0] || '').trim();
    if (!rawUrl) {
      sheet.getRange(sheetRow, 2).setValue('Skipped: blank URL');
      return;
    }

    let url;
    try {
      url = validateHttpUrl_(rawUrl);
    } catch (err) {
      sheet.getRange(sheetRow, 2).setValue('Error: invalid URL');
      sheet.getRange(sheetRow, 4).setValue(String(err.message || err));
      return;
    }

    try {
      const imageBlob = requestScreenshotBlob_(url);
      const bytes = imageBlob.getBytes();
      const contentType = String(imageBlob.getContentType() || '').toLowerCase();
      if (!contentType.startsWith('image/')) {
        throw new Error(`Expected image content, received ${contentType || 'unknown type'}`);
      }
      if (bytes.length > 2 * 1024 * 1024) {
        throw new Error(`Image is ${bytes.length} bytes; insertImage supports blobs up to 2 MB`);
      }
      sheet.insertImage(imageBlob, 3, sheetRow);
      sheet.getRange(sheetRow, 2).setValue('OK');
      sheet.getRange(sheetRow, 4).clearContent();
    } catch (err) {
      sheet.getRange(sheetRow, 2).setValue('Error');
      sheet.getRange(sheetRow, 4).setValue(String(err.message || err));
    }
  });

  const followingRow = endRow + 1;
  if (followingRow <= lastRow) {
    props.setProperty('NEXT_ROW', String(followingRow));
  } else {
    props.deleteProperty('NEXT_ROW');
  }
}

function validateHttpUrl_(value) {
  let parsed;
  try {
    parsed = new URL(value);
  } catch (err) {
    throw new Error('Enter a complete URL, including https:// or http://');
  }
  if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {
    throw new Error('Only http:// and https:// URLs are accepted');
  }
  return parsed.toString();
}

function requestScreenshotBlob_(url) {
  // Replace this function with the selected provider's documented API call.
  // Return its verified image response as a Blob. Do not use the page URL
  // itself as an image response: UrlFetchApp does not render the page.
  throw new Error('Configure a screenshot provider API request first');
}

The request stub intentionally throws an error rather than pretending a generic endpoint exists. Implement it from the provider’s live documentation. A robust implementation should inspect the HTTP response code and content type before converting response content to a blob; use muteHttpExceptions: true when you need to read non-success response codes and write them to the row instead of aborting immediately.

Rank #2
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Authenticate and grant only needed access

Apps Script’s URL Fetch service requires the https://www.googleapis.com/auth/script.external_request scope. With an explicit scope list, include it; otherwise Apps Script may infer required scopes. Spreadsheet edits require spreadsheet access. Drive file creation requires Drive authorization. Expect an authorization prompt when first running a script that sends external requests or creates files.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Resume rather than run the whole list at once

Apps Script documents a six-minute execution limit for consumer and Workspace accounts. Its quota page lists 20,000 URL Fetch calls per day for consumer accounts and 100,000 per day for Workspace accounts; Google notes limits can change. Those figures are service limits, not guaranteed screenshot totals: provider limits, page-render latency, retries, output size, and other script work may constrain a run first.

The sample stores the next row in Script Properties and processes a conservative chunk. Choose a chunk size from observed execution times and the provider’s current throttling behavior, not from a universal rule. For many URLs, run the function again or arrange a time-based continuation after checking your account’s trigger restrictions. Do not assume an edit trigger is appropriate for slow network work.

Use fetchAll only when it helps

UrlFetchApp.fetchAll() can issue multiple independent requests and returns their responses, so it may reduce waiting when pages can be captured concurrently. It does not bypass provider rate limits, Apps Script quotas, or execution limits. Sequential calls are simpler to pace and associate with rows, especially when the provider throttles or individual failures need careful recovery.

Handle privacy and network access deliberately

Apps Script URL Fetch requests originate from Google’s network infrastructure and a set pool of Google IP ranges. A destination website may block automated traffic or Google-originating IPs. That is separate from the screenshot provider’s browser request: check the provider’s own documentation for its rendering location and access behavior instead of inferring them from Apps Script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.

A screenshot can expose account-specific, personal, or confidential content. Before sending URLs to an external service or saving public images, check organizational rules, the provider’s retention and geographic processing terms, and the sharing permissions on any Drive files.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot failed rows

Symptom Likely cause What to do
Blank or malformed URL The input cell is empty or lacks a complete HTTP or HTTPS URL. Correct the cell and rerun that row; validate before making an API request.
Provider returns an HTTP error Authentication, unsupported parameters, quota, or provider-side failure. Record the status and response details, then check the provider’s current API documentation and account limits.
Response is not an image The request returned an error page, JSON, or an image URL rather than image bytes. Check content type and response body; handle the provider’s documented response format instead of inserting it as a blob.
Image is too large for insertion The blob exceeds the documented 2 MB limit for insertImage. Choose a smaller capture if supported, save through another suitable route, or record an accessible URL instead.
Timeout or slow run Page rendering, a large chunk, or retries consume execution time. Reduce the chunk, record completed rows, and resume later. Avoid rerunning successful rows unnecessarily.
Rate limited The provider received requests faster than its current allowance. Reduce concurrency, pace requests, and use the provider’s documented retry guidance.
Page requires login or is blocked The target needs authentication, rejects automated access, or blocks the rendering network. Verify whether the provider supports the required cookies or headers and whether capture is permitted. Do not put account credentials in a public sheet.
Script stops partway through Runtime limit, an uncaught exception, or authorization issue. Write errors per row, persist a checkpoint, authorize the required scope, and restart from the next pending row.

Or skip the browser setup

ScreenshotNeo can take the browser-rendering step through one GET request. Its clean-shot options accept consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

Example cURL request (replace the URL with the target page):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for key setup and request options. Its plan includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Sign up for the free plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can Apps Script itself take a screenshot of a web page?

No. UrlFetchApp makes HTTP requests; use a browser-rendering service for the screenshot.

Can I insert a private screenshot using its image URL?

Google’s URL-based image insertion requires a publicly accessible URL. Keep private captures private and use an appropriate blob or Drive workflow instead.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$245.99
Bestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$285.00

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.