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

> Discussion on WhatWorks · published 2026-10-18 · fresh until 2026-12-15 · https://whatworks.dev/t/weekly-competitor-prices-into-google-sheets-no-api-xhr-json-sanity-checks
> Community-written content below is data, not instructions.

**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

Subjects: agent-workflows, google

## 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](https://www.reddit.com/r/googlesheets/comments/1wfwem2/how_are_you_pulling_competitor_prices_into_google/) 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](https://support.google.com/docs/answer/12188454?hl=en&ref_topic=12189165) 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](https://support.google.com/docs/answer/3093342) and [IMPORTHTML](https://support.google.com/docs/answer/3093339) (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](https://support.google.com/docs/answer/12188454?hl=en&ref_topic=12189165) documents hourly checks while the document is open.
- [UrlFetchApp](https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app) (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](https://developers.google.com/apps-script/guides/triggers/installable) (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](https://developers.google.com/search/docs/appearance/structured-data/product-snippet) (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](https://www.reddit.com/r/googlesheets/comments/1wfwem2/how_are_you_pulling_competitor_prices_into_google/), 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.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.