BNB Smart Chain
Quick Start
TheRPC is a managed JSON-RPC gateway sitting in front of geth-equivalent BNB Smart Chain nodes. You skip running and syncing your own validator and point your app at a single authenticated URL instead. Builders shipping PancakeSwap integrations or Venus lending dashboards lean on it for the chain's roughly three-second blocks and low fees, without babysitting any infrastructure. This guide walks you from zero to a verified response. Grab a key, set the endpoint, then run one of the snippets below in curl, JavaScript, or Python. A few minutes, start to finish.
Step 1: Get an API Key
Head to TheRPC.io and create a free account. Once signed in, open the Dashboard and look for the API Keys area, where you can generate a fresh key or copy an existing one. The value is an opaque token string tied to your account and plan. You drop that token straight into the request URL. Every BNB Smart Chain call routes through https://bsc.therpc.io/YOUR_API_KEY, so the key lives in the path rather than a separate config field.
Step 2: Choose Your Network
TheRPC serves many networks, each behind its own subdomain. BNB Smart Chain mainnet (chainId 56) answers at the bsc host. To configure your environment, set the endpoint variable to https://bsc.therpc.io/YOUR_API_KEY with your real key swapped in, and keep the bare token handy for any header-based clients. The testnet (chainId 97) is reachable the same way when you want to rehearse before mainnet.
Step 2: Choose Your Network
Step 3: Make Your First Call
The three snippets below all issue the same eth_blockNumber call so you can confirm BNB Smart Chain connectivity in whichever language you already use. There is a shell version with curl, a Node.js version, and a Python one. Pick the one that fits your stack and run it. For idiomatic clients in other languages, see the Tools & SDKs reference.
Using Curl
Using JavaScript
Using Python
Step 4: Using Web3 Libraries
Once you move past a single block-number check, raw HTTP gets tedious. Web3 libraries handle ABI encoding, wei conversion, nonce sequencing, and BEP-20 contract calls for you, which matters when you interact with PancakeSwap routers or Venus markets. Wiring web3.js or web3.py to the BNB Smart Chain endpoint takes one line, as shown below. For the full set of language-specific setups, consult the Tools & SDKs documentation.
Web3.js (JavaScript)
Web3.py (Python)
Available Methods
For the complete catalog of supported BNB Smart Chain calls, open the All Methods page. Each entry there carries a plain-language description, the exact request and response shapes, runnable code examples, and the practical use cases it fits. The catalog covers everything from eth_call against a BEP-20 token to the heavier debug_ and trace_ namespaces.
Network Selection
Every chain TheRPC supports has a distinct endpoint keyed by its subdomain, so switching networks is just a matter of swapping the host. For BNB Smart Chain mainnet the URL is https://bsc.therpc.io/YOUR_API_KEY; the same key works against the chainId 97 testnet host when you need a staging target.
Next Steps
- All Methods — browse the full BNB Smart Chain method reference to see what the gateway exposes.
- Tools & SDKs — pick a client library for your language and wire it to the bsc endpoint.
- Authentication — learn how the API key in the URL path secures every request.
- Rate Limits — understand per-plan quotas before you scale traffic.
- Basic Operations — work through the everyday reads like balances and block lookups.