Midnight API

Instant API access to Midnight

Query blocks, transactions, addresses, contracts and DUST generation over a simple REST API, no node to run and no database to manage. Start querying right now: no signup, no API key. Or run your own.

Pick a network
The same API runs against mainnet, preprod, and preview. Click the example to copy the endpoint.
$
copied
Run your own
Download Nightfrost, index a network, and query your local API.
01
Download Nightfrost
Grab the latest binary for your platform.
Get the latest release →
02
Index Preview
Connect to Midnight and start the local API.
shell
nightfrost \
--node-url wss://rpc.preview.midnight.network \
--network-id preview \
--data-dir /var/lib/nightfrost \
--listen 127.0.0.1:3000
03
Query it
Pipe the response through jq for readable JSON.
shell
$ curl -s http://127.0.0.1:3000/api/v0/addresses/mn_addr_preview1ryh0sshsz4ff47xyw29lqffmh4ccnxw4qe6v5aples82jkjk99lq56dt9v | jq
{
  "results": [
    {
      "token_type": "0000000000000000000000000000000000000000000000000000000000000000",
      "amount": "4999000000"
    }
  ],
  "tip": {
    "hash": "c835be102642d9fd845752c7aad50ae308d793cc4199bddbef55f9e0c28c5b54",
    "height": 720266
  }
}