# Get Started The XRP Ledger is always online and entirely public. You can access it directly from your browser with [RippleAPI for JavaScript (ripple-lib)](rippleapi-reference.html). Try experimenting with some of the following examples:

const mainnet = new ripple.RippleAPI({
  server: 'wss://s1.ripple.com' // Ripple's public cluster
  // server: 'wss://s2.ripple.com' // Ripple's full history cluster
  // server: 'wss://xrpl.ws' // XRPL Labs full history cluster
  // server: 'wss://s.altnet.rippletest.net/' // Testnet
  // server: 'wss://s.devnet.rippletest.net/' // Devnet
});

(async function(api) {
  await api.connect();
  let ledger = await api.getLedger();
  console.log(ledger);
})(mainnet);

Output