GetScreenshot +

Website Screenshots in Google Sheets

Show website screenshots in your spreadsheets. Add one short Apps Script function, then use a formula to turn the URLs in your sheet into images. Useful for SEO tracking, competitor monitoring, and portfolio management.

Works with any Google account and any GetScreenshot plan. Use code FREE5 to get the first month of the $5 plan free.

How to Use Screenshots in Google Sheets

Add one custom function, then use it in a formula

1

Step 1: Add the GETSCREENSHOT Function

The GetScreenshot API answers with JSON that contains the image URL. It does not return the image itself, so pointing IMAGE() straight at the API URL does not work. A short Apps Script custom function closes the gap: it calls the API, reads the JSON, and returns the screenshotImage URL.

  1. In your sheet, open Extensions > Apps Script.
  2. Replace the contents of Code.gs with the function below and save.
  3. Open Project Settings > Script Properties and add a property named GETSCREENSHOT_API_KEY with your API key as its value.
/**
 * Captures a web page with GetScreenshot and returns the URL of the image
 * (or of the PDF when options contains pdf=true).
 *
 * @param {string} url The page to capture, including https://
 * @param {string} options Optional extra API parameters, e.g. "fullpage=true&width=1440"
 * @return {string} The URL of the captured file
 * @customfunction
 */
function GETSCREENSHOT(url, options) {
  if (!url) {
    return '';
  }
  var apiKey = PropertiesService.getScriptProperties().getProperty('GETSCREENSHOT_API_KEY');
  if (!apiKey) {
    throw new Error('Add GETSCREENSHOT_API_KEY under Project Settings > Script Properties.');
  }

  var requestUrl = 'https://api.rasterwise.com/v1/get-screenshot'
    + '?apikey=' + encodeURIComponent(apiKey)
    + '&url=' + encodeURIComponent(url);
  if (options) {
    requestUrl += '&' + options;
  }

  var response = UrlFetchApp.fetch(requestUrl, { muteHttpExceptions: true });
  var code = response.getResponseCode();
  var body = response.getContentText();
  if (code !== 200) {
    throw new Error('GetScreenshot returned HTTP ' + code + ': ' + body);
  }

  var data = JSON.parse(body);
  var fileUrl = data.screenshotImage || data.pdfFile;
  if (data.status !== 'success' || !fileUrl) {
    throw new Error('Capture failed: ' + body);
  }
  return fileUrl;
}

Keep the key in Script Properties instead of pasting it into the script or a cell. That way it does not show up in formulas, in shared copies of the sheet, or in version history. People with edit access to the script project can still read it.

2

Step 2: Use It in a Formula

Put a URL in a cell, then wrap the custom function in Google Sheets' built-in IMAGE() function. The screenshot shows in the cell once the capture finishes.

Formula:

=IMAGE(GETSCREENSHOT(A2))

Example with Options:

=IMAGE(GETSCREENSHOT(A2, "fullpage=true&width=1440"))

The second argument is passed to the API as extra query parameters.

Common Parameters:

  • width - Viewport width (default: 1280)
  • height - Viewport height (default: 800)
  • fullpage - Capture the entire page (true/false)
  • format - Image format (png or jpeg)
  • timewait - Extra wait in ms before capture (default: 2000)
  • hidemsg - Hide chat widgets (true/false)

Each recalculation uses a screenshot from your quota. Sheets runs the function again whenever its arguments change or the formula is re-entered, and each run is a new API request. Failed captures count too. Google also stops a custom function after 30 seconds. Typical captures take 8–15 seconds, but a slow page can run past that limit and show an error in the cell. For slow pages, add waituntil=domcontentloaded to the options.

Popular Google Sheets Use Cases

How teams use screenshots in their spreadsheets

SEO & Marketing

SERP Result Tracking

Screenshot search results for target keywords. Track SERP changes over time with visual evidence in your SEO tracking sheets.

Competitive Intel

Competitor Website Monitoring

Keep a visual log of competitor websites. List URLs in column A, get screenshots automatically. Compare changes side by side.

Portfolio

Client Website Portfolio

Agencies: maintain a visual database of client websites. Track projects with a thumbnail next to each URL.

QA Testing

Website QA Checklist

Create QA spreadsheets with visual verification. Screenshot each page after deployment to confirm changes look correct.

Real Estate

Property Listing Database

Screenshot property listings from real estate portals. Build a visual database of listings with thumbnails for quick reference.

Link Building

Backlink Verification

Track backlinks with visual proof. Screenshot pages linking to you to verify link placement and context.

Tips for Best Results

Get the most out of screenshots in your spreadsheets

Resize Cells for Better Display

Adjust your row height and column width to display screenshots clearly. Right-click the row/column header and set specific dimensions (e.g., 200px height, 300px width).

Pass Plain URLs

The function URL-encodes the address for you, so pass the cell as it is, including https://. Do not wrap it in ENCODEURL(); that would encode it twice.

Freeze Results to Save Quota

Put =GETSCREENSHOT(A2) in its own column and =IMAGE(B2) next to it. Once the captures are done, copy the URL column and paste it back as values. The sheet then stops calling the API. Stored images are kept for 30 days.

Use Full Page for Long Content

For articles, landing pages, or content-heavy sites, pass "fullpage=true" as the second argument to capture the entire page, not just the viewport.

Start Taking Screenshots in Google Sheets

Plans start at $5/month for 2,500 screenshots. Use code FREE5 to get the first month of the $5 plan free.