Link Building Tools

How to Use Google Sheets IMPORTXML for Prospecting

By BacklinkPrice Team · Nov 30, 2026 · 9 min read
Cover for How to Use Google Sheets IMPORTXML for Prospecting: spreadsheet and code icon on a blue background

IMPORTXML pulls page titles, meta descriptions and links from prospect sites into Google Sheets, so you can judge topical fit and find contact pages without opening every tab.

Quick answer: Use Google Sheets IMPORTXML to pull page titles, meta descriptions and links from prospect sites into a spreadsheet, so you can judge topical fit and find contact pages without opening every tab. The formula takes a URL and an XPath query, and it works best on static pages. It cannot read JavaScript content, so pair it with a crawler for dynamic sites.

TL;DR: IMPORTXML turns a list of prospect URLs into titles, descriptions and link data in minutes. Build the sheet once, then reuse it for every campaign.

Key takeaways

  • IMPORTXML pulls page data with =IMPORTXML(url, xpath_query), according to the Google Docs Editors help page for the function.
  • Pull titles with //title, meta descriptions with //meta[@name='description']/@content, and all links with //a/@href.
  • IMPORTXML cannot read JavaScript-rendered content, so dynamic pages return blank cells.
  • Google's help page states that import functions check the source for updates hourly while the document is open.
  • A prospecting sheet needs one row per domain, a status column, and a check for whether each earned link is still live.

What IMPORTXML does and how it works

IMPORTXML is a built-in Google Sheets function that fetches a web page from Google's servers and returns whatever an XPath query selects from it. The full signature is IMPORTXML(url, xpath_query, locale), according to the Google Docs Editors help page. The URL must include the protocol, and the XPath query picks the element or attribute you want, such as a heading, a link, or a meta tag.

XPath is the part most people skip learning, and it is the part that makes the function useful. A query of //title finds the page title anywhere in the document. A query of //a/@href returns every link address on the page. A query of //a[contains(@href,'contact')]/@href returns only links whose address contains the word contact, which is how you find contact pages without browsing.

IMPORTXML has three siblings worth knowing. IMPORTHTML pulls a whole table or list from a page, IMPORTFEED reads an RSS or Atom feed, and IMPORTDATA reads a CSV or TSV file at a URL, according to the same Google help page. For prospecting, IMPORTXML does the most work, because it targets single elements instead of whole tables.

Scale is rarely the problem. Google's Workspace Updates blog of September 10, 2026 states that Google Sheets now supports up to 20 million cells per spreadsheet, double the previous 10 million limit. A prospecting sheet with tens of thousands of rows fits easily, so the limit you will hit first is the import request rate, not the cell count.

Set up a prospecting sheet in four steps

Start with a clean sheet before you add any IMPORTXML formulas. A messy input list produces messy output, and the formulas amplify every duplicate and bad URL.

  1. Paste your prospect URLs into column A, one URL per row, from a backlink tool export, a search scrape, or a list you built by hand.
  1. Pull the domain out of each URL in column B with =REGEXEXTRACT(A2,"^(?:https?://)?(?:www\.)?([^/]+)"), which strips the protocol and the www prefix.
  1. Build a de-duplicated domain list on a second tab with =UNIQUE(B2:B), so one site never appears twice in your outreach queue.
  1. Add one IMPORTXML column per data point you need, such as title, meta description, and first heading, and let the sheet fill them in.

Keep the IMPORTXML columns on the same tab as the domains, so each row stays self-contained. Put the raw export on a separate tab and never edit it, so you can always rebuild the clean list if a formula breaks.

The best link prospecting tools can supply the starting URL list, and IMPORTXML then does the qualification work that a raw export cannot do on its own.

Five IMPORTXML formulas that build a prospect list

These five queries cover most prospecting jobs. Each one returns a different fact about a page, and together they tell you whether a site is worth pitching.

FormulaWhat it returnsProspecting use
=IMPORTXML(A2,"//title")Page titleCheck topical fit at a glance
=IMPORTXML(A2,"//meta[@name='description']/@content")Meta descriptionJudge whether the page is maintained
=IMPORTXML(A2,"//h1")First headingConfirm the page topic matches yours
=IMPORTXML(A2,"//a/@href")Every link addressSee who the page already links to
=IMPORTXML(A2,"//a[contains(@href,'contact')]/@href")Contact page linksFind where to send the pitch
=IMPORTXML(A2,"//a[contains(@href,'mailto:')]/@href")Email linksPull a contact address when listed

The title and heading queries are the fastest relevance check you have. If a prospect's title has nothing to do with your topic, drop the row before you spend time on outreach.

The link query is the most powerful one for prospecting. Pulling //a/@href from a resource page shows every site it already links to, which tells you whether your page belongs on that list and whether the page owner links out at all.

The contact query saves the most time. Instead of opening each site and hunting for a contact page, the formula returns the link directly, and you can filter the column for rows that returned nothing and handle those by hand.

A broken link checker is the right next step once IMPORTXML has given you a list of pages, because IMPORTXML can list links but cannot tell you which ones return a 404.

Check a prospect page before you pitch it

A prospect is not worth an email just because it exists. Use the IMPORTXML columns to run three quick checks before you write anything.

First, read the title and meta description together. A page with a clear, maintained title and a real description is usually an active site. A page with a missing description or a generic title may be abandoned, and an abandoned page rarely links out to anyone.

Second, look at the outbound links. A page that links to real, relevant sites is a good sign. A page that links mostly to unrelated commercial pages, or to casino and pharmacy sites, is a site to avoid, and the best free outreach tools will not fix a bad prospect list.

Third, confirm the site still publishes. Pull the newest article date with a query such as //time/@datetime when the site uses time tags, or check the newest post on its blog page. A site with no new content in a year may still link, but it is a weaker bet than one that published this month.

Contact discovery deserves its own pass. Run the mailto query across the list and keep the rows that return an address, then run the contact-page query on the rest. The GetProspect overview covers tools that find contact details when a site lists none, and those tools pair well with an IMPORTXML sheet.

Where IMPORTXML fails and what to use instead

IMPORTXML is a free shortcut, not a crawler, and it fails in predictable ways. Knowing the limits keeps you from blaming the formula for a problem it was never built to solve.

JavaScript-rendered pages are the biggest gap. IMPORTXML reads the raw HTML that Google's servers fetch, and content loaded by JavaScript after the page loads is invisible to it. Many modern sites render their content this way, so a blank result often means the page is dynamic, not that the XPath is wrong.

Rate limits are the second gap. Google's help page does not state a fixed count of import calls per sheet, but import functions share request limits, and a sheet with hundreds of IMPORTXML calls can return "Could not fetch URL" errors. When that happens, split the list across sheets, wait for the hourly refresh, or re-enter the failing formulas one at a time.

Some sites block the fetcher outright. A site can refuse Google's import requests while loading fine in a browser, and no XPath change will fix that. Treat those rows as manual checks and move on.

The backlink checker tool is the right complement here, because it checks live links and referring domains that IMPORTXML cannot measure. Use IMPORTXML to qualify prospects and a real checker to verify the links you earn.

According to the Google Workspace Updates blog of September 10, 2026, Google Sheets now supports up to 20 million cells per spreadsheet, double the previous 10 million limit. That headroom matters for prospecting, because one campaign sheet can hold tens of thousands of prospect rows without splitting the file. Source: Google Workspace Updates, September 10, 2026.

Frequently Asked Questions

What is IMPORTXML in Google Sheets?

IMPORTXML is a built-in function that imports data from structured sources such as HTML, XML, CSV, TSV, and RSS feeds into a cell. You give it a URL and an XPath query, and it returns the matching elements, such as a title, a heading, or a list of links.

Can IMPORTXML read JavaScript content?

No. IMPORTXML reads the raw HTML that Google's servers fetch, and content that loads through JavaScript after the page loads is invisible to it. For dynamic pages, use a crawler or a browser-based tool instead.

How many IMPORTXML formulas can a sheet run?

Google's help page does not state a fixed count, but import functions share request limits, so a sheet with hundreds of IMPORTXML calls can return errors. Keep the count modest, split large lists across sheets, and re-enter failing formulas after the hourly refresh.

Why does IMPORTXML return an error?

The usual causes are a URL that does not load, a site that blocks Google's fetcher, an XPath query that matches nothing, or content rendered by JavaScript. Test the formula on a simple page first, such as a Wikipedia article, to confirm the syntax works.

Is IMPORTXML free to use?

Yes. IMPORTXML is part of Google Sheets, which is free with a Google account. You pay nothing for the function itself, and the only cost is your time building and maintaining the sheet.

Expert verdict

Best for: link builders who qualify prospect lists by hand and want a free way to pull titles, descriptions and links into one sheet.

Not for: teams that need JavaScript-rendered pages, bulk status checks, or real-time data, because IMPORTXML refreshes hourly and cannot check whether a link is live.

Pros: free, no code needed, and the same five formulas work for almost every prospecting job.

Cons: no JavaScript support, shared request limits, and no HTTP status or link verification.

Bottom line

Build one clean prospecting sheet with a domain column and five IMPORTXML columns, and use it to judge every prospect before you pitch. When a page returns blank cells or fetch errors, check it by hand or with a crawler instead of forcing the formula.

Sources

BacklinkPrice Team
Written by
BacklinkPrice Team
Link building and backlink pricing research

The BacklinkPrice Team researches backlink prices, publisher sites and link building tools. We check prices and plans against each provider's own pages and date them, so you know how current the numbers are.

More from BacklinkPrice Team

Related guides