> ## Documentation Index
> Fetch the complete documentation index at: https://proclubs-sdk.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install proclubs-sdk and make your first club request.

## Install

```bash theme={null}
npm install proclubs-sdk
```

## Search for a club

```ts theme={null}
import { ProClubsClient } from 'proclubs-sdk'

const proclubs = new ProClubsClient()
const clubs = await proclubs.clubs.search({ name: 'HEMLE FC' })

console.log(clubs)
```

The default platform is `common-gen5`. Search names are trimmed and must contain
between 1 and 32 characters.

## Check club rankings

```ts theme={null}
const [hemleAllTime] = await proclubs.rankings.searchAllTime({
  name: 'HEMLE FC',
})
const hemleSeason = await proclubs.rankings.searchCurrentSeason({
  name: 'HEMLE FC',
})
const leaders = await proclubs.rankings.allTime()

console.log(hemleAllTime, hemleSeason, leaders[0]?.rank)
```

Search returns `[]` when the club is not on that board. Full leaderboards keep
EA response order. These routes do not provide server pagination.

## Load a club dashboard

Use the `clubId` returned by search to request the other resources. Independent
requests can run in parallel.

```ts theme={null}
import { ProClubsClient } from 'proclubs-sdk'

const proclubs = new ProClubsClient()
const [club] = await proclubs.clubs.search({ name: 'HEMLE FC' })

if (!club) {
  console.log('Club not found')
  process.exit(0)
}

const clubId = club.clubId
const [info, overallStats, memberStats, careerStats, matches, playoffs] =
  await Promise.all([
    proclubs.clubs.get({ clubId }),
    proclubs.clubs.overallStats({ clubId }),
    proclubs.members.stats({ clubId }),
    proclubs.members.careerStats({ clubId }),
    proclubs.matches.list({ clubId }),
    proclubs.clubs.playoffAchievements({ clubId }),
  ])

console.log({ info, overallStats, memberStats, careerStats, matches, playoffs })
```

`playoffs` is an ordered history. It preserves EA's raw season and performance
codes and adds readable labels such as `Season 7`, `Division 2`, and `Champion`.
Clubs with no playoff history return `[]`.

<Tip>
  EA may add fields to responses. The SDK validates the known envelope and
  preserves additional upstream fields instead of discarding them.
</Tip>

## Choose a platform

Set a default on the client or override it for one call.

```ts theme={null}
const proclubs = new ProClubsClient({ platform: 'nx' })

const currentGenClubs = await proclubs.clubs.search({
  name: 'HEMLE FC',
  platform: 'common-gen5',
})
```

Supported platforms are `common-gen5` and `nx`.

<Warning>
  `common-gen4` is deprecated. EA rejects it with HTTP 400 since the FC 27
  switchover (last checked on 2026-09-30). See
  [Configuration](/docs/guides/configuration#deprecated-platforms).
</Warning>

## Handle SDK errors

```ts theme={null}
import {
  ProClubsClient,
  ProClubsError,
  ProClubsHttpError,
} from 'proclubs-sdk'

const proclubs = new ProClubsClient()

try {
  await proclubs.clubs.get({ clubId: '12345' })
} catch (error) {
  if (error instanceof ProClubsHttpError) {
    console.error(error.status, error.endpoint)
  } else if (error instanceof ProClubsError) {
    console.error(error.code, error.message)
  } else {
    throw error
  }
}
```

<Card title="Understand failures" icon="triangle-exclamation" href="/docs/guides/errors-and-retries">
  See every error class and the exact retry policy.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.