# Internet Computer API
> Live on-chain data from the Internet Computer (ICP), a blockchain that runs software as tamper-proof canisters on a network of independent subnets: the live network state (block height, running and stopped canisters, node count, number of subnets, message-execution rate), a ledger account's ICP balance and transaction count, a canister's type, controllers, name and subnet, and the subnets that shard the Internet Computer with their type, canisters, nodes and throughput.

## 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/icp-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 3 req/s
- **Basic** ($9/Mo) — 140,000 calls/Mo, 8 req/s
- **Pro** ($24/Mo) — 892,000 calls/Mo, 15 req/s
- **Scale** ($59/Mo) — 4,660,000 calls/Mo, 30 req/s

## Endpoints

### Network

#### `GET /v1/network` — Live IC state: block height, canisters, nodes, subnets

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

**Response:**
```json
{
    "data": {
        "chain": "internet-computer",
        "source": "Internet Computer",
        "subnets": 58,
        "up_nodes": 683,
        "total_nodes": 712,
        "block_height": 8307257176,
        "native_token": "ICP",
        "running_canisters": 1152617,
        "stopped_canisters": 102795,
        "message_execution_rate": 616994269.26
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:49.784Z",
        "request_id": "fe18a72b-9001-4941-97c3-4a7956b151d2"
    },
    "status": "ok",
    "message": "Network state retrieved successfully",
    "success": true
}
```

### Account

#### `GET /v1/account` — A ledger account ICP balance and transaction count

**Parameters:**
- `account` (query, required, string) — ICP account identifier (64 hex) Example: `e7a879ea563d273c46dd28c1584eaa132fad6f3e316615b3eb657d067f3519b5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/icp-api/v1/account?account=e7a879ea563d273c46dd28c1584eaa132fad6f3e316615b3eb657d067f3519b5"
```

**Response:**
```json
{
    "data": {
        "source": "Internet Computer",
        "account": "e7a879ea563d273c46dd28c1584eaa132fad6f3e316615b3eb657d067f3519b5",
        "suspicious": false,
        "updated_at": "2025-05-06T03:27:44.000Z",
        "balance_e8s": 12000010000,
        "balance_icp": 120.0001,
        "transaction_count": 212647
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:50.323Z",
        "request_id": "798254fd-e1b6-42c4-bd9d-497ac5a96751"
    },
    "status": "ok",
    "message": "Account retrieved successfully",
    "success": true
}
```

### Canister

#### `GET /v1/canister` — A canister type, controllers, name and subnet

**Parameters:**
- `id` (query, required, string) — Canister id (principal) Example: `ryjl3-tyaaa-aaaaa-aaaba-cai`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/icp-api/v1/canister?id=ryjl3-tyaaa-aaaaa-aaaba-cai"
```

**Response:**
```json
{
    "data": {
        "name": "ICP Ledger",
        "source": "Internet Computer",
        "subnet_id": "tdb26-jop6k-aogll-7ltgs-eruif-6kk7m-qpktf-gdiqx-mxtrf-vb5e6-eqe",
        "canister_id": "ryjl3-tyaaa-aaaaa-aaaba-cai",
        "controllers": [
            "r7inp-6aaaa-aaaaa-aaabq-cai"
        ],
        "module_hash": "51f4be010f23064137defacd627ffbec024c5133210c68ca3b80ab8f257101d6",
        "canister_type": "ledger"
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:50.612Z",
        "request_id": "a703531e-093d-46ca-833b-e965e9403b86"
    },
    "status": "ok",
    "message": "Canister retrieved successfully",
    "success": true
}
```

### Subnets

#### `GET /v1/subnets` — The subnets that shard the Internet Computer

**Parameters:**
- `limit` (query, optional, string) — Number of subnets (1-100) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/icp-api/v1/subnets?limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 49,
        "source": "Internet Computer",
        "subnets": [
            {
                "type": "verified_application",
                "subnet_id": "eq6en-6jqla-fbu5s-daskr-h6hx2-376n5-iqabl-qgrng-gfqmv-n3yjr-mqe",
                "total_nodes": 13,
                "display_name": null,
                "running_canisters": 93273,
                "memory_usage_bytes": 513213972677,
                "message_execution_rate": 38
            },
            {
                "type": "application",
                "subnet_id": "2fq7c-slacv-26cgz-vzbx2-2jrcs-5edph-i5s2j-tck77-c3rlz-iobzx-mqe",
                "total_nodes": 13,
                "display_name": null,
                "running_canisters": 92713,
                "memory_usage_bytes": 575589074005,
                "message_execution_rate": 134
            },
            {
                "type": "verified_application",
                "subnet_id": "4zbus-z2bmt-ilreg-xakz4-6tyre-hsqj4-slb4g-zjwqo-snjcc-iqphi-3qe",
                "total_nodes": 13,
                "display_name": null,
                "running_canisters": 72735,
                "memory_usage_bytes": 441010287176,
                "message_execution_rate": 36
            },
            {
                "type": "application",
                "subnet_id": "o3ow2-2ipam-6fcjo-3j5vt-fzbge-2g7my-5fz2m-p4o2t-dwlc4-gt2q7-5ae",
                "total_nodes": 13,
                "display_name": null,
                "running_can
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata and endpoint catalog

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

**Response:**
```json
{
    "data": {
        "source": "Internet Computer dashboard and ledger APIs (internetcomputer.org, live)",
        "service": "icp-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/account": "A ledger account's ICP balance and transaction count (account=64 hex).",
            "GET /v1/network": "Live IC state: block height, canisters, nodes, subnets, message rate.",
            "GET /v1/subnets": "The subnets that shard the Internet Computer (limit=50).",
            "GET /v1/canister": "A canister's type, controllers, name and subnet (id=ryjl3-tyaaa-aaaaa-aaaba-cai)."
        },
        "description": "Live on-chain data from the Internet Computer (ICP), a blockchain that runs software as tamper-proof canisters on a network of independent subnets, via the public IC dashboard and ledger APIs. The network endpoint returns the block height, running and stopped canisters, node count, number of subnets and message-execution rate; the account endpoint returns a ledger account's ICP balance and transaction count; the canister endpoint returns a canister's type, controllers, name and subnet; the subnets endpoint returns the replica groups that shard the IC with their type, canisters, nodes and throughput. Live, no key, nothing stored. Distinct from the Bitcoin, Stacks, Celestia, EOS and EVM on-chain APIs and from price feeds — this is the IC's own canister, subnet and ICP-ledger model.",
        "block_height": 8307257613,
        "
…(truncated, see openapi.json for full schema)
```


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