How to get metadata when querying the blockchain

I’m working in Javascript and I was wondering if there’s any way to get some metadata about the blockchain such as latest block number or size of blockchain? I’m using the Indexer API but can’t seem to find something about this. For example, if I wanna query for the latest block, I want to know the latest block number so I can call await indexerClient.lookupBlock(blockNum).do();

Is there an elegant way to do this? I suppose I can also brute force it by querying for next block until it throws an error.

I don’t remember the exact method name, but there is a REST API endpoint for /status.
That endpoint would return you series of parameters where the last committed round is what you’re after.

Most of the Indexer endpoints include current-round in one way or another


    "data": {
        "migration-required": false,
        "read-only-node": true
    "db-available": true,
    "is-migrating": false,
    "message": "14981203",
    "round": 14981203


    "assets": [
            "created-at-round": 3219067,
            "deleted": false,
            "index": 185,
            "params": {
                "decimals": 0,
                "default-frozen": false,
                "name": "myasset",
                "total": 100,
                "unit-name": "MYA"
    "current-round": 14981214,
    "next-token": "185"