SteamVault
Documentation menu

Pagination & sorting

Pagination

Results come in pages of 16 games by default. Use per_page (up to 100) and page to move through them:

GET /games?genres=indie&per_page=50&page=2

Every response includes everything you need to paginate:

FieldMeaning
totalHow many games match your filters
current_page / last_pageWhere you are, and how many pages there are
next_page_url / prev_page_urlReady-made links, null at the ends
from / toPosition of the first and last game on this page

The simplest way to walk through all results is to keep following next_page_url until it's null:

let url = "https://api.steam-vault.com/games?genres=indie&per_page=100";

while (url) {
  const page = await fetch(url, { headers: { Authorization: "Bearer YOUR_TOKEN" } }).then((r) => r.json());
  handle(page.data);
  url = page.next_page_url;
}

Sorting

Use sort=field:asc or sort=field:desc:

GET /games?sort=release_date:desc

You can sort by name, release_date, any price (final_price_us, initial_price_ar…), discount (discount_us…) or review field (score, total_reviews, last_month_score…). When you sort by a number, games missing that value are left out.

Random order

sort=shuffle returns results in random order — great for "surprise me" features:

GET /games?genres=indie&min_score=85&min_total_reviews=200&sort=shuffle&per_page=1

It's slower on big result sets, so pair it with filters.

Wishlist ranking

sort_wishlist=max sorts by the best position a game ever reached in Steam's most-wishlisted ranking, and sort_wishlist=current by its latest position. Games that never entered the ranking are left out.