Skip to content

Instantly share code, notes, and snippets.

@Jiiks
Created September 9, 2025 05:37
Show Gist options
  • Select an option

  • Save Jiiks/22a54e5b27b7dc1a4b6aeda2f28d1d1f to your computer and use it in GitHub Desktop.

Select an option

Save Jiiks/22a54e5b27b7dc1a4b6aeda2f28d1d1f to your computer and use it in GitHub Desktop.
poelol
(async () => {
const searchResponse = await fetch('https://www.pathofexile.com/api/trade2/search/poe2/Rise%20of%20the%20Abyssal', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify(
{
'query': {
'status': {
'option': 'available'
},
'type': 'Fireball',
'stats': [{
'type': 'and',
'filters': [],
'disabled': false
}],
'filters': {
'req_filters': {
'filters': {
'lvl': {
'max': 64
}
},
'disabled': false
},
'misc_filters': {
'filters': {
'gem_level': {
'min': 16,
'max': null
}
},
'disabled': false
},
'type_filters': {
'filters': {
'category': {
'option': 'gem.activegem'
}
},
'disabled': false
}
}
},
'sort': {
'price': 'asc'
}
}
)
});
if (!searchResponse.ok) {
console.log(`Error: ${searchResponse.status}`);
return;
}
const result = await searchResponse.json();
const nextUrl = `https://www.pathofexile.com/api/trade2/fetch/${result.result.join(',')}?query=${result.id}&realm=poe2`;
const fetchResponse = await fetch(nextUrl);
if (!fetchResponse.ok) {
console.log(`Error: ${fetchResponse.status}`);
return;
}
const fetchResult = await fetchResponse.json();
console.log(fetchResult);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment