# Marvel Snap API
> Marvel Snap card data as an API, built on the open snap.fan dataset for Second Dinner's hit mobile card game. Search and filter the full card pool by name, energy cost, power, series or card type, fetch any card by its key or name for its cost, power, ability text, collectible series and official art, and pull a random card. Real card data, no key needed upstream. Ideal for deck builders, card-search and collection tools, tier-list sites and Marvel Snap fan apps.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/marvelsnap-api/..."
```

## Pricing
- **Free** (Free) — 10,300 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 141,000 calls/Mo, 8 req/s
- **Pro** ($16/Mo) — 735,000 calls/Mo, 25 req/s
- **Mega** ($60/Mo) — 3,380,000 calls/Mo, 50 req/s

## Endpoints

### Marvel Snap

#### `GET /v1/card` — A single card by key or name

**Parameters:**
- `name` (query, required, string) — Card name or key, e.g. Abomination Example: `Abomination`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marvelsnap-api/v1/card?name=Abomination"
```

**Response:**
```json
{
    "data": {
        "card": {
            "key": "Abomination",
            "url": "/cards/Abomination/",
            "cost": 5,
            "name": "Abomination",
            "image": "https://game-assets.snap.fan/card_variant_images/Abomination-1a5e6f63520f5b991a8000712f6ee5c99e8a5b1fdafc1c30e8016452894b58a5.webp",
            "power": 9,
            "series": "Starter",
            "ability": "Foolish rabble! You are beneath me!",
            "variants": 11,
            "card_type": 0,
            "turn_drawn": null,
            "is_released": true,
            "series_short": "Starter",
            "is_collectable": true,
            "starts_in_hand": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:26.142Z",
        "request_id": "7556491a-c522-414e-8fbd-100671f98b35"
    },
    "status": "ok",
    "message": "Card retrieved successfully",
    "success": true
}
```

#### `GET /v1/cards` — Search & filter cards

**Parameters:**
- `name` (query, optional, string) — Name contains
- `cost` (query, optional, string) — Energy cost, e.g. 1 Example: `1`
- `power` (query, optional, string) — Power value
- `series` (query, optional, string) — Collectible series
- `card_type` (query, optional, string) — Card type
- `limit` (query, optional, string) — Max results (default 30, max 200) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marvelsnap-api/v1/cards?cost=1&limit=30"
```

**Response:**
```json
{
    "data": {
        "cards": [
            {
                "key": "Agent13",
                "url": "/cards/Agent13/",
                "cost": 1,
                "name": "Agent 13",
                "image": "https://game-assets.snap.fan/card_variant_images/Agent13-13b8e1d703500e08840e9f30ac37fbcaa678a2554469d2c776cf25115a3f7099.webp",
                "power": 2,
                "series": "Series 2 (Collection Level 222-486)",
                "ability": "On Reveal: Add a random card to your hand.",
                "variants": 13,
                "card_type": 0,
                "turn_drawn": null,
                "is_released": true,
                "series_short": "Series 2",
                "is_collectable": true,
                "starts_in_hand": false
            },
            {
                "key": "Agony",
                "url": "/cards/Agony/",
                "cost": 1,
                "name": "Agony",
                "image": "https://game-assets.snap.fan/card_variant_images/Agony-bc7a99adadd46713e87a1b57c81dfc7b7fb05dc08c15ecb86820018b071e140a.webp",
                "power": 2,
                "series": "Series 4",
                "ability": "After you play a card here, merge this into it.",
                "variants": 4,
                "card_type": 0,
                "turn_drawn": null,
                "is_released": true,
                "series_short": "Series 4",
                "is_collectable": true,
                "starts_in_hand": false
            
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/random` — A random card

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marvelsnap-api/v1/random"
```

**Response:**
```json
{
    "data": {
        "card": {
            "key": "DoctorStrange",
            "url": "/cards/DoctorStrange/",
            "cost": 2,
            "name": "Doctor Strange",
            "image": "https://game-assets.snap.fan/card_variant_images/DoctorStrange-b05d7d9c7f09c8981d5800833bbfe8f8d27777917e7907e15d0f3586ba484f1e.webp",
            "power": 4,
            "series": "Series 1 (Collection Level 18-214)",
            "ability": "On Reveal: Move your highest-Power card(s) to this location.",
            "variants": 21,
            "card_type": 0,
            "turn_drawn": null,
            "is_released": true,
            "series_short": "Series 1",
            "is_collectable": true,
            "starts_in_hand": false
        }
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:26.325Z",
        "request_id": "8deefc4e-ab46-4485-b0b8-9d41cda06710"
    },
    "status": "ok",
    "message": "Random card retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service description & endpoints

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/marvelsnap-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "marvelsnap-api",
        "endpoints": {
            "GET /v1/card": "A single card by key or name (key= | name=, e.g. Abomination).",
            "GET /v1/meta": "This document.",
            "GET /v1/cards": "Search/filter cards (name=, cost=, power=, series=, card_type=, limit=).",
            "GET /v1/random": "A random card."
        },
        "description": "Marvel Snap card data via the open snap.fan API: search and filter the full card pool by name, cost, power, series or card type; fetch a single card with its ability text and art; and pull a random card. Real data, no key."
    },
    "meta": {
        "timestamp": "2026-06-08T01:18:26.423Z",
        "request_id": "804befef-071a-411c-8fec-4ffee23538f2"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/marvelsnap-api
OpenAPI spec: https://www.oanor.com/api/marvelsnap-api/openapi.json
