jeppevinkel/steam-search

API for searching on the Steam store.

1.0.3 2022-03-05 03:20 UTC

This package is auto-updated.

Last update: 2024-05-05 22:12:11 UTC


README

Packagist Version Packagist PHP Version Support Codecov

Api for searching games from the Steam store. This search API works by calling the regular steam store page and scraping the results from the page. It doesn't yet support scrolling the page, so it might be limited in the number of results per search query.

Installation

Use composer to install the package.

composer require jeppevinkel/steam-search

Usage

use SteamSearch\SteamSearch;

$steamSearch = new SteamSearch();
$queryBuilder = QueryBuilder::create()
    ->search('counter-strike')
    ->sortByReleaseDate();
$result = $steamSearch->search($queryBuilder);

// Results can also be filtered by max price.
$queryBuilder = QueryBuilder::create()
    ->search('counter-strike')
    ->sortByReleaseDate()
    ->maxPrice(50);
// Valid values for maxPrice are:
// 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
// To get all results, use maxPrice(-1), this is also the default value.

The result is an array of SearchResult objects. They each have the following properties:

public string $title;
public int $appId;
public string $url;
public ?Carbon $releaseDate;
public string $reviewSummary;

Docs

https://jeppevinkel.github.io/steam-search

Contributing

Pull requests are welcome. For design changes, please open an issue to discuss what you would like to change.

License

MIT