This is particularly useful when you want to know the going rate of an item you're planning to sell, i.e. in conjunction with the "Sold items" filter.
$x("//ul[contains(@class,'srp-results')]//div//span[contains(@class,'s-card__price')]").slice(0,22).map(x => Number(x.innerText.slice(1))).reduce((x,y) => x + y)/22NB: 22 is the number of items I want to take and average. Adjust as needed to match the number of items that match your search (or limit the number of items you want to take the average of).