Get data from a web service
=WEBSERVICE(url)
| Parameter | Description |
|---|---|
url |
The url of the web service to call. |
A web service uses a protocol like HTTP to retrieve data in a machine-readable format like XML or JSON. For example, a formula that uses WEBSERVICE to
=WEBSERVICE(“http://somewebservice.com/endpoint?query=xxxx”)
A simple example of a web service is RSS, which is used to syndicate content in XML format. RSS is widely available and does not require authenticatio
=WEBSERVICE("https://www.nasa.gov/rss/dyn/breaking_news.rss")
When the result from WEBSERVICE is XML, you can use the FILTERXML function to parse the data. In the example shown, this is how the data and title of
=MID(FILTERXML(B4,"//item/pubDate"),6,11)
The formula in C7 extracts the title:
=FILTERXML(B4,"//item/title")