I don't want to use an existing service, like Blockchain.info or BlockExplorer.com. Is there some library out there that will let me read the blockchain programatically?
This can be done with some degree of effort using the Bitcoin API.
v0.7 getrawtransaction gives you access to transactions even those not in your wallet.
There are other tools that you can use to build this capability as well.
- Armory (see Extras)
- Bitcoin ABE
- BitsOfProof supernode [pre-release]
Gavin Andresen's bitcointools python scripts might have some of the functionality you are looking for.