Loading...
Loading...
Use the public REST APIs that power dashboard.internetcomputer.org. Get data for canisters, ledgers, SNS, and metrics.
npx skill4agent add dfinity/icskills ic-dashboardafterbeforelimitcurlfetchaxiosicp-cliopenapi.json| API | Base URL | OpenAPI spec | Swagger / Docs | Prefer |
|---|---|---|---|---|
| IC API | | | | v4 for canisters, subnets (cursor pagination) |
| ICRC API | | | | v2 for ledgers (TestICP and other ICRC tokens; not mainnet ICP) |
| SNS API | | | | v2 for snses, proposals, neurons |
| Ledger API (mainnet ICP) | | | | Use for ICP token; v2 for cursor pagination |
| Metrics API | | | | v1 (no newer version) |
/api/v4/canisters/api/v4/subnets/api/v2/ledgers/api/v2/ledgers/{id}/transactions/api/v2/snses/api/v2/snses/{id}/proposals/api/v2/snses/{id}/neuronsafterbeforelimitGETnext_cursorprevious_cursor/api/v3//api/v1//api/v2//accounts/supply/total/latest/v2//api/v1/ryjl3-tyaaa-aaaaa-aaaba-cailedger-api.internetcomputer.orgledger_canister_id/api/v2/ledgers/{ledger_canister_id}/transactionsmxzaz-hqaaa-aaaar-qaada-caiafterbeforelimitnext_cursorprevious_cursormax_*_indexstartend# List canisters (v4: cursor pagination, next_cursor/previous_cursor in response)
curl -s "https://ic-api.internetcomputer.org/api/v4/canisters?limit=5"
# Next page: use after= from previous response's next_cursor (see OpenAPI for cursor format)
# curl -s "https://ic-api.internetcomputer.org/api/v4/canisters?limit=5&after=..."
# Get one canister by ID (v3; no v4 single-canister endpoint)
curl -s "https://ic-api.internetcomputer.org/api/v3/canisters/ryjl3-tyaaa-aaaaa-aaaba-cai"
# List subnets (v4: cursor pagination)
curl -s "https://ic-api.internetcomputer.org/api/v4/subnets?limit=10"
# List NNS proposals (v3; use limit)
curl -s "https://ic-api.internetcomputer.org/api/v3/proposals?limit=5"# List ledgers (v2: after/before/limit, next_cursor/previous_cursor in response)
curl -s "https://icrc-api.internetcomputer.org/api/v2/ledgers?limit=10"
# Get one ledger (e.g. ckBTC — mainnet ICP is not on ICRC API)
curl -s "https://icrc-api.internetcomputer.org/api/v2/ledgers/mxzaz-hqaaa-aaaar-qaada-cai"
# List transactions for a ledger (v2: cursor pagination)
curl -s "https://icrc-api.internetcomputer.org/api/v2/ledgers/mxzaz-hqaaa-aaaar-qaada-cai/transactions?limit=5"
# List accounts for a ledger (v2: after/before/limit)
curl -s "https://icrc-api.internetcomputer.org/api/v2/ledgers/mxzaz-hqaaa-aaaar-qaada-cai/accounts?limit=10"# List SNSes (v2: after/before/limit, next_cursor/previous_cursor)
curl -s "https://sns-api.internetcomputer.org/api/v2/snses?limit=10"
# List proposals for an SNS root canister (v2: cursor pagination)
# Replace ROOT_CANISTER_ID with a real SNS root canister ID
curl -s "https://sns-api.internetcomputer.org/api/v2/snses/ROOT_CANISTER_ID/proposals?limit=5"
# List neurons for an SNS (v2: after/before/limit)
curl -s "https://sns-api.internetcomputer.org/api/v2/snses/ROOT_CANISTER_ID/neurons?limit=10"# List accounts (v2: after/before/limit, next_cursor/prev_cursor)
curl -s "https://ledger-api.internetcomputer.org/v2/accounts?limit=10"
# Get account by account_identifier (64-char hex)
curl -s "https://ledger-api.internetcomputer.org/accounts/ACCOUNT_IDENTIFIER"
# List transactions (v2: cursor pagination)
curl -s "https://ledger-api.internetcomputer.org/v2/transactions?limit=10"
# Total supply (latest)
curl -s "https://ledger-api.internetcomputer.org/supply/total/latest"# Average cycle burn rate
curl -s "https://metrics-api.internetcomputer.org/api/v1/average-cycle-burn-rate"
# Governance metrics
curl -s "https://metrics-api.internetcomputer.org/api/v1/governance-metrics"
# ICP/XDR conversion rates (with optional start/end/step)
curl -s "https://metrics-api.internetcomputer.org/api/v1/icp-xdr-conversion-rates?start=1700000000&end=1700086400&step=86400"# IC API v3
curl -s "https://ic-api.internetcomputer.org/api/v3/openapi.json" -o ic-api-v3.json
# ICRC API
curl -s "https://icrc-api.internetcomputer.org/openapi.json" -o icrc-api.json
# SNS API
curl -s "https://sns-api.internetcomputer.org/openapi.json" -o sns-api.json
# Ledger API
curl -s "https://ledger-api.internetcomputer.org/openapi.json" -o ledger-api.json
# Metrics API v1
curl -s "https://metrics-api.internetcomputer.org/api/v1/openapi.json" -o metrics-api-v1.json# Smoke test: IC API root
curl -s -o /dev/null -w "%{http_code}" "https://ic-api.internetcomputer.org/api/v3/"
# Expected: 200
# Smoke test: ICRC ledgers list
curl -s -o /dev/null -w "%{http_code}" "https://icrc-api.internetcomputer.org/api/v2/ledgers?limit=1"
# Expected: 200# 1. IC API returns canister list with data array
curl -s "https://ic-api.internetcomputer.org/api/v3/canisters?limit=1" | head -c 200
# Expected: JSON with "data" or similar key and at least one canister
# 2. ICRC API returns ledger list
curl -s "https://icrc-api.internetcomputer.org/api/v2/ledgers?limit=1" | head -c 200
# Expected: JSON with "data" and ledger entries
# 3. Ledger API returns supply (array of [timestamp, value])
curl -s "https://ledger-api.internetcomputer.org/supply/total/latest"
# Expected: JSON array with two elements (timestamp and supply string)
# 4. OpenAPI specs are valid JSON
curl -s "https://ic-api.internetcomputer.org/api/v3/openapi.json" | python3 -c "import sys,json; json.load(sys.stdin); print('OK')"
# Expected: OK