Complete the formula to import all the links from a webpage using IMPORTXML.
=IMPORTXML("https://example.com", "[1]")
The XPath //a/@href selects all link URLs from anchor tags on the page.
Complete the formula to import all the titles inside <title> tags from a webpage.
=IMPORTXML("https://example.com", "[1]")
The XPath //title selects all
Fix the error in the formula to import all paragraph texts from a webpage.
=IMPORTXML("https://example.com", [1])
The XPath //p/text() selects the text nodes inside all paragraph tags, which IMPORTXML can import as text.
Fill both blanks to import all image URLs and all link URLs from a webpage.
=IMPORTXML("https://example.com", "[1] | [2]")
The XPath //img/@src selects all image URLs, and //a/@href selects all link URLs. Using the pipe | combines both selections.
Fill all three blanks to import all product names, prices, and availability from a webpage with structured HTML.
=IMPORTXML("https://example.com/products", "//div[@class='product']/[1] | //div[@class='product']/[2] | //div[@class='product']/[3]")
Each XPath selects a specific span inside the product div: name, price, and availability. Combining them with | imports all three data types.