Brian
Brian

Reputation: 13

Using =IMPORTXML with google sheets to pull data from Ebay API

I am having trouble figuring out the xpath to pull a couple specific pieces of data from this ebay xml into a google sheet using the ImportXML function.

I currently am using "////" as the xpath and am able to pull all the data from the page. But I need to just get 2 pieces of information: convertedCurrentPrice and shippingServiceCost (as shown in the screenshot provided).

Any help is greatly appreciated!

Screenshot: Desired Data Marked with Red

Upvotes: 0

Views: 1565

Answers (1)

Brian
Brian

Reputation: 13

Thank you to those that replied. I actually figured out that since it is raw XML data, I need to use a google apps script with XmlService.parse(), getChild(), etc to pull data out and write it to the spreadsheet.

Reference: https://developers.google.com/apps-script/reference/xml-service/

Upvotes: 0

Related Questions