DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon 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 Now×
Skip to content
Mountain View desk8 min

How to Use ApiFlash with Google Sheets to Screenshot URLs in Bulk

A practical Apps Script workflow for capturing URLs from Google Sheets with ApiFlash, inserting images or storing links, and handling quotas and failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Google Apps Script to read URLs from a Google Sheet, call ApiFlash once per row, and write either the screenshot image or its link back beside the source URL. ApiFlash documents the screenshot endpoint, and Google documents the Apps Script request and image-insertion methods; this is a workflow assembled from those capabilities, not an official ApiFlash Sheets integration.

What you need before you start

  • A Google Sheet with a column of complete target URLs. Include https:// or http:// in every URL.
  • A valid ApiFlash access key from your ApiFlash account. The key authenticates API requests; do not put it in a publicly shared cell.
  • An Apps Script project attached to the spreadsheet. Apps Script can send HTTPS requests using UrlFetchApp and inspect response codes, bytes, and blobs. See Google’s URL Fetch Service reference.

ApiFlash’s documented endpoint is https://api.apiflash.com/v1/urltoimage. It accepts GET query parameters and POST form data; its default response is image data. Set response_type=json to receive JSON containing screenshot links instead. See the ApiFlash Screenshot API documentation.

As an Amazon Associate I earn from qualifying purchases.

Set up the sheet and Apps Script

  1. Create a sheet with headers such as URL, Screenshot, Status, and Error. Put one target URL per row under URL. The example below assumes the first worksheet is used, row 1 contains headers, and URLs are in column A.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. In the spreadsheet, open Extensions → Apps Script.

    #1 Best Overall
    Sale
    Acer Predator Helios Neo 18 AI Gaming Laptop | Intel Core Ultra 9 Processor 275HX | NVIDIA GeForce RTX 5070 Ti | 18" WQXGA 240Hz G-SYNC | 32GB DDR5 | 2TB Gen 4 SSD | Killer Wi-Fi 6E | PHN18-72-9474
    • Desktop-Level Performance, Anywhere: Get legendary gaming performance with the Intel Core Ultra 9 275HX processor, delivering ultra-smooth gameplay and future-ready AI (Up to 13 NPU TOPS). Offload tasks like background removal and audio optimization to the NPU for seamless streaming and gaming, while Intel Application Optimization enhances performance on classic titles.
    • Game-Changing Realism: Powered by NVIDIA Blackwell architecture, GeForce RTX 5070 Ti Laptop GPU unlocks the game changing realism of full ray tracing. Equipped with a massive level of 992 AI TOPS horsepower, the RTX 50 Series enables new experiences and next-level graphics fidelity. Experience cinematic quality visuals at unprecedented speed with fourth-gen RT Cores and breakthrough neural rendering technologies accelerated with fifth-gen Tensor Cores.
    • Supreme Speed. Superior Visuals. Powered by AI: DLSS is a revolutionary suite of neural rendering technologies that uses AI to boost FPS, reduce latency, and improve image quality. DLSS 4 brings a new Multi Frame Generation and enhanced Ray Reconstruction and Super Resolution, powered by GeForce RTX 50 Series GPUs and fifth-generation Tensor Cores.
    • The Ultimate in Ray Tracing and AI: NVIDIA RTX is the most advanced platform for full ray tracing and neural rendering technologies that are revolutionizing the ways we play and create. Over 700 games and applications use RTX to deliver realistic graphics and incredibly fast performance with cutting-edge AI features like DLSS Multi Frame Generation.
    • Immersive Depth and Detail: At 18 inches with a 16:10 aspect ratio, the pristine WQXGA screen offering vibrant colors with up to 100% DCI-P3 operates at a fast 240Hz refresh and 3ms overdrive response time. Alongside the suite of features from NVIDIA G-SYNC and NVIDIA Advanced Optimus, you're guaranteed that whatever's on-screen is a distinct viewing delight.
  3. In Apps Script, open Project Settings and enable showing the appsscript.json manifest file. Store your access key in a script property named APIFLASH_ACCESS_KEY; avoid writing it in the spreadsheet. The script below reads this property and keeps it out of sheet cells.

  4. Paste the code below into the script editor and replace the example column settings if your sheet uses different columns. Save the project.

  5. Select captureRows in the function menu and click Run. On the first run, review and grant the requested spreadsheet and external-request permissions. Google’s Apps Script quickstart for Sheets describes project setup and first-run authorization. The advanced Sheets service is not required for this attached-spreadsheet workflow.

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

If your project explicitly sets OAuth scopes in appsscript.json, include the external request scope https://www.googleapis.com/auth/script.external_request, along with the spreadsheet scope required by your script.

Runnable Apps Script: insert screenshot images into rows

This version requests the image response, checks the HTTP status, and inserts successful image blobs into the sheet. It processes a bounded batch from top to bottom and records a row-level status or error. Change START_ROW and BATCH_SIZE to run subsequent batches; rows marked OK are skipped.

const SHEET_NAME = ''; // Blank uses the first worksheet.
const URL_COLUMN = 1;
const SCREENSHOT_COLUMN = 2;
const STATUS_COLUMN = 3;
const ERROR_COLUMN = 4;
const START_ROW = 2;
const BATCH_SIZE = 20;

function captureRows() {
  const key = PropertiesService.getScriptProperties().getProperty('APIFLASH_ACCESS_KEY');
  if (!key) throw new Error('Set the APIFLASH_ACCESS_KEY script property first.');

  const ss = SpreadsheetApp.getActiveSpreadsheet();
  const sheet = SHEET_NAME ? ss.getSheetByName(SHEET_NAME) : ss.getSheets()[0];
  if (!sheet) throw new Error('Worksheet not found. Check SHEET_NAME.');

  const lastRow = sheet.getLastRow();
  if (lastRow < START_ROW) return;
  const endRow = Math.min(lastRow, START_ROW + BATCH_SIZE - 1);
  const count = endRow - START_ROW + 1;
  const urls = sheet.getRange(START_ROW, URL_COLUMN, count, 1).getValues();

  for (let i = 0; i < urls.length; i++) {
    const row = START_ROW + i;
    const url = String(urls[i][0] || '').trim();
    const statusCell = sheet.getRange(row, STATUS_COLUMN);
    const errorCell = sheet.getRange(row, ERROR_COLUMN);

    if (statusCell.getValue() === 'OK') continue;
    if (!/^https?:///i.test(url)) {
      statusCell.setValue('ERROR');
      errorCell.setValue('Enter a complete URL beginning with http:// or https://.');
      continue;
    }

    statusCell.setValue('RUNNING');
    errorCell.clearContent();
    try {
      const response = UrlFetchApp.fetch('https://api.apiflash.com/v1/urltoimage', {
        method: 'get',
        payload: {
          access_key: key,
          url: url
        },
        muteHttpExceptions: true
      });
      const code = response.getResponseCode();
      if (code < 200 || code >= 300) {
        throw new Error('ApiFlash returned HTTP ' + code + ': ' + response.getContentText().slice(0, 500));
      }

      const blob = response.getBlob().setName('screenshot-row-' + row);
      const image = sheet.insertImage(blob, SCREENSHOT_COLUMN, row);
      image.setAnchorCell(sheet.getRange(row, SCREENSHOT_COLUMN));
      statusCell.setValue('OK');
    } catch (err) {
      statusCell.setValue('ERROR');
      errorCell.setValue(String(err.message || err).slice(0, 1000));
    }
  }
}

UrlFetchApp.fetch can send GET requests with parameters and return the HTTP response. Google’s Sheet reference documents inserting an image from a blob. This script inserts the image as an object anchored in its row; it does not resize the row or guarantee that every screenshot fits the visible cell dimensions.

Rank #3
Sale
msi Katana 15 HX 15.6” 165Hz QHD+ Gaming Laptop: Intel Core i9-14900HX, NVIDIA Geforce RTX 5070, 32GB DDR5, 1TB NVMe SSD, RGB Keyboard, Win 11 Home: Black B14WGK-016US
  • Intel Core i9 HX Power for Elite Gaming: Dominate demanding titles with the Intel Core i9-14900HX and its 24-core hybrid architecture, delivering fast load times, high FPS, and smooth multitasking.
  • GeForce RTX 5070 With Ray Tracing & DLSS 4: Powered by NVIDIA Blackwell, the RTX 5070 delivers stronger ray tracing, higher FPS, faster AI upscaling, and more responsive gameplay—ideal for competitive and cinematic gaming.
  • QHD 165Hz, 100% DCI-P3 for Ultra-Clear Combat: The QHD 165Hz display reveals more detail, reduces motion blur, and boosts visibility in fast-paced games while delivering richer, more accurate colors.
  • Cooler Boost 5 for Sustained Performance: Dual fans and a 5-heat-pipe share-pipe design keep the CPU and GPU cool, maintaining stable frame rates during long gaming marathons.
  • 4-Zone RGB Keyboard + Full Game-Ready Ports: Customize your setup with a 4-zone RGB keyboard and highlighted WASD keys. Includes USB-C Gen 2, HDMI up to 8K, multiple USB-A ports, RJ45, Wi-Fi 6E & Hi-Res Audio.

Alternative: store screenshot links instead of embedding images

Embedding many large screenshots can make a sheet harder to scan and may increase its complexity. For a lighter index, ask ApiFlash for JSON and store the returned image link in the output column. The JSON response structure and link property are documented by ApiFlash, so confirm the current field name in its API reference before mapping it into your sheet.

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.

The request can use the same URL and access key as the image version, with response_type=json. In Apps Script, parse the response text using JSON.parse(response.getContentText()), check that the HTTP status is successful, then write the documented screenshot-link field into the row. A response link is useful for a compact sheet, but its availability and retention should be treated according to ApiFlash’s current documentation and your chosen cache settings.

Choose capture options for your batch

ApiFlash documents these controls; add only the parameters your job needs to the request payload or GET query.

Rank #4
15.6" Laptop with Win 11, N4020 CPU, 4GB RAM, 128GB, FHD 1080P Display
  • Vibrant 15.6" FHD IPS Display: Experience stunning visuals on a large 15.6-inch Full HD (1920x1080) IPS screen. With narrow bezels and wide viewing angles, this laptop offers an immersive experience for streaming movies, online classes, or working on documents with crystal-clear detail
  • Efficient Daily Performance: Powered by the Intel Celeron N4020 processor and 4GB LPDDR4 RAM, this notebook delivers reliable performance for web browsing, light multitasking, and school projects. The 128GB storage provides ample space for your essential files, photos, and apps
  • Modern Connectivity & PD Fast Charge: Equipped with a versatile Type-C PD 45W port for fast charging and high-speed data transfer. Combined with Dual-Band AC WiFi and Bluetooth, you’ll enjoy a stable and fast internet connection for seamless video calls and cloud-based work
  • Silent & Ultra-Portable Design: Featuring an advanced fanless cooling system, this laptop operates in total silence—perfect for libraries or late-night study sessions. Its sleek, lightweight body fits easily into backpacks, making it the ideal companion for students and commuters
  • Ready for Work & Play: Pre-installed with Windows 11 Home, offering a secure and user-friendly interface. Includes a HD webcam and high-quality speakers for clear communication. A practical choice for online learning, remote work, or everyday entertainment
Need ApiFlash option or behavior Practical trade-off
Image format JPEG is the default; PNG and WebP are alternatives. Choose a format based on how the sheet or downstream workflow will use the capture.
Page size Default viewport is 1920 × 1080; full_page enables full-page capture. A full-page image can be substantially taller than a viewport capture.
Wait for rendering Up to 10 seconds of fixed delay is documented. Scrolling can trigger lazy-loaded content. The documentation advises considering wait_for or wait_until instead of a fixed delay when possible. Waiting can help pages finish rendering, but adds time to each uncached capture.
Image quality JPEG/WebP quality controls are documented. Adjust quality if file size matters; use the API reference for accepted parameter values.
Cache freshness Default cache TTL is 86,400 seconds. The documented TTL range is 0 to 2,592,000 seconds (30 days). Use cache reuse for repeated identical requests, or choose a shorter TTL when pages change frequently.

ApiFlash says identical requests may return a cached screenshot without counting against the monthly quota. Changing a request parameter can make it a different request, so decide on viewport, format, and freshness settings before running a large batch. The figures above are documented product settings on the ApiFlash documentation page inspected in 2026, not independent performance measurements.

Run larger lists safely

Start with a small batch and verify the results and quota behavior before increasing the number of rows. ApiFlash documents a leaky-bucket rate of 20 requests per second with a burst size of 400. Requests over the rate may be delayed; requests exceeding the burst can end with HTTP 429. These are API limits, not a recommendation to send every spreadsheet row simultaneously.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use bounded batches. The example processes at most 20 rows per execution. Adjust the batch size to fit your account, Apps Script execution limits, and capture duration.
  • Save progress per row. The script writes RUNNING, OK, or ERROR and captures error text. Fix the failed row or clear its status to retry it.
  • Watch quota headers. Successful responses can include X-Quota-Limit, X-Quota-Remaining, and X-Quota-Reset. ApiFlash also documents a quota endpoint.
  • Do not blindly retry failed captures. ApiFlash limits failed captures with exactly the same parameters to five attempts per hour. Correct the URL or parameters, or wait before repeating an identical failure.
  • Avoid excessive parallelism. Apps Script offers fetchAll for multiple requests, but the appropriate concurrency and retry schedule depends on the account and workload. The documented rate and burst limits do not establish a universal production batch design.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

Symptom or status Likely cause What to do
HTTP 400 Invalid parameters or a target ApiFlash cannot capture. Check that the URL includes https:// or http://; validate parameter names and try the target URL directly.
HTTP 401 The access key is invalid or revoked. Check the APIFLASH_ACCESS_KEY script property and replace it with a valid dashboard key.
HTTP 402 Monthly quota exceeded. Check account quota and billing before resuming the batch.
HTTP 403 A requested feature is not available on the account’s plan. Remove the unsupported option or check plan availability in ApiFlash’s documentation/account.
HTTP 429 Too many requests, including burst-limit excess. Reduce the request rate, use smaller batches, and retry later rather than launching concurrent calls without controls.
HTTP 500 API-side capture failure. Record the row error and retry later cautiously; identical failed requests are limited to five attempts per hour.
No screenshot despite an apparently valid URL The page may require more rendering time, or the URL may be inaccessible to the capture service. Check the target and request settings; consider a documented wait option or scrolling for lazy-loaded content.
Images overlap or are awkward to review Images inserted from blobs are anchored on the sheet rather than automatically tailored to every row’s layout. Adjust row/column sizing or use JSON response mode and keep links instead.
Authorization error in Apps Script The project has not been authorized, or an explicitly configured manifest omits the external-request scope. Run the function and complete the authorization flow; if scopes are explicit, add script.external_request and the spreadsheet scope.

ApiFlash’s documented error codes and quota behavior are listed in its API documentation.

Best Value
Sale
AKCHART 15.6'' AI Laptop with Office 365 12GB RAM 256GB SSD Win 11 Laptops | 7000mAh Battery, IPS FHD, 180°Viewing, Quad-Core Processor, Type-C, WiFi5, Portable Thin Business Student Laptops, Light Gray
  • Stunning 15.6" FHD IPS Display: Experience crisp 1920x1080 resolution on this 15.6 inch laptop with an IPS panel that delivers wide viewing angles and vivid colors. The narrow-bezel design maximizes screen real estate for comfortable viewing on this Win 11 laptop, whether you're studying or working.
  • Celeron J4105 Processor & 256GB SSD: Powered by a reliable Celeron J4105 processor paired with 12GB DDR4 memory and a fast 256GB M.2 SSD. This laptop computer supports SSD expansion up to 2TB and TF card expansion up to 1TB, so your storage grows with your needs. Delivers smooth multitasking for daily productivity.
  • AI-Powered Win 11 Laptop: Built-in AI features enhance your productivity with smart assistance for writing, summarizing, and task management. Pre-installed with Win 11 and includes Office 365 subscription. This student laptop is backed by 1-year warranty and 24/7 customer support.
  • All-Day 7000mAh Battery & 180° Hinge: The high-capacity 7000mAh battery keeps this laptop powered through long classes or meetings. The 180-degree lay-flat hinge lets you share your screen effortlessly during presentations. This durable laptop computer adapts to your dynamic workflow.
  • Versatile Connectivity Hub: Equipped with USB 3.2, Type-C, Mini HDMI, and 3.5mm audio jack to connect all your peripherals. Stay online anywhere with high-speed 5G WiFi and Bluetooth 4.2. This college laptop keeps you connected at home, in the library, or on the go.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. It removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed; and its MCP server lets AI agents take screenshots. It includes 1,000 screenshots a month free with no card, and paid plans start at $5 for 3,000. For a direct image response, make one GET request:

ScreenshotNeo API documentation

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

For a spreadsheet workflow, Apps Script can call this endpoint with the same URL-fetch approach and place the returned bytes beside each source row. Sign up for ScreenshotNeo: get 1,000 free screenshots a month with no card.

Frequently Asked Questions

Does this workflow require the advanced Google Sheets service?

No. An Apps Script project attached to the spreadsheet can use built-in spreadsheet methods to read rows and insert images. The advanced service is optional.

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

Can I capture URLs without embedding images in the sheet?

Yes. Request ApiFlash JSON response mode and store its screenshot link in the output column instead of inserting image blobs.

Can the script run every row in one execution?

It can be adapted, but bounded batches are safer for execution time, quota monitoring, and recovering failed rows. Choose batch size for your workload rather than assuming the API’s burst limit is a suitable batch size.

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 *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver 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.