Integration · Reporting

Spyglasses + Looker Studio

Put your daily AI visibility metrics in the same Looker Studio report as the rest of your marketing data.

Spyglasses reaches Looker Studio through Google Sheets. A short Apps Script pulls your share of voice, mentions and citations from the Spyglasses API into a sheet every day, and Looker Studio reads the sheet like any other data source. Setup takes about ten minutes, and the sheet keeps a copy of your history you can use anywhere.

Jim Wrubel
Jim Wrubel

Last updated

Key takeaways
  • The path is Spyglasses API, then Google Sheets, then Looker Studio.
  • A short Apps Script pulls your metrics with your property API key.
  • Run it on a daily trigger and the dashboard stays current on its own.
  • Share of voice, mentions, citations and per-platform share of voice come through as columns.
  • The REST API works on every Spyglasses plan.
What the script readsGET /historical-metrics/discovery
[
  {
    "measuredAt": "2026-09-30T06:45:23.923Z",
    "source": "nightly",
    "shareOfVoice": 22,
    "totalMentions": 41,
    "totalCitations": 17,
    "citationRate": 34,
    "chatgptSov": 24,
    "geminiSov": 19,
    "googleAiOverviewSov": 23
  },
  ...
]

What you can do

Charts teams build once the metrics land in a sheet.

01

Daily share of voice by platform

Plot share of voice over time with one line each for ChatGPT, Gemini and Google AI Overviews. Filter the source column to nightly for daily tracking only.

GET /api/properties/:id/historical-metrics/discovery

02

A competitor table

Pull the competitor ranking pooled over 7, 30 or 90 days into a second tab, and show it as a table or bar chart next to your own share of voice.

GET /api/properties/:id/competitor-sov?days=30

03

Brand consistency over time

Add a third tab for the brand consistency score, which tracks how consistently AI describes your brand.

GET /api/properties/:id/historical-metrics/brand-consistency

Set it up in a few minutes

You need a property API key, a Google Sheet and a Looker Studio report.

  1. 1

    Copy your property API key and ID

    In Spyglasses, open your property's Settings and copy the API key. Calling /api/me with that key returns your property ID.

    curl "https://www.spyglasses.io/api/me" -H "x-api-key: YOUR_PROPERTY_API_KEY"
    API authentication →
  2. 2

    Add the script to a Google Sheet

    In a new sheet, open Extensions, then Apps Script, and paste the script below. Under Project Settings, add a script property named SPYGLASSES_API_KEY with your key, so the key never sits in a cell.

  3. 3

    Run it, then put it on a timer

    Run pullSpyglassesMetrics once and approve access. Then add a time-driven trigger that runs it every day.

  4. 4

    Connect Looker Studio

    In Looker Studio, add a data source, choose Google Sheets, and pick the Spyglasses tab. Set the date column's type to Date and build your charts.

    Endpoint reference →

The REST API and property API keys are included on every Spyglasses plan.

Keep the dashboard current

Daily tracking runs once a day, so a daily trigger is all the dashboard needs.

  • Schedule the trigger for the morning, after the overnight tracking run.
  • The script rewrites the tab on every run, so it never doubles up rows.
  • Add the competitor and consistency endpoints as more tabs with the same pattern.

The Apps Script

Paste it into Extensions, then Apps Script, in your Google Sheet. Swap in your property ID.

// Spyglasses to Google Sheets, for Looker Studio. // Project Settings > Script properties: add SPYGLASSES_API_KEY (your property key). const PROPERTY_ID = "YOUR_PROPERTY_ID"; const DAYS = 90; // how much history to keep in the sheet function pullSpyglassesMetrics() { const key = PropertiesService.getScriptProperties().getProperty("SPYGLASSES_API_KEY"); const start = new Date(Date.now() - DAYS * 86400000).toISOString().slice(0, 10); const url = "https://www.spyglasses.io/api/properties/" + PROPERTY_ID + "/historical-metrics/discovery?startDate=" + start; const rows = JSON.parse(UrlFetchApp.fetch(url, { headers: { "x-api-key": key } }).getContentText()); const header = ["date", "source", "shareOfVoice", "totalMentions", "totalCitations", "citationRate", "chatgptSov", "geminiSov", "googleAiOverviewSov"]; const values = rows.map((r) => [new Date(r.measuredAt), r.source, r.shareOfVoice, r.totalMentions, r.totalCitations, r.citationRate, r.chatgptSov, r.geminiSov, r.googleAiOverviewSov]); const book = SpreadsheetApp.getActiveSpreadsheet(); const sheet = book.getSheetByName("Spyglasses") || book.insertSheet("Spyglasses"); sheet.clearContents(); sheet.getRange(1, 1, 1, header.length).setValues([header]); if (values.length) sheet.getRange(2, 1, values.length, header.length).setValues(values); }

Frequently asked questions

What to know before you connect Looker Studio.

Is there a native Looker Studio connector?

Spyglasses connects through Google Sheets today. It takes about ten minutes to set up, it works with any Looker Studio report, and the sheet doubles as a portable copy of your history.

Which metrics can I chart?

Share of voice, mentions, citations and citation rate, overall and per platform, plus the competitor ranking and the brand consistency score. Each endpoint is listed in the API docs.

Where do I keep the API key?

In the script's properties, not in a cell. Anyone who can edit the script can see it, so share edit access with care. Viewers of the Looker Studio report never see the key.

How often does the data change?

Daily prompt tracking runs once a day on ChatGPT, Gemini and Google AI Overviews, so one refresh a day keeps the dashboard current.

Can I use the same approach with other BI tools?

Yes. Any tool that reads Google Sheets works, and any tool that can call a URL with a header can read the API directly.

Put AI visibility in your Looker Studio reports

Start a free trial, track your first prompts, and chart them next to the rest of your marketing data.

Spyglasses + Looker Studio: AI Visibility Dashboards