# Linea Network API
> Live on-chain data for Linea (chain-id 59144), a Consensys zkEVM Layer 2 that settles to Ethereum and uses ETH for gas. Read the chain status — chain id, latest block number, current gas price, node client version and sync state — fetch any block by number (or the latest) with its hash, parent hash, timestamp, transaction count, gas used and limit, base fee and proposer, read the current gas price and max priority fee in both wei and gwei, and look up any account address for its ETH balance (in wei and whole ETH) and transaction nonce. Addresses use the standard 0x EVM hex form. A short protective cache keeps responses fast while staying within a few seconds of the chain. Distinct from other Layer-1, Layer-2 and Cosmos-chain APIs on the marketplace: this surfaces the Linea zkEVM network specifically.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/linea-api/..."
```

## Pricing
- **Free** (Free) — 1,900 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 47,600 calls/Mo, 6 req/s
- **Pro** ($31/Mo) — 199,000 calls/Mo, 18 req/s
- **Scale** ($72/Mo) — 842,000 calls/Mo, 45 req/s

## Endpoints

### Chain

#### `GET /v1/status` — Chain status

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/linea-api/v1/status"
```

**Response:**
```json
{
    "data": {
        "network": "Linea Mainnet",
        "syncing": false,
        "chain_id": 59144,
        "block_number": 31040546,
        "native_token": "ETH",
        "gas_price_wei": "41904000",
        "client_version": "besu/v26.3.0-RC0-0676100/linux-x86_64/openjdk-java-25",
        "gas_price_gwei": 0.041904
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:00.811Z",
        "request_id": "6aa751da-edb6-4fba-aa5f-3adfd727ec4c"
    },
    "status": "ok",
    "message": "Status retrieved successfully",
    "success": true
}
```

### Blocks

#### `GET /v1/block` — Block by number (latest if omitted)

**Parameters:**
- `number` (query, optional, string) — Block number; omit for latest

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/linea-api/v1/block"
```

**Response:**
```json
{
    "data": {
        "hash": "0x8a179935ee4cf239cd9eda93d319a4ac469c227c27e84aaca74d4e18f3cbad0d",
        "miner": "0x8f81e2e3f8b46467523463835f965ffe476e1c9e",
        "number": 31040546,
        "gas_used": 24298,
        "gas_limit": 2000000000,
        "timestamp": 1781522086,
        "size_bytes": 824,
        "parent_hash": "0x92dc40aeb82ebd444b0bf1f31ff05635ed7081b7fa3c057c6b3a07192ed8739a",
        "transaction_count": 1,
        "base_fee_per_gas_wei": "7"
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:01.058Z",
        "request_id": "f4a652dd-306b-4be4-bc06-93eb01a3a512"
    },
    "status": "ok",
    "message": "Block retrieved successfully",
    "success": true
}
```

### Gas

#### `GET /v1/gas` — Current gas price and max priority fee

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/linea-api/v1/gas"
```

**Response:**
```json
{
    "data": {
        "native_token": "ETH",
        "gas_price_wei": "41904000",
        "gas_price_gwei": 0.041904,
        "max_priority_fee_wei": "50284793",
        "max_priority_fee_gwei": 0.050285
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:01.295Z",
        "request_id": "9811aa42-cbdc-4bc4-9f89-23c974fa4259"
    },
    "status": "ok",
    "message": "Gas retrieved successfully",
    "success": true
}
```

### Accounts

#### `GET /v1/balance` — ETH balance and nonce for an address

**Parameters:**
- `address` (query, required, string) — EVM address (0x + 40 hex) Example: `0x000000000000000000000000000000000000dEaD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/linea-api/v1/balance?address=0x000000000000000000000000000000000000dEaD"
```

**Response:**
```json
{
    "data": {
        "address": "0x000000000000000000000000000000000000dead",
        "balance_eth": 0.00879493,
        "balance_wei": "8794933319849863",
        "transaction_count": 0
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:01.550Z",
        "request_id": "3222fee0-1081-4690-97dc-2cf23b26348f"
    },
    "status": "ok",
    "message": "Balance retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/linea-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Linea Network API",
        "source": "Linea public JSON-RPC (rpc.linea.build)",
        "endpoints": [
            {
                "path": "/v1/status",
                "description": "Chain id, latest block number, gas price, client version, sync state"
            },
            {
                "path": "/v1/block",
                "description": "Block by number (?number=; omit for latest)"
            },
            {
                "path": "/v1/gas",
                "description": "Current gas price and max priority fee (wei + gwei)"
            },
            {
                "path": "/v1/balance",
                "description": "ETH balance and nonce for an address (?address=0x…)"
            },
            {
                "path": "/v1/meta",
                "description": "This metadata document"
            }
        ],
        "disclaimer": "Unofficial proxy of the public Linea JSON-RPC. Not affiliated with Linea / Consensys. Data only; no guarantees of accuracy or availability.",
        "description": "On-chain data for Linea (chain-id 59144), a Consensys zkEVM Layer 2 that settles to Ethereum and uses ETH for gas. Exposes chain status, blocks, current gas prices and account balances via the public JSON-RPC.",
        "native_token": {
            "symbol": "ETH",
            "decimals": 18
        }
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:01.615Z",
        "request_id": "b9bd2835-7bef-413f-a40b-9b365e
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/linea-api
OpenAPI spec: https://www.oanor.com/api/linea-api/openapi.json
