Install a full node and perform a full sync: https://docs.binance.org/smart-chain/developer/fullnode.html
Then use the RPC API (looks like BSC is a clone of Ethereum so it uses the same API): https://eth.wiki/json-rpc/API
Then use the RPC API (looks like BSC is a clone of Ethereum so it uses the same API): https://eth.wiki/json-rpc/API