Scrape Bing search results into spreadsheet

If you’re looking to import Bing search results into a spreadsheet, you know how time consuming it can be.

Bing search results can be a hassle to copy into a spreadsheet

Fortunately, Google Docs makes it pretty easy, and using XPathBuilder, you can quickly and easily generate the code to pull the results in quickly.

(NOTE: In order to do this, you must have a Google Docs account.  If you don’t have one, go here to get one.  Signup is free.  If you have a Gmail account, you already have a login.)

Step 1: Go to the tool at XPathBuilder and enter the query of your choice in one of the Search String fields.

Generate XPath code for importXML in Google Docs

 

Step 2: The dropdown menu directly to the right of the Search String field offers a series of search engines.  Click Bing in that list.  (NOTE: You must select a search engine in the list – if you don’t, it won’t generate the code.)

Select Bing as the search engine to generate your XPath code

 

Step 3: Click the Submit button at the bottom of the screen.  The code should then appear in the Search String Results field.

XPath code for xmlIMPORT function in Google Docs

 

Step 4: Select the code, copy it and paste it into a cell in your Google spreadsheet.  The code should execute automatically.

Bing search results imported into Google spreadsheet through importXML function

 

Notice that the code is actually within cell A1, but what actually appears is the #1 result for the keyword in Bing.

Unlike using importXML and XPath to import Google results, these commands seem to be fairly reliable for Bing, and don’t appear to suffer the same level of unreliability in terms of importing results.  However, if your experience has been different, drop us a line in the comment thread to describe what’s happening on your end.

Comments

  1. Bryan says:

    Great idea, this tool was really needed for noobs like me after I watched the Google Docs Unleashed videos, I was still struggling with it. What I would really like to be able to do is grab flight results but I played with Bing travel a lot and could not get it to fetch the price of flights in a spreadsheet. I would be happy if I could just grab one of the results but it’s not easy.

    Would you mind giving me a hand?

    And BTW, i wanted to +1 or like your webpage here and didn’t see it also it would be great if you could add a subscribe to RSS and subscribe to comments here. Just a suggestion.

    • ryan says:

      Great suggestions, Bryan. We’ll put your ideas on a list for future improvements. I’ll see what I can do about the Bing travel code. Stay tuned.

Speak Your Mind

*