{% extends "base.html" %} {% block title %}API Documentation - LocalScan{% endblock %} {% block content %}

API Documentation

The LocalScan Indexer API provides programmatic access to blockchain data. All responses are returned in JSON format.

Blockchain Data

GET /blocks/{block_number}

Retrieve detailed information about a specific block, including its transactions.

{
  "number": 12345,
  "hash": "0x...",
  "timestamp": "2026-02-02 00:00:00",
  "transactions": [...]
}
GET /transactions/{tx_hash}

Fetch details for a specific transaction by its hash.

{
  "hash": "0x...",
  "from_address": "0x...",
  "to_address": "0x...",
  "value": "1.5",
  "status": "success"
}
GET /addresses/{address}

Get exhaustive details for an address, including ETH balance, contract status, and token holdings.

{
  "address": "0x...",
  "balance_cached": "100.5",
  "is_contract": true,
  "tokens": [
    { "symbol": "USDC", "balance": "500.0" }
  ]
}
{% endblock %}