How to extract internet speed data from websites using IMPORTXML in Google Sheets

I’m struggling with creating the correct xpath expression for web scraping in Google Sheets

I need to pull upload and download speed measurements from a speed test website using the IMPORTXML function. The problem is that I can’t figure out the right xpath selector to target these specific values.

I’ve tried different approaches but keep getting errors or empty results. The speed values seem to be dynamically loaded or nested in a way that makes them hard to capture.

Has anyone successfully extracted similar data from speed test sites? What xpath patterns work best for grabbing these types of numeric values? Any tips on identifying the correct element paths would be really helpful.

I’m looking for a working formula that can reliably fetch both upload and download speeds into separate cells in my spreadsheet.

XPath scraping for speed tests is a nightmare - most sites actively block it. I tried this last year and constantly hit rate limits or got banned. Try a different approach instead. Some router admin panels show speed data through basic HTML that importxml can grab. Or find an ISP with a simple speed checker without heavy JavaScript. Those basic sites work way better than fighting speedtest.net’s anti-scraping protection.

Yeah, this xpath issue is super common with speed test sites. Even when you nail the right element path, most of these sites deliberately mess with their data or rotate class names to block scraping. Your best shot is finding sites that actually put speed data in static HTML instead of loading it dynamically. Some ISP speed test pages work way better than the big consumer sites. When I got IMPORTXML working, I had to use really specific xpath like //div[@class='speed-value']/text() but constantly updated them when sites changed. Try checking if your target site has a mobile version - those sometimes load data differently and play nicer with xpath.

Most speed test sites use JavaScript to load results after the test runs, making IMPORTXML useless since it only grabs static HTML. I hit this same wall trying to automate speed monitoring at home. The values you want aren’t in the initial page source that IMPORTXML can see. Skip the xpath headache and use Google Apps Script with UrlFetchApp to hit speed test APIs directly. Fast.com and Speedtest.net both have APIs that return clean JSON with actual speed data. Way more reliable and the structured data drops right into your spreadsheet.