# Getting started

RarityDB is a GraphQL API (plus an [MCP server](/docs/mcp)) for Pokémon TCG data: every species, set, card and printing, linked together, with prices, marketplace IDs, sealed products, pull rates and expected value.

## 1. Create an account

Go to [https://raritydb.com/session/new](https://raritydb.com/session/new) and enter your email. We'll send a one-time sign-in link; there's no password. A new email address gets an account automatically.

## 2. Create an API key

On [your account page](https://raritydb.com/account), name a key and press **Create key**. The key starts with `rdb_` and is **shown once**: copy it somewhere safe. If you lose it, revoke it and make a new one.

## 3. Make your first request

Every request is a `POST` to `https://raritydb.com/graphql` with a JSON body and your key in the `Authorization` header:

```bash
curl https://raritydb.com/graphql \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ card(code: \"sv03.5-006\") { name hp set { name } } }"}'
```

```json
{ "data": { "card": { "name": "Charizard ex", "hp": 330, "set": { "name": "151" } } } }
```

## Prefer a terminal?

The [command line](/docs/cli) signs you in from the browser and covers the whole API: `raritydb login`.

## 4. Explore

- Find anything by name with [`search`](/docs/finding-things), or translate IDs from TCGplayer, Cardmarket or pokemontcg.io with `resolveId`.
- Read [Core concepts](/docs/concepts) to see how species, sets, cards and printings fit together.
- Try queries in the browser with the [Explorer](/docs/explorer), or read the [Schema reference](/docs/reference).

A fuller first query:

```graphql
{
  card(code: "sv03.5-006") {
    name rarity illustrator
    set { name releaseDate }
    species { species { name evolutionLine { name } } }
    printings {
      finish
      price { trend asOf currency attribution }
      marketplaceLinks { marketplace url exact }
    }
    externalIds { source value }
  }
}
```
