> ## Documentation Index
> Fetch the complete documentation index at: https://docs.8bitedge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Started with the 8bitedge API: A Five-Minute Guide

> Learn how to authenticate, verify your key, browse the game catalog, and pull a live demand leaderboard with the 8bitedge API in minutes.

By the end of this guide you'll have made your first authenticated API call, confirmed your account and plan details, browsed the game catalog, and pulled a live demand leaderboard — all from your terminal. The only tool you need is `curl` (and optionally `jq` for pretty-printing JSON).

## Prerequisites

You need an 8bitedge API key to follow along. Keys are provisioned per organization — contact the 8bitedge team to get set up. Your key looks like `bit_ab12cd34ef56.<secret>` and the full plaintext value is shown only once at provisioning time, so store it somewhere safe immediately.

<Steps>
  <Step title="Store your API key">
    Export your key and the base URL into shell variables so every subsequent command stays readable:

    ```bash theme={null}
    export BITEDGE_API_KEY="bit_ab12cd34ef56.<secret>"
    export BASE="https://api.8bitedge.com/api/v1"
    ```

    <Warning>
      Never hard-code your API key in scripts you commit to version control. Environment variables or a secrets manager are the right home for it.
    </Warning>
  </Step>

  <Step title="Verify your key">
    The `GET /api/v1/me` endpoint returns your organization, plan limits, key metadata, and current usage. It requires a valid key but no specific scope, making it the perfect health check.

    ```bash theme={null}
    curl -s "https://api.8bitedge.com/api/v1/me" \
      -H "Authorization: Bearer $BITEDGE_API_KEY" | jq
    ```

    A successful response looks like this:

    ```json theme={null}
    {
      "data": {
        "organization": { "id": 1, "name": "Acme Corp", "status": "active" },
        "plan": {
          "slug": "starter",
          "name": "Starter",
          "rate_limit_per_minute": 120,
          "rate_limit_per_day": 20000,
          "monthly_quota": 250000,
          "max_batch_size": 50,
          "max_page_size": 50
        },
        "api_key": {
          "name": "server",
          "last_four": "9f3a",
          "scopes": ["games.read", "consoles.read"]
        },
        "usage": {
          "month": { "used": 1234, "quota": 250000, "resets_in": 1209600 }
        }
      }
    }
    ```

    Check the `scopes` array to confirm which endpoints your key can access. If you see `insufficient_scope` errors later, this is the first place to look.
  </Step>

  <Step title="Browse the game catalog">
    The `GET /api/v1/games/titles` endpoint returns a paginated list of every enabled game in the catalog. This endpoint requires the `games.read` scope.

    ```bash theme={null}
    curl -s "https://api.8bitedge.com/api/v1/games/titles" \
      -H "Authorization: Bearer $BITEDGE_API_KEY" | jq
    ```

    The response is paginated. By default you get 25 results per page (capped by your plan's `max_page_size`):

    ```json theme={null}
    {
      "data": [
        { "id": 12, "display_game_name": "Aladdin" },
        { "id": 47, "display_game_name": "Battletoads" }
      ],
      "meta": {
        "pagination": {
          "mode": "page",
          "page": 1,
          "per_page": 25,
          "total": 842,
          "last_page": 34
        }
      },
      "links": {
        "next": "https://api.8bitedge.com/api/v1/games/titles?page=2",
        "prev": null
      }
    }
    ```

    Follow `links.next` to walk through subsequent pages, or fetch a specific game by id to get full pricing details:

    ```bash theme={null}
    curl -s "https://api.8bitedge.com/api/v1/games/game/123" \
      -H "Authorization: Bearer $BITEDGE_API_KEY" | jq
    ```

    ```json theme={null}
    {
      "data": {
        "id": 123,
        "game_name": "Chrono Trigger",
        "game_slug": "chrono-trigger",
        "console_id": 19,
        "price_loose": "40.00",
        "price_complete": "95.50",
        "price_new": "300.00"
      }
    }
    ```

    <Tip>
      Pass `?limit=50` to fetch up to your plan's `max_page_size` per request. Always read `meta.pagination.per_page` in the response — the server silently caps oversized `limit` values to your plan maximum.
    </Tip>
  </Step>

  <Step title="Check the demand leaderboard">
    The demand leaderboard is where 8bitedge's market intelligence comes to life. `GET /api/v1/demand-intent/games` ranks every game by buyer intent over a rolling time window. This endpoint requires the `demand-intent.read` scope.

    ```bash theme={null}
    curl -s "https://api.8bitedge.com/api/v1/demand-intent/games?period=7d" \
      -H "Authorization: Bearer $BITEDGE_API_KEY" | jq
    ```

    Each row in the leaderboard tells you exactly how much buyer interest a game is generating and whether that interest is accelerating:

    ```json theme={null}
    {
      "data": [
        {
          "rank": 1,
          "game": {
            "id": 412,
            "name": "Chrono Trigger",
            "slug": "chrono-trigger",
            "console_id": 19,
            "console_name": "Nintendo SNES"
          },
          "intent": {
            "redirects": 980,
            "distinct_users": 712,
            "mobile_share": 0.41
          },
          "watch": { "watch_count": 64 },
          "momentum": { "value": 1.4, "label": "rising" },
          "pricing": {
            "loose": "40.00",
            "complete": "95.50",
            "new": "300.00"
          },
          "demand_score": 100
        }
      ],
      "meta": {
        "period": "7d",
        "period_date": "2025-01-15",
        "sort": "intent",
        "pagination": {
          "mode": "page",
          "page": 1,
          "per_page": 25,
          "total": 842,
          "last_page": 34
        }
      }
    }
    ```

    Key fields to understand:

    | Field                   | What it tells you                                                      |
    | ----------------------- | ---------------------------------------------------------------------- |
    | `intent.redirects`      | How many buyer clicks this game generated in the period                |
    | `intent.distinct_users` | Unique buyers showing interest — reach, not just volume                |
    | `watch.watch_count`     | Buyers who added this game to a watchlist — latent demand              |
    | `momentum.label`        | `rising` (≥1.2×), `steady`, or `cooling` (below 0.8×) vs. 30d baseline |
    | `demand_score`          | 0–100 composite index blending intent, reach, and watch demand         |

    You can sort by `watches` or `momentum` instead of the default `intent` sort:

    ```bash theme={null}
    curl -s "https://api.8bitedge.com/api/v1/demand-intent/games?period=7d&sort=momentum" \
      -H "Authorization: Bearer $BITEDGE_API_KEY" | jq
    ```
  </Step>

  <Step title="Read rate-limit headers">
    Every response from the 8bitedge API includes rate-limit headers so your integration can stay within plan limits without guessing. Use `curl -D -` to dump response headers to stdout:

    ```bash theme={null}
    curl -s -D - "$BASE/games/titles" \
      -H "Authorization: Bearer $BITEDGE_API_KEY" \
      -o /dev/null
    ```

    Look for these headers in the output:

    ```text theme={null}
    HTTP/2 200
    x-request-id: 5f3c1e2a-...-9b21
    x-ratelimit-limit: 120
    x-ratelimit-remaining: 117
    x-ratelimit-reset: 42
    ```

    | Header                  | Meaning                                     |
    | ----------------------- | ------------------------------------------- |
    | `X-RateLimit-Limit`     | Your plan's per-minute request limit        |
    | `X-RateLimit-Remaining` | Calls left in the current one-minute window |
    | `X-RateLimit-Reset`     | Seconds until the window resets             |

    If you exhaust the window, you'll receive a `429` with a `Retry-After` header telling you exactly how many seconds to wait before retrying:

    ```json theme={null}
    {
      "error": {
        "code": "rate_limit_exceeded",
        "message": "Rate limit exceeded for the minute window.",
        "details": { "window": "minute", "limit": 120 }
      }
    }
    ```
  </Step>
</Steps>

## A note on scopes

Your API key's `scopes` array controls which endpoints you can call. Here's a quick reference for the endpoints in this guide:

| Endpoint                      | Scope required        |
| ----------------------------- | --------------------- |
| `GET /api/v1/me`              | None (valid key only) |
| `GET /api/v1/games/*`         | `games.read`          |
| `GET /api/v1/consoles*`       | `consoles.read`       |
| `GET /api/v1/demand-intent/*` | `demand-intent.read`  |

If your key is missing a required scope, the API returns `403 insufficient_scope`. Check your scopes with `GET /api/v1/me` and contact the 8bitedge team to have additional scopes added to your key.

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Deep-dive into bearer keys, scopes, and how to handle every auth error code.
  </Card>

  <Card title="Plans & Limits" icon="gauge" href="/concepts/plans-and-limits">
    Understand rate limits, monthly quotas, page size caps, and what happens when you exceed them.
  </Card>

  <Card title="Demand Signals Guide" icon="chart-line" href="/guides/demand-signals">
    Learn how to use momentum scores, condition breakdowns, and search analytics to drive sourcing decisions.
  </Card>

  <Card title="Catalog Lookups Guide" icon="book" href="/guides/catalog-lookups">
    Efficiently query the games and consoles catalog — by id, slug, title, or console.
  </Card>
</CardGroup>
