# 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' // Public rippled server
});

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

Output