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

# Query (JSON)

> POST /query/json: the same query, with the rows returned as JSON.

```http theme={null}
POST https://api.bloklake.com/v1/chains/{chain}/query/json
Authorization: Bearer <key>
Content-Type: application/json
```

Takes exactly the same body as [`POST /query`](https://docs.bloklake.com/api-reference/query) and returns one JSON object.
Use it for exploring and debugging; for real workloads use `/query`, which is 2–2.5× smaller and
therefore cheaper. See [Arrow vs JSON](https://docs.bloklake.com/responses/arrow-vs-json.md).

## Example

```bash theme={null}
curl https://api.bloklake.com/v1/chains/eth/query/json \
  -H "Authorization: Bearer $BLOKLAKE_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"fromBlock": 19426000, "toBlock": 19426000,
       "transactions": [{"to": ["0x6b75d8af000000e20b7a7ddf000ba900b4009a80"]}],
       "fields": {"transaction": {"hash": true, "from": true, "value": true, "gasUsed": true, "status": true, "sighash": true}}}'
```

```json theme={null}
{
  "archive_height": 21034551,
  "finalized_block": 21034480,
  "from_block": 19426000,
  "to_block": 19426000,
  "next_block": 19426001,
  "objects": 2,
  "query_id_template": "0x…",
  "to_block_hash": null,
  "unavailable_fields": [],
  "transactions": [
    {
      "hash": "0xa3958506c9bae6c6a3d5c7861b9461d01ddb33eca01b461920d59c31ed710275",
      "from": "0xae2fc483527b8ef99eb5d9b44875f005ba1fae13",
      "value": "208",
      "gas_used": 435741,
      "status": 1,
      "sighash": "0x2b959e09"
    },
    …
  ]
}
```

(Shortened: the second transaction is left out.)

## Response

**from\_block** `integer`

First block covered.

**to\_block** `integer`

Last block covered.

**next\_block** `integer`

`fromBlock` for the next page.

**objects** `integer`

Total rows in the response.

**archive\_height** `integer`

The chain head at query time.

**finalized\_block** `integer | null`

The newest final block at query time.

**to\_block\_hash** `string | null`

Hash of `to_block` when it's above `finalized_block`; otherwise `null`.

**query\_id\_template** `string`

The prepared query id of this request's filter.

**unavailable\_fields** `string[]`

Selected fields this chain doesn't have.

**transactions** `object[]`

Present when transactions were requested. Keys are the snake\_case column names.

**logs** `object[]`

Present when logs were requested.

**blocks** `object[]`

Present when blocks were requested.

Values: numbers for integer fields, `0x` hex strings for binary fields, decimal strings for
amounts, arrays and objects for nested fields, `null` for missing. See
[The JSON format](https://docs.bloklake.com/responses/json.md).

## Limits

* At most 100,000 rows per response; `maxObjects` is lowered to that. Like Arrow pages, one block
  may push a page past it.
* The whole response is built before it's sent.


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