Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

GGScore Python client — CS2 Match Data API SDK

GGScore

Python client for the GGScore CS2 Match Data API

Official Python SDK for GGScore — Counter-Strike 2 played match results and upcoming fixtures over REST (X-API-Key). Built for scripts, bots, notebooks, and LLM-generated code (copy-paste friendly).

GGScoreDocsLicense: MITPython 3.10+

Install

# From GitHub (until PyPI publish)
pip install "ggscore @ git+https://github.com/ggscore-org/python-client.git"# Or clone
git clone https://github.com/ggscore-org/python-client.git
cd python-client
pip install -e .

Get a Free API key: ggscore.net · Docs: ggscore.net/docs

Quickstart (sync — preferred for LLMs)

importosfromggscoreimportClientos.environ["GGSCORE_API_KEY"] ="your-key"# or CS2_MATCH_API_KEYwithClient() asclient:
played=client.matches(limit=5)
upcoming=client.upcoming_matches(limit=5)
print(played["data"][0]["team_won"], played["data"][0]["score_won"])

Pass the key explicitly:

client=Client(api_key="your-key")
print(client.matches_latest(limit=3))
client.close()

Async

importasynciofromggscoreimportAsyncClientasyncdefmain() ->None:
asyncwithAsyncClient() asclient:
print(awaitclient.matches(limit=5))
asyncio.run(main())

Environment

VariableRequiredDefault
GGSCORE_API_KEY or CS2_MATCH_API_KEYyes*
GGSCORE_API_BASE or CS2_MATCH_API_BASEnohttps://api.ggscore.net

*Not required only for stats() (public endpoint).

Methods

MethodHTTP
matches(page=1, limit=10, **filters)GET /api/v2/matches
matches_latest(limit=10)GET /api/v2/matches/latest
upcoming_matches(page=1, limit=10)GET /api/v2/upcoming_matches
match(id)GET /api/v2/match/{id}
teams / team / events / event / player / countriesdirectory + cards
maps / map_recent_matches(slug)map catalog
stats()GET /api/v2/stats (public)

All list helpers return the API JSON (data + meta where applicable) as plain dicts — no heavy ORM.

Errors

fromggscoreimportAuthenticationError, RateLimitError, NotFoundError, GGScoreError
  • 401AuthenticationError
  • 404NotFoundError
  • 429RateLimitError (Free tier quotas — cache / back off)
  • other 4xx/5xx → GGScoreError

Related examples

RepoRole
telegram-cs2-botTelegram /results + /schedule
discord-cs2-botDiscord slash /results
ggscore-orgOrg profile

Keywords

CS2 API Python · Counter-Strike 2 match data client · esports REST SDK · GGScore Python · httpx CS2 · no scraping

License

MIT — see LICENSE.

About

Official Python client for GGScore CS2 Match Data API (sync + async, LLM-friendly). Counter-Strike 2 match results & upcoming fixtures.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages