forked from syntaxerrors/Steam
-
Notifications
You must be signed in to change notification settings - Fork 0
Pagination
TeemoCell edited this page Jul 20, 2026
·
2 revisions
Steam services use different pagination models. Do not apply one pagination strategy to every endpoint.
app()->GetAppList() follows IStoreService result pages automatically.
$apps = $steam->app()->GetAppList([
'include_games' => true,
'include_dlc' => false,
'max_results' => 50000,
]);The returned array can be large. For scheduled imports:
- run the operation outside a web request;
- process results in chunks;
- use
if_modified_sincefor incremental refreshes where appropriate; - upsert records instead of deleting and recreating the catalog;
- keep memory limits in mind.
workshop()->QueryFiles() performs one query per call. Pass the pagination values returned or expected by the selected Steam query mode into the next request.
$arguments = [
'query_type' => 1,
'appid' => 620,
'page' => 1,
'numperpage' => 100,
'return_details' => true,
];
$response = $steam->workshop()->QueryFiles($arguments);When using cursor-based filters, the client defaults the initial cursor to *. Carry the response cursor into the next call according to Steam's response format.
Every pagination loop should have:
- a clear termination condition;
- a maximum page or request guard;
- retry limits;
- duplicate protection;
- logging that excludes API keys;
- persistence checkpoints for large imports.
Documentation for teemocell/steam-web-api · Licensed under the MIT License