published fresh until

How do I get competitor prices into Sheets weekly with no API?

Summary As of November 2026, an r/googlesheets post (September 2026) asks how to stop hand-copying prices. Commenters agree: check whether the price is in the page source; if not, find the XHR JSON call in the network tab and call it from Apps Script on a weekly trigger, log raw values with the date, and fail the run on sanity checks.

Not for letting an agent read or edit a Sheet, building internal tools

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Every week you open several shop pages, copy prices into a Google Sheet, and typos slip into the numbers your report uses. The sites have no API.

What the thread says (r/googlesheets, 14 September 2026)

The post by Inner_Two_3627 asks exactly this (checked 2026-11-15). The replies that were repeated by several commenters:

1. Check the page source first. Open the product page, view source, and search for the price. If it is there, IMPORTXML with a short XPath can work, or IMPORTHTML if the price sits in an HTML table or list. Google's import-function guide says these functions check for updates every hour while the document is open; for a scheduled weekly run, use a script with a time trigger. If it is not, the page loads it with a script and IMPORTXML will not see it. 2. Use the request the page makes. Open the browser network tab, reload, filter to XHR, find the response carrying the price. It is often clean JSON. Call that URL from Apps Script (UrlFetchApp) on a weekly time trigger. Two commenters gave this advice independently, one adding that mid-sized shops nearly always have such an endpoint. 3. Look for JSON-LD. If the price is in the source, it is often in a structured data block that parses more reliably than an XPath into the page layout. 4. Log raw runs. Write each run to a log tab with the date and the raw value, so a changed site shows as a blank in the log, not as a wrong price in the report. 5. Sanity checks before the report. One commenter: if you normally get 200 products and suddenly get 37, fail the run. Do the same for blank prices or many zeros. A scraper that breaks loudly is easy; bad data that looks valid is the problem. 6. Manual fallback. Copy the whole area from the page and let formulas parse it, or save the page, if you do not code.

Some sites deter scraping; check each site's terms before you automate.

Where an agent helps (my suggestion, not tried)

An agent can look at one saved page and the network request, write the Apps Script function, and add the log tab and checks. Give it a page you saved yourself and the exact fields you need; do not give it your Google credentials or ask it to run against sites you have not checked.

Prompt: "Here is a saved HTML file and the JSON response I copied from the network tab. Write an Apps Script function that appends date, product id and price to a Log sheet, fails if fewer than 90% of last week's product ids are present, and flags blank or zero prices."

Limits

Forum advice from commenters; one commenter in the thread was promoting a service and I ignored that. I did not build or run it.

Sources

  • IMPORTXML and IMPORTHTML (Google Docs Editors Help), read. Checked: IMPORTXML(url, xpath_query, locale) imports from structured sources including XML, HTML, CSV, TSV and RSS/Atom; IMPORTHTML(url, query, index) imports only a table or a list from an HTML page. These two function-reference pages do not mention JavaScript-rendered content; the import-function guide documents hourly checks while the document is open.
  • UrlFetchApp (Google Apps Script reference), read. Checked: Apps Script can send HTTP and HTTPS requests with fetch(url) (needs the script.external_request scope).
  • Installable triggers (Google Apps Script guide), read. Checked: time-driven triggers can run weekly (the page's example runs on a weekday at an hour); the exact time may be slightly randomized, so a Monday 9 AM trigger can fire between 9 and 10; a failed run emails the trigger's creator.
  • Product structured data (Google Search Central), read. Checked: Google's examples show product offers and price in JSON-LD, RDFa and Microdata, with no stated preference. That a JSON-LD block parses more reliably than an XPath is a commenter's opinion and not in the page.
  • Corrections made: IMPORTHTML only reads tables and lists; Google's import-function guide documents hourly checks while the document is open, and a weekly time trigger schedules a script, so the original "can work and refresh weekly" was narrowed.

Checked on 2026-11-15: the r/googlesheets thread, its date, author and commenters' advice, including the script-loaded-price and mid-sized-shop remarks. Those remarks remain forum claims and were not independently tested here. Not checked: any shop's terms of use and the 90 percent prompt. I did not build or run the script.

Started from a post by @Inner_Two_3627, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I get competitor prices into Sheets weekly with no API?
Summary: As of November 2026, an r/googlesheets post (September 2026) asks how to stop hand-copying prices. Commenters agree: check whether the price is in the page source; if not, find the XHR JSON call in the network tab and call it from Apps Script on a weekly trigger, log raw values with the date, and fail the run on sanity checks.
Copy for agent
get the whatworks thread weekly-competitor-prices-into-google-sheets-no-api-xhr-json-sanity-checks and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread weekly-competitor-prices-into-google-sheets-no-api-xhr-json-sanity-checks
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks