# Help with Google Sheets xml call

**URL:** <https://forums.eveonline.com/t/help-with-google-sheets-xml-call/253316>\
**Category:** Third Party Developers\
**Created:** [July 6, 2020, 4:37pm UTC](https://forums.eveonline.com/t/help-with-google-sheets-xml-call/253316 "2020-07-06T16:37:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [July 6, 2020, 4:46pm UTC](https://forums.eveonline.com/t/help-with-google-sheets-xml-call/253316/2 "2020-07-06T16:46:37Z")

</div>

It would probably be easier to use [https://market.fuzzwork.co.uk/api/](https://market.fuzzwork.co.uk/api/).

For example, add this function to your script editor:

```auto
/**
* Query's Fuzz market API for the given types
* @param {range} A vertical range of type_ids.
* @return maxBuy and minSell for each type_id
* @customfunction
*/
function fuzzApiPriceData(type_ids) {
  if (!type_ids) throw 'type_ids is required';
  const ids = Array.isArray(type_ids) ? type_ids.map(id => id[0]) : [type_ids];
  const fuzz_price_data = JSON.parse(UrlFetchApp.fetch(`https://market.fuzzwork.co.uk/aggregates/?station=60003760&types=${ids.join(',')}`));
  return [['minSell', 'maxBuy']].concat(type_ids.map(type_id => [parseFloat(fuzz_price_data[type_id]['sell']['min']), parseFloat(fuzz_price_data[type_id]['buy']['max'])]));
}

```

You could then use it like `=fuzzApiPriceData(A1:A100)`, and it’ll return the max buy and min sell for each `type_id` in that range.

---

_[View the full topic](https://forums.eveonline.com/t/help-with-google-sheets-xml-call/253316)._
