How to automate finding number of pages in a website using Bing and IMPORTXML 1

Sometimes you would require to find the number of pages in a website for a huge number of websites. For this, you can use the IMPORTXML inbuilt into Google sheets.


  1. Open a Google sheet.
  2. In column A, enter the list of URLs for which you want to find the number of pages.
  3. In column B, create a bing search URL.  example, use the concatenate function for this.
    • =concatenate(“”,A1)
  4. In column C, have a IMPORTXML formula that crawls and gets the number of pages into google sheets.
    • =IMPORTXML(B2, “//span[@class=’sb_count’]”)

By Muthali Ganesh

I am an engineer wih a masters in business administration from Chennai, India. I love discovering and sharing hacks.