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

# Quickstart

> Get an API key and make your first Blockworks Data API request in under five minutes.

This page gets you a key and a first Data API response. The key is the same one that
authenticates every Blockworks product, so you only do the first step once.

<Steps>
  <Step title="Get an API key">
    Create a key at [app.blockworks.com/account/api](https://app.blockworks.com/account/api).

    Keys are shown once at creation. Store yours in a secret manager or environment
    variable, and never commit it or send it from a browser.

    ```bash theme={null}
    export BLOCKWORKS_API_KEY="your-api-key"
    ```
  </Step>

  <Step title="Make your first request">
    Every request authenticates with the `X-Blockworks-API-Key` header. Here we page
    through the `assets` tabular model, which is the lookup surface for every
    asset we cover (the model is public, so this request also works without a key).

    <CodeGroup>
      ```bash curl theme={null}
      curl "https://api.blockworks.com/query/tabular/assets?pageSize=5" \
        -H "X-Blockworks-API-Key: $BLOCKWORKS_API_KEY"
      ```

      ```python Python theme={null}
      import os
      import requests

      response = requests.get(
          "https://api.blockworks.com/query/tabular/assets",
          params={"pageSize": 5},
          headers={"X-Blockworks-API-Key": os.environ["BLOCKWORKS_API_KEY"]},
          timeout=30,
      )
      response.raise_for_status()

      payload = response.json()
      for asset in payload["data"]:
          print(asset["prioritySymbol"], asset["name"])
      ```

      ```javascript JavaScript theme={null}
      const url = new URL("https://api.blockworks.com/query/tabular/assets");
      url.searchParams.set("pageSize", "5");

      const response = await fetch(url, {
        headers: { "X-Blockworks-API-Key": process.env.BLOCKWORKS_API_KEY },
      });
      if (!response.ok) throw new Error(`Request failed: ${response.status}`);

      const { data } = await response.json();
      for (const asset of data) {
        console.log(asset.prioritySymbol, asset.name);
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="Read the response envelope">
    Every Blockworks API response uses the same envelope: `error` is `null` on success
    and a string on failure, and `data` carries the payload. Tabular models add a
    `metadata` object with pagination totals for the full filtered result set.

    ```json Response (trimmed to one row and four of its fields) theme={null}
    {
      "error": null,
      "data": [
        {
          "assetID": "1e31218a-e44e-4285-820c-8282ee222035",
          "slug": "bitcoin",
          "prioritySymbol": "BTC",
          "name": "Bitcoin"
        }
      ],
      "metadata": {
        "totalRows": 47838,
        "totalPages": 15946
      }
    }
    ```

    Because `error` is always present, a single client-side check covers every
    endpoint, so you never need per-product error handling.

    <Note>
      Request a different page with `page`, and change the page size with `pageSize`.
      Tabular endpoints also serve `application/x-ndjson` and `text/csv` via the
      `Accept` header when you are pulling larger result sets.
    </Note>
  </Step>

  <Step title="Go deeper">
    <CardGroup cols={2}>
      <Card title="Filtering & pagination" icon="filter" href="/getting-started/filtering-pagination">
        Filter operator suffixes, sorting, column selection, paging, and response formats.
      </Card>

      <Card title="Tabular vs timeseries" icon="book" href="/getting-started/concepts/tabular-vs-timeseries">
        The two model kinds, their URL shapes, and when to reach for each.
      </Card>
    </CardGroup>

    Access tiers, the legacy header, caching, and key handling are covered in
    [Authentication](/getting-started/authentication).
  </Step>
</Steps>
