> For the complete documentation index, see [llms.txt](https://docs.tajirchain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tajirchain.com/api-documentation/block-explorer-api/block-queries.md).

# Block Queries

### **Get Block by Number**

**Request**

```
https://tajir-chain.gitbook.io/tajir_chain-docs/api-documentation/block-explorer-api/block-queries
```

**Parameters**

| Name    | Type    | Required | Description                        |
| ------- | ------- | -------- | ---------------------------------- |
| blockno | integer | Yes      | Block number in **decimal** format |

**Sample Response**

```json
{
  "status": "1",
  "message": "OK",
  "result": {
    "number": "12345",
    "hash": "0xabc...",
    "timestamp": 1680000000,
    "miner": "0x123...",
    "transactions": [ "0xabc...", "0xdef..." ]
  }
}
```

***

### **Get Transactions in a Block**

**Request**

```
GET https://<explorer-url>/api?module=block&action=getblocktransactions&blockno=12345
```

**Parameters**

| Name    | Type    | Required | Description                            |
| ------- | ------- | -------- | -------------------------------------- |
| blockno | integer | Yes      | Block number to fetch all transactions |

**Sample Response**

```json
{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "hash": "0xabc...",
      "from": "0x123...",
      "to": "0x456...",
      "value": "1000000000000000000",
      "gasUsed": "21000"
    }
  ]
}
```

***

### **Useful For**

* Indexers
* Analytics dashboards
* Activity monitoring

***

### **Notes**

* Block numbers must be provided in **decimal** format.
* Large blocks may return many transactions.
* Errors may occur if the block is not yet indexed.
