Learn how to deploy a BNB Smart Chain indexer using OnFinality and SubQuery to access blockchain data faster and scale your dApps with reliable RPC endpoints.

BNB Smart Chain (BSC) is a high-performance blockchain designed for smart contracts, DeFi, NFTs, and other Web3 applications. With its low fees and fast finality, BSC has become one of the most popular platforms for developers. To build high-performance applications, you need a reliable way to query and structure blockchain data - this is where a BNB Smart Chain indexer comes in.

What is a BNB Smart Chain Indexer?

A BNB Smart Chain indexer is a tool that extracts, organizes, and structures on-chain data for easy querying. Instead of relying on slow, raw chain data, an indexer provides structured APIs designed for your dApp, wallet, or explorer.

Benefits include:

  • Faster access to transactions, contracts, and events
  • Reduced load on direct RPC calls
  • Simplified integration with dashboards, analytics tools, and dApps

Why SubQuery + OnFinality for BNB Smart Chain?

SubQuery is an open-source framework for building custom blockchain indexers. It allows you to extract, transform, and serve blockchain data through a flexible GraphQL API.

Publishing your SubQuery project on OnFinality gives you:

  • One-click deployment — No need to manage infrastructure
  • Auto-scaling resources — Indexing scales with your usage
  • Global CDN — Data delivered fast anywhere in the world
  • Built-in BNB Smart Chain RPC support — https://bnb.api.onfinality.io/public

How to Deploy a BNB Chain Indexer

🛠 Prerequisites

Before getting started, ensure you have:

  • A working SubQuery project for the BNB Smart Chain network
  • A GitHub repository or IPFS-hosted version of your project
  • An account on OnFinality’s Indexing Service

Step 1: Prepare and Host Your SubQuery Project

OnFinality requires your project to be publicly accessible - either via GitHub or IPFS.

Today, we will be using a demo BNB Smart Chain project deployment with IPFS CID:

QmQBaf48zYyXEeRbDEDZEtwqW3nijRsjNq6Mm8Hs9yjGNr

Step 2: Log In to OnFinality’s Indexing Service

To create your first project, head to OnFinality Indexing Service. You'll need to authenticate with your GitHub account to login.

On first login, you will be asked to authorise OnFinality’s Indexing Service. We only need your email address to identify your account, and we don't use any other data from your GitHub account for any other reasons. In this step, you can also request or grant access to your GitHub Organisation account so you can post SubQuery projects under your GitHub Organisation instead of your personal account.

Log in to OnFinality Indexer Services

OnFinality Indexing Service is where you manage all your hosted projects uploaded to the OnFinality Indexing Service platform. You can create, delete, and even upgrade projects all from this application.

Create a new project - Select SubQuery

Step 3: Create Your BNB Smart Chain Indexing Project

Start by clicking on "Create Project". You'll be taken to the new project form. Start by selecting what project type you would like to deploy (SubQuery), and then follow the steps and enter the following (you can change this in the future):

  • Project Name: Name your project.
  • Description: Provide a description of your project.
  • Database: Premium customers can access dedicated databases to host production SubQuery projects from. If this interests you, you can contact sales@onfinality.io to have this setting enabled.
  • Visible in Explorer: If selected, this will show the project from the public explorer to share with the community.
Set the project details. Name, Description

Create your project and you'll see it on your OnFinality’s Indexing Project's list. Next, we just need to deploy the first version of it.

Step 4: Deploy your First Version

While creating a project will setup the display details of the project, you must deploy a version of it before it becomes operational. Deploying a version triggers an indexing operation to start, and sets up the required query service to start accepting GraphQL requests. You can also deploy new versions to existing projects here.

With your new project, you'll see a "Deploy your first version" button. Click this, and fill in the required information about the deployment:

Set deployment CID
  • CID: Provide your IPFS deployment CID from Step 1
  • Manifest: The details are obtained from the contents of the provided CID, used to confirm that you have the correct deployment
  • Query Version: This is the version of SubQuery's query service that you want to run this project on. We suggest using the latest version
  • Advanced Settings: There are numerous advanced settings which are explained via the in built help feature.
Set Network API Endpoints

Network Endpoints: You can use OnFinality’s limited public BNB Smart Chain endpoint to get started:
https://bnb.api.onfinality.io/public

For best results, sign up at https://app.onfinality.io/signup to retrieve an endpoint with higher rate limits

Get OnFinality BNB Endpoint from API Apps in onfinality portal

Once submitted, OnFinality will begin indexing your project. Depending on BNB Smart Chain's chain state and your query configuration, this may take a few minutes to fully sync.

Step 5: Connect to your Project

Once your deployment has successfully completed and our nodes have indexed your data from the chain, you'll be able to connect to your project via the displayed GraphQL Query endpoint.

Get the Query URL from Summary. Follow Update Deployment > View on Explorer menu items. View indexer status bar under Indexer Service header

Alternatively, you can click on the three dots next to the title of your project, and view it on SubQuery Explorer. There you can use the in browser playground to get started.

Viewing the BNB indexer project in the subquery explorer to run queries in the playground

Additional Resources

Getting started with BNB Smart Chain indexing is easier when you have the right tools and trusted infrastructure. For deeper insights, check out these resources:


Common Questions About BNB Smart Chain Indexing

Who needs to index BNB Smart Chain data?
Any team building dApps, NFT platforms, or DeFi protocols on BSC needs to index blockchain data to deliver fast, reliable, and structured queries for their users.

How do I build my first BNB Smart Chain Indexer?
The easiest way is with SubQuery. Start a project, define your BNB Smart Chain data sources, and deploy to OnFinality Indexing. Follow the official SubQuery documentation for detailed guidance.

What is the best data indexer for BNB Smart Chain?
SubQuery is the leading solution, offering flexible, high-performance indexing that integrates seamlessly with OnFinality’s enterprise-grade infrastructure.

How do I choose the right BNB Smart Chain RPC provider?
Prioritize reliability, scalability, and global performance. OnFinality delivers high-performance BSC RPC nodes with worldwide coverage, supporting both developers and enterprises.


Final Thoughts

Deploying a BNB Smart Chain Indexer doesn’t have to be complicated. With OnFinality’s managed infrastructureand SubQuery’s robust indexing framework, you can focus on innovating your dApp instead of managing infrastructure. Whether building a new DeFi protocol, NFT platform, or enterprise-grade Web3 application, using a trusted RPC provider and a powerful SubQuery indexer ensures your project is fast, resilient, and built to scale.

Need help? Contact support@onfinality.io or join our Telegram community.

Let’s build the future of Web3 on BNB Smart Chain 🚀

About OnFinality

OnFinality is a blockchain infrastructure platform that saves web3 builders time and makes their lives easier. OnFinality delivers scalable API endpoints, nodes, AI Agents, and indexers for the biggest blockchain networks and empowers developers to automatically test, deploy, scale and monitor their own blockchain nodes in minutes. 

To date, OnFinality has served hundreds of billions of RPC requests, supports over 125 networks including AvalancheBNB ChainCosmosPolkadotEthereum, and Polygon, and is continuously expanding these mission-critical services so developers can build the decentralised future, faster!

App | Website | Twitter | Telegram | LinkedIn | YouTube

How to Build Fast, Data-Driven dApps on BNB Chain with OnFinality Indexing

Learn how to deploy a BNB Smart Chain indexer using OnFinality and SubQuery to access blockchain data faster and scale your dApps with reliable RPC endpoints.