Midnight is a data protection blockchain built on zero-knowledge proof technology. It lets developers build applications that can selectively disclose information while keeping the rest private. The Midnight Documentation covers the network in detail.
We're hosting Midnight's infrastructure as a managed service so you can build on Midnight without running anything yourself. If you already have a Blockfrost account, it's included on your current plan at no additional cost. If you're new, you can sign up free.
How Midnight Infrastructure Works
Building on Midnight requires two pieces of infrastructure: a node and an indexer.
The node connects to the Midnight network, participates in consensus and submits transactions. The indexer reads data from the node and makes it queryable through a GraphQL API. Together, they’re what lets your application read from and write to the Midnight Blockchain.
Without a managed provider, you’d need to run both yourself, keep them synched, handle scaling and maintain uptime. That’s what we’re taking off your plate.
We’re hosting both across three environments.
- Mainnet for production
- Preview and Preprod for testing
The Indexer API Is GraphQL
This is the biggest difference from our Cardano offering. The Midnight indexer exposes a GraphQL API, not REST. If you’re used to Blockfrost’s Cardano endpoints, the query pattern will be new.
With REST, you hit specific endpoints for specific data. With GraphQL, you write a query describing exactly what you want, and the API returns just that. This means fewer requests and more flexibility, but also a different way of thinking about data fetching.
The GraphQL API enforces limits on query depth, number of fields, complexity, and execution timeout. Requests exceeding these limits return an error explaining what was exceeded.
Three services are available across all environments:
Indexer API: https://midnight-mainnet.blockfrost.io/api/v0/
WebSocket: wss://midnight-mainnet.blockfrost.io/api/v0/ws
Node RPC: https://rpc.midnight-mainnet.blockfrost.io
The indexer API handles queries for blocks, transactions, contracts, and wallet events. The WebSocket supports real-time subscriptions for block streaming, contract actions, and ledger events. The Node RPC provides direct JSON-RPC access for low-level runtime operations, wallet providers, and transaction submission.
Authentication and Midnight.js
There are two ways to authenticate:
project_idheader - pass your API key as a request header, same as Cardano- Query parameter - append
?project_id=YOUR_PROJECT_IDto the endpoint URL
The query parameter method exists for clients that can't set custom headers. This includes Midnight.js, Midnight's SDK. When configuring Midnight.js to use Blockfrost, you include your project ID directly in the URL:
https://midnight-mainnet.blockfrost.io/api/v0/?project_id=YOUR_PROJECT_ID
Point Midnight.js at that URL and it connects to your Blockfrost-hosted infrastructure. Our [Midnight docs](https://docs.blockfrost.io/midnight/) cover how to configure this for the indexer, WebSocket, and node endpoints.
Midnight.js documentation: docs.midnight.network/sdks/official/midnight-js
If you're coming from Blockfrost's Cardano API
The short version: your account, subscription, and authentication all stay the same. The API itself is completely different.
What's the same
- Authentication (
project_idheader or query parameter) - Your subscription and plan
- The dashboard and project creation flow
- Rate limits (Midnight projects share the same limits as your Cardano plan)
What's different
- GraphQL instead of REST
- Different data model (Midnight uses zero-knowledge proofs, not UTxO in the Cardano sense)
- Query limits on depth, fields, complexity, and timeout
- The SDK is Midnight's (Midnight.js), not ours
We recommend starting with both the official Midnight documentation and our Blockfrost Midnight docs.
Getting Started
Already have a Blockfrost account?
- Log in to your dashboard
- Click Add Project
- Select Midnight Mainnet
- Copy your API key
Nothing changes about your subscription. No upgrade, no add-on.
New to Blockfrost?
- Sign up free
- Create a Midnight project
- Copy your API key
The free tier gives you 50,000 requests per day with no credit card required.
What Comes Next
This is our starting point for Midnight. At launch you get a hosted indexer and node for Midnight mainnet. From here, we'll add support for preview and preprod.
Questions, feedback, or feature requests: Discord or GitHub.
FAQs
Does Midnight cost extra?
No. It's included on every plan, including free.
Do I need a new account?
No. Your existing Blockfrost account works. Just create a Midnight project from the dashboard.
Is the Midnight API the same as the Cardano API?
No. The Midnight API is GraphQL, not REST. The data model is different too. What carries over: authentication, your subscription, and the dashboard.
Do Midnight requests count against my rate limit?
Yes. Midnight projects share the same rate limits as your Cardano subscription.
Are there query limits?
Yes. The GraphQL API enforces limits on query depth, number of fields, complexity, and execution timeout.
Does Blockfrost provide a Midnight SDK?
No. Midnight provides Midnight.js. You point it at your Blockfrost endpoints and our docs cover how to set that up.
What networks are available?
Mainnet, preview, and preprod.
I'm new to Midnight. Where do I start?
The Midnight docs cover the network. Once you're ready to build, create a free Blockfrost account and follow our getting-started guide.