Bnbscan API access on BNB Smart Chain depends on the query and plan
Bnbscan API access uses Etherscan V2, with paid access for BNB Smart Chain balance and transaction-history queries. Contract source code and ABI requests remain available on the Free tier across supported chains. The legacy explorer API is deprecated, so existing integrations need a supported interface and Etherscan credentials for V2. The main choice is whether the required data falls within free contract services or needs a plan covering routine BNB Smart Chain queries.
· updated
What's inside
Chain coverage and endpoint eligibility
An API plan must cover both the chosen network and the requested endpoint before its request allowance matters. The Etherscan V2 native-balance endpoint requires a paid plan for BNB Smart Chain. An unused Free-tier allowance doesn't grant access to that balance query. Routine transaction-history access follows the same network restriction, while contract-data exceptions have their own coverage. A successful free contract query therefore doesn't establish eligibility for an account-history request. API subscriptions pay for data access. An API key authenticates requests; a token approval grants a contract spending permission. Paying for a subscription doesn't grant that permission or revoke an existing allowance.
What does a valid V2 request need?
A V2 request needs an Etherscan API key, a supported chain ID, and the parameters its endpoint requires. For a BNB Smart Chain native-balance read,
chainid=56
identifies mainnet. An address selects the account, while
module=account
and
action=balance
select the native-balance operation.
Network and credential selection
Network selection determines which ledger supplies the data, even when the address string stays unchanged. The V2 interface uses a unified endpoint and a
chainid
parameter. Its authentication uses an Etherscan key with plan-based access. A key's existence alone doesn't establish coverage for the requested chain, method, or PRO feature.
Response interpretation
Data returned by the endpoint
The balance response uses
status
,
message
, and
result
fields. A successful data response has
status
1 and
message
OK. Its
result
contains the native balance as a string.
Errors and empty results
An unsuccessful response can carry
status
0, with the explanation inside
result
. Some endpoints also use
status
0 for a valid request without matching records. Read the endpoint's response semantics before treating every zero status as the same failure. Rate-limit, credential, and parameter errors call for different corrections.
A failed balance read before a plan change
In this hypothetical case, an integration using a Free-tier Etherscan key receives an error on a BNB Smart Chain balance query. It expects a numeric native balance for chain ID 56.
Before buying access, the reader inspects the key type and request parameters. Checking
chainid
,
module
, and
action
doesn't submit a blockchain transaction or change a subscription. If those inputs are valid and
result
identifies a coverage restriction, the balance query needs an eligible paid plan.
After the plan change, the integration's successful response contains
status
1 and a balance string in
result
. An invalid-key response instead requires a credential correction before another request. Fixing that key doesn't expand Free-tier coverage. Free source-code or ABI access can answer a contract-data question, although it can't replace the missing balance read.
Which contract queries remain free on BNB Smart Chain?
Etherscan V2 contract source code and ABI queries remain available on the Free tier for BNB Smart Chain. This exception follows the contract endpoint rather than the ordinary account-data coverage rule. An application binary interface, or ABI, describes the interface software uses for contract calls. Access to that interface doesn't itself authorize a contract transaction.
Free access doesn't mean a contract has verified source code. A retrieval endpoint can report an unverified contract. Verification endpoints also retain Free-tier coverage, subject to their own requirements.
Rate allowances and PRO eligibility
Lite provides paid chain coverage without PRO endpoints, while Standard and higher tiers include PRO access. The listed Lite allowance is 5 calls per second, up to 100,000 calls per day. Standard lists 10 calls per second and up to 200,000 calls per day. Both the per-second ceiling and daily allowance constrain an integration; unused daily capacity doesn't permit a burst above the per-second limit. The Free tier lists 3 calls per second and up to 100,000 calls per day for eligible chains and endpoints. Those numbers describe capacity, not additional chain coverage.
Plan schedules can change, so an integration should treat its configured quota as a live parameter. Throttling requests addresses a rate error; it doesn't change endpoint eligibility or create PRO access.
How should a zero native-balance result be interpreted?
A zero native-balance result can be a successful read, so its meaning depends on the response status and the queried network. For chain ID 56, a successful native-balance query describes BNB at the selected address. It doesn't count BEP-20 tokens as native BNB. A nonzero token balance and zero native balance can therefore coexist without contradicting each other.
The balance endpoint returns an integer string in wei. Divide that value by 10^18 to express the BNB amount. Keep the integer precision during conversion, since premature rounding can change the displayed balance. An error explanation in
result
isn't a numeric balance, so interpret the status and payload before any unit conversion.
Request-format differences between migration routes
The legacy explorer API is deprecated. Etherscan V2 balance and account-history reads use REST-style GET requests with
module
and
action
parameters. These reads pass the API key as a query parameter. Updating the endpoint alone can leave an integration using the wrong key or missing the required
chainid
.
BSCTrace through MegaNode is a separate BNB Chain API alternative, with JSON-RPC 2.0 requests over POST. It places authentication in the endpoint path and returns JSON-RPC results or errors. Native-balance requests use
eth_getBalance
on that route. Its balance result uses hexadecimal encoding, unlike the decimal string the V2 balance endpoint returns. Account-history access can require an enhanced API method, so a method name or response parser can't always transfer unchanged. Its own plan terms and supported-method coverage govern that separate integration.
Bnbscan: what people ask
Do legacy explorer API keys work with Etherscan V2?
Etherscan V2 requires an Etherscan API key, so a key issued for a separate explorer isn't a V2 credential. Replacing the endpoint without replacing an incompatible key can leave authentication broken. A newly created Etherscan key can also take a few minutes to activate, which is separate from plan coverage.
What happens after repeated invalid API key attempts?
More than 5 invalid API key attempts within 30 seconds trigger temporary source-IP throttling. The throttle resets after 30 seconds. Wait at least that long before retrying with a valid key. Changing the request's address or action doesn't correct an invalid credential.
Why can a paid PRO request fail on a testnet?
PRO endpoints support mainnet networks, so a paid subscription doesn't make a PRO method available on a testnet. A testnet PRO request can return a missing-or-invalid-action error. The selected network and endpoint must both fit the service's support rules, even when the API key authenticates successfully.
Which block tags can a native-balance query read?
The native-balance endpoint accepts latest and hexadecimal block numbers within the last 128 blocks. Older balance lookups use the separate historical-balance endpoint, which carries PRO eligibility. A historical request therefore needs the correct method and access; changing only the tag on the ordinary balance endpoint doesn't provide unrestricted archive access.
Can one V2 call request balances from multiple chain IDs?
Each V2 request accepts one chain ID, even though the same Etherscan key can work across supported chains. Comma-separated chain IDs don't form a valid multi-network request. Separate calls retain each network's access requirements and count against the key's applicable plan limits.
Where should a web application store its Etherscan API key?
A web application should keep its Etherscan API key on its backend, using environment variables or a secrets manager. Shipping the key in client-side code or committing it to a public repository exposes the credential. Requests made with that key count against its plan limits, so data-read access still needs credential protection.
How should an exposed Etherscan API key be replaced?
Replace an exposed key by stopping its use, removing it from the API dashboard, and creating a new key. Removing the string from one file doesn't revoke copies already exposed. Keep the replacement out of public repositories and browser code, and update the application to use the new credential.