Skip to main content
GET
Unified CS2 search across matches, teams, players, tournaments

What it returns

One flat, score-sorted list of mixed-type hits. Each item carries a type discriminator (match / team / player / tournament), the entity’s stable id, a short label for the primary line, a sub_label for the secondary line, and a score between 0 and 1. Hits are intentionally lean — clients follow up with GET /cs2/v1/{type}/{id} when the user picks one. Designed for global autocomplete bars: one round-trip per keystroke, no client-side merging across four list endpoints.

Required scope

No single scope is required at the endpoint level. Instead, each result type is filtered by the matching list scope: Missing a scope simply drops that type from the response — no 403. A key with zero list scopes gets an empty data array. This lets the same endpoint serve narrow-scope keys (e.g. team-only autocomplete) and broad operator keys without a distinct URL per audience.

Ranking

Tiered relevance score over each entity’s name column, taking the max across tiers: Rows scoring below 0.15 are dropped. Trigram tier handles typos and partial words (“vitalty” → “Vitality”, “naturl” → “Natural”) via Postgres pg_trgm GIN indexes. Match search. Matches don’t carry their own name. They’re scored via FK joins — a match’s score is max(team_a_score, team_b_score, tournament_score). Typing a team surfaces that team’s upcoming/live/recent fixtures; typing a tournament surfaces all its matches.

Behaviour notes

  • Minimum query length is 2 characters. Single-char queries match too broadly to rank usefully and return 400.
  • limit is the total across all types, not a per-type cap. One result type can fill all slots when no others match.
  • types= is honoured first, then scope-filtered. Asking for types=teams,players with a teams-only key returns teams; the unknown-to-this-key players type is silently dropped.
  • Stable ordering on ties. Matches are passed in first, so when a team and a match tie on score, the match wins — fixtures are the most actionable autocomplete result.

Examples

Autocomplete across everything:
Teams + players only, deeper result list:
Find upcoming fixtures by tournament name:
  • GET /cs2/v1/teams?search= — same ranking, scoped to teams, supports pagination and region filter.
  • GET /cs2/v1/players?search= — same ranking, scoped to players, supports current-team filter.

Authorizations

X-API-Key
string
header
required

Tenant API key issued during onboarding

Query Parameters

q
string
required

Search query. Minimum 2 characters.

Minimum string length: 2
types
string | null

Comma-separated subset of matches,teams,players,tournaments. Omitted → all four (subject to scope filtering).

limit
integer
default:10

Maximum results across all types combined.

Required range: 1 <= x <= 50

Response

Successful Response

The response is of type Response Unified Search Cs2 V1 Search Get · object.

Last modified on May 10, 2026