SheetSonar

IMPORTXML and Google Trends: why it fails and what works

You pasted a Google Trends link into IMPORTXML and got #N/A. Here is why, and how to get the numbers into Google Sheets anyway.

Why IMPORTXML returns nothing

IMPORTXML, IMPORTHTML and IMPORTDATA read the page exactly as the server sends it. Google Trends sends an almost empty page, then draws the charts in your browser with JavaScript. The functions never run that JavaScript, so there is nothing for an XPath to find.

The CSV you download from a Trends chart does not help either: its address is generated for your browser session and stops working, so IMPORTDATA on it fails sooner or later.

The options in 2026

One formula instead of IMPORTXML

=SONAR_TREND("e-bike", "US")

returns the average Google Trends interest (0–100) over the last 12 months. Two more arguments choose the period and what you get back:

Leave the country empty to use the spreadsheet's country, or write "world".

Start from a template

The keyword research template has five keywords with their 12-month average, their latest week and the momentum between the two. Download it (CSV), then in Google Sheets: File › Import › Upload › Replace current sheet.

Good to know

Install SheetSonarDownload the template