October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix 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 Use a Screenshot API from Google Sheets to Capture URLs

Use Apps Script to fetch screenshot API results for URLs in Google Sheets, insert image blobs, and handle batch limits, errors, and security.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Google Sheets does not render a webpage just because a cell contains its URL. To capture a page, use Apps Script to send the URL to a browser-based screenshot API, retrieve the returned image, and insert it into the sheet—or store a hosted image URL that the sheet can display. The example below creates floating images beside the corresponding URLs and records HTTP errors per row.

How the workflow fits together

A webpage URL tells a browser what to load; it is not itself an image. Google Apps Script can make HTTP requests with UrlFetchApp, while a sheet can insert an image blob as a floating image or display an image from a supported URL. The screenshot API handles browser rendering; Apps Script connects its result to the spreadsheet. Google’s UrlFetchApp reference and Sheet reference document those separate pieces.

This example expects URLs in column A starting at A2, and places floating images over column B. It stores the API key in Script Properties, checks the response code, skips blank rows, and limits each run to a small batch. ScreenshotNeo is used for the concrete request; its API accepts one GET request with a URL and returns an image or PDF. See the ScreenshotNeo API documentation for request options.

Set up Apps Script and the API key

  1. In the spreadsheet, choose Extensions → Apps Script.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    #1 Best Overall
    Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
    • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
    • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
    • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
    • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
    • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  2. In the Apps Script project, open Project Settings and add a Script Property named SCREENSHOTNEO_API_KEY with your ScreenshotNeo API key as its value. Do not put the key in a cell or a public formula.

  3. Replace the project’s code with the example below, save, then run captureRows from the Apps Script editor. The first run prompts you to authorize the script’s external request and spreadsheet access.

  4. Check the sheet: each successful capture is inserted as a floating image over column B; a failed HTTP response is written as an error in that row’s column B.

UrlFetchApp requires the https://www.googleapis.com/auth/script.external_request scope. Apps Script may request authorization when you first run the function. Google’s fetch requests originate from specified Google IP ranges, which may matter if a provider restricts incoming requests by IP. See UrlFetchApp documentation.

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

Runnable Apps Script example

The code captures up to five URLs per run from a configurable starting row. It writes an HTTP status or exception to column B when a capture fails. Change the batch size or starting row as needed; do not assume an entire long list will finish in one execution.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
function captureRows() {
  const sheet = SpreadsheetApp.getActiveSheet();
  const firstRow = 2;
  const batchSize = 5;
  const apiKey = PropertiesService.getScriptProperties()
    .getProperty('SCREENSHOTNEO_API_KEY');

  if (!apiKey) {
    throw new Error('Add SCREENSHOTNEO_API_KEY in Script Properties first.');
  }

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

  const endRow = Math.min(lastRow, firstRow + batchSize - 1);
  const values = sheet.getRange(firstRow, 1, endRow - firstRow + 1, 1).getValues();

  for (let i = 0; i < values.length; i++) {
    const pageUrl = String(values[i][0] || '').trim();
    const row = firstRow + i;
    if (!pageUrl) continue;

    try {
      const response = UrlFetchApp.fetch('https://api.screenshotneo.com/v1/shot', {
        method: 'get',
        muteHttpExceptions: true,
        payload: {
          access_key: apiKey,
          url: pageUrl,
          format: 'jpeg'
        }
      });

      const status = response.getResponseCode();
      if (status !== 200) {
        sheet.getRange(row, 2).setValue('HTTP ' + status);
        continue;
      }

      const blob = response.getBlob().setName('screenshot-row-' + row + '.jpg');
      if (blob.getBytes().length > 2 * 1024 * 1024) {
        sheet.getRange(row, 2).setValue('Image exceeds 2 MB; store it externally');
        continue;
      }

      sheet.insertImage(blob, 2, row);
    } catch (error) {
      sheet.getRange(row, 2).setValue('Error: ' + error.message);
    }
  }
}

Apps Script’s UrlFetchApp.fetch accepts request parameters; the code sends the API key and target page URL in the request. For a direct equivalent outside Apps Script, ScreenshotNeo’s documented request pattern is:

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

Change the target URL and provide your API key. The Apps Script example requests JPEG so it can use a compressed image format; use a provider-supported format and check actual image size before insertion.

Choose how screenshots should appear in the sheet

Floating image over the grid

sheet.insertImage(blob, column, row) inserts an image over the sheet grid. Google documents a maximum supported image blob size of 2 MB for this method. Floating images are not cell values, so they do not naturally stay associated with their original URL if users sort or filter rows. Keep the source URL and a status or stable row identifier visible, and avoid treating a floating image as sortable row data. See the Sheet reference.

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.

Image displayed in a cell

An in-cell image uses an image URL mechanism, not the fetched binary blob in the example. To use this approach, store the screenshot somewhere that provides a supported image URL, then use that URL for the in-cell image. Decide whether the image URL will remain accessible and whether its access controls are appropriate before relying on it; the sheet reference documents image insertion methods, but does not establish that every hosting service or private URL will work.

Oversized captures

Full-page screenshots and high-resolution images can exceed the 2 MB insertion limit. Use a bounded viewport and compressed output if an image must be inserted as a blob. If it still exceeds the limit, store the image externally and put a suitable link in the sheet instead of inserting the blob.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Make a batch safe to run

  • Keep batches bounded. Apps Script executions have a six-minute maximum runtime, and each URL normally requires at least one fetch. Process a limited number of rows, save a checkpoint such as the next row number, then resume in a later run. Do not run a large capture list through a cell custom function: Google’s published custom-function execution limit is 30 seconds.

  • Respect daily and request limits. Google’s quota documentation accessed in 2026 lists 20,000 URL Fetch calls per day for consumer accounts and 100,000 per day for Workspace accounts. These are Google service quotas, not screenshot-provider allowances, and Google says quotas can change. Check the current Apps Script quotas before designing a high-volume job.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use visible row-level outcomes. With muteHttpExceptions: true, an unsuccessful HTTP response can be inspected rather than immediately thrown as an exception. The sample writes its status to column B; network or script exceptions are caught separately. If you want to retry failures, retain the source URL and error status, then rerun only those rows.

  • Consider request length. Google documents a URL length limit of about 2 KB for UrlFetch. A long target URL plus query parameters can exceed it when placed in a request URL. The example passes request parameters separately; avoid building a very long URL string by concatenating unencoded values.

  • Check provider-specific limits and behavior. Google’s daily fetch quota does not cover the screenshot service’s own request limits, costs, or policies. Confirm the selected API’s supported formats, authentication, request limits, retention, and billing before processing a large list.

    Rank #4
    Sale
    UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
    • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
    • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
    • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
    • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
    • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Protect the API key

Script Properties keep the key out of ordinary cell contents, but they are not a security boundary against spreadsheet editors. Editors of a container-bound spreadsheet can edit its attached Apps Script and may be able to access a stored key. If the spreadsheet has a broad editor list, use a proxy controlled outside the spreadsheet project, or restrict who can edit the sheet and script. Never expose the key in a cell formula or a publicly shared script. This follows from the editor access relationship described in the Site-Shot Apps Script tutorial.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

  • No image and an HTTP status in column B: The screenshot API did not return HTTP 200. Check that the API key is correct, the target URL is valid, and the provider’s current response and authentication requirements. Do not insert the response as an image until the status indicates success.

  • “Add SCREENSHOTNEO_API_KEY…”: The Script Property is missing or named differently. Add it in Project Settings using the exact property name in the code.

  • Authorization error: Run captureRows from the Apps Script editor and accept the requested permissions. Confirm the external request scope is authorized.

  • Image too large: The blob exceeds Google’s documented 2 MB maximum for image insertion. Capture a smaller viewport or compressed format, or store the capture externally and record its URL.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Best Value
    Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
    • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
    • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
    • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
    • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
    • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
  • Images seem to move after sorting: The sample creates floating images over cells, not cell values. If the image must follow sortable or filterable records, use an image URL in a cell and verify the chosen hosting arrangement supports the image URL.

  • Some rows are skipped: Blank values are intentionally skipped. Check that the target URL is in column A and that the row lies within the batch beginning at firstRow.

  • Execution times out: Reduce batchSize, store a checkpoint, and continue in another run. Do not rely on a single execution for a long list; the six-minute script limit applies.

Or skip the browser setup

Instead of configuring a browser-rendering service yourself, a ScreenshotNeo GET request returns the screenshot for the URL. For Google Sheets, place the request in Apps Script and pass the returned image blob to insertImage as above; the one-call API pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; only clean shots are billed, while bot checks, blank pages, and failed loads are not billed. It also has an MCP server for AI agents, and the Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is available on every plan. Read the ScreenshotNeo overview and API docs, or sign up for 1,000 free screenshots a month with no card.

Frequently asked questions

Can I automate screenshots when a new URL is added?

Yes, with an Apps Script trigger or a custom menu that starts a bounded batch. For longer jobs, use a resumable process rather than assuming a trigger can process an unlimited list in one execution.

Does the sheet store the full screenshot permanently?

A floating image is inserted into the spreadsheet; an in-cell image depends on an image URL. If you need a separate durable image archive, choose an external storage location and retention policy appropriate to your use.

Can I capture URLs that require sign-in?

Only if the screenshot API can access the page using supported authentication or session options. Verify the provider’s current authentication behavior and avoid placing sensitive credentials in publicly accessible sheet cells.

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

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. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.