> ## 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.

# Estimating costs

> Work out what a job will cost before you run it, with measured sizes and examples.

Cost = **rows × bytes per row**, at \$0.50 per GB on pay-as-you-go (or against your allowance on
a subscription), plus the 10 KB minimum on requests that return little.

## Bytes per row

In Arrow, each selected field adds about this much per row:

| Field kind | Bytes |
| - | - |
| `blockNumber`, `timestamp`, `gasUsed`, `nonce`, other 64-bit numbers | 8 |
| `logIndex`, `transactionIndex` | 4 |
| `status`, `type` | 1 |
| address (`address`, `from`, `to`, `miner`) | 20 |
| hash, topic, root (`hash`, `topic0`–`topic3`, `transactionHash`) | 32 |
| amount (`value`, `gasPrice`, `effectiveGasPrice`, …) | 16 |
| `sighash` | 4 |
| `logsBloom` | 256 |
| `input`, `data`, `extraData` | their length + 4 |
| nullable fields | + 1 bit |

JSON is about 2–2.5× more for the same rows.

## Measured examples

From real responses on Ethereum and Robinhood Chain (Arrow):

| Job | Rows | Size | Pay-as-you-go |
| - | - | - | - |
| ERC-20 transfers on Ethereum, 100 blocks, 7 fields | 16,190 | 2.66 MB | \$0.0013 |
| ERC-20 transfers on Robinhood Chain, 100 blocks, 7 fields | 2,831 | 0.47 MB | \$0.0002 |
| All Ethereum transactions, 10 blocks, 7 fields incl. `input` | 1,996 | 2.28 MB | \$0.0011 |
| The same transactions, 6 fields without `input` | 1,996 | 0.20 MB | \$0.0001 |

The transfers are every `Transfer` log (a `topic0` filter only) in the first 100 blocks from
`19426000` on Ethereum and from `61000000` on Robinhood Chain, with the fields `blockNumber`,
`logIndex`, `transactionHash`, `address`, `topic1`, `topic2` and `data`. The transactions are all
of blocks `19426000`–`19426009` with `blockNumber`, `transactionIndex`, `hash`, `from`, `to`,
`value` and `input` (six fields without `input`).

Scaled up:

| Job | Estimate |
| - | - |
| 1 million transfers, 7 fields (\~165 bytes each) | 165 MB → **\$0.08** |
| 100 million transfers, same fields | 16.5 GB → **\$8.25** |
| Every Ethereum transaction for 1 million recent blocks, 7 fields incl. `input` (\~230 KB per block) | ~~230 GB → \*\*~~\$115\*\* |
| The same without `input` (\~20 KB per block) | ~~20 GB → \*\*~~\$10\*\* |
| Hourly block samples for a year (4 fields) | 350 KB → under \$0.001 |
| Every ERC-20 transfer on Robinhood Chain for one day (864,000 blocks, 7 fields; about 2.5–5 KB per block) | ~~2–4 GB → \*\*~~\$1–2\*\* |
| Every Robinhood Chain transaction for one day, without `input` (6 fields; about 1–2.7 KB per block) | ~~1–2.5 GB → \*\*~~\$0.5–1.2\*\* |

The biggest lever is **which fields you select**: here `input` is about 90% of the bytes. If you
only need to know which function was called, select `sighash` (4 bytes) instead.

Activity varies a lot over a chain's history (early Ethereum blocks are nearly empty), so
per-block figures from recent blocks overestimate old ranges.

## Polling

Each poll that returns little is billed the 10 KB minimum:

| Poll every | Requests per month | Minimum billed | Pay-as-you-go |
| - | - | - | - |
| 1 s | 2.6 million | 26 GB | \~\$13 |
| 12 s (Ethereum block time) | 216,000 | 2.2 GB | \~\$1.10 |
| 60 s | 43,200 | 0.43 GB | \~\$0.22 |

Plus the rows the polls return. Poll at the chain's block time; see
[Following the head](https://docs.bloklake.com/guides/follow-the-head.md).

## Estimate by sampling

The reliable way to estimate a big job:

1. Run your exact query (same filters, same fields) on a representative slice, for example 1,000
   blocks from recent history.
2. Read the size: the response's byte size is close to what's billed, or check the key's data
   on the dashboard a minute later.
3. Scale by the number of blocks, sampling a few periods if the range is long.

```bash theme={null}
curl -s -o /dev/null -w '%{size_download} bytes\n' https://api.bloklake.com/v1/chains/eth/query \
  -H "Authorization: Bearer $BLOKLAKE_API_KEY" -H 'content-type: application/json' \
  -d @query.json
```

## Pay-as-you-go or Standard?

Standard costs \$200 a month and includes 1 TB. On pay-as-you-go, \$200 buys 400 GB. If you use
more than about 400 GB a month regularly, or need more than 1 request per second, Standard is
cheaper. The dashboard's **Billing** page tells you when your last 30 days on pay-as-you-go would
have cost less on Standard.


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