Bitview Server API
API metadata, health monitoring, and OpenAPI specifications.
API metadata, health monitoring, and OpenAPI specifications.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/bitview-space:bitview-space-server-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Bitview Server API
description: 'Bitview is a free, open-source Bitcoin data server: on-chain metrics, blocks, mempool and mining data, with charts and an API, at bitview.space or beside your own Bitcoin Core node.
API for querying Bitcoin blockchain data, mempool state, and on-chain series.
### Features
- **Mempool.space compatible**: Blocks, transactions, addresses, mining, fees, and mempool endpoints match the mempool.space REST API
- **Series**: Thousands of on-chain time-series across multiple indexes (date, block height, etc.)
- **Multiple formats**: JSON and CSV output
- **For LLMs**: `/llms.txt` for discovery, `/api.json` a compact custom summary of this spec for reading (not OpenAPI); build tools from `/openapi.json`
- **MCP**: Stateless, read-only access to these operations at mcp.bitview.space, with no authentication required
### Quick start
```bash
curl -s https://bitview.space/api/blocks/tip/height
curl -s https://bitview.space/api/v1/fees/recommended
curl -s https://bitview.space/api/mempool
curl -s https://bitview.space/api/series/search?q=price
```
### Errors
Errors use `application/problem+json`:
```json
{
"error": {
"type": "not_found",
"code": "series_not_found",
"message": "''foo'' not found, did you mean ''bar''? What became of it: /changes/?id=foo",
"doc_url": "/api"
}
}
```
- **`type`**: Error category, following the status — `invalid_request` (4xx other than 404), `not_found` (404), `unavailable` (503), `timeout` (504), or `internal` (other 5xx); see the `ErrorType` schema
- **`code`**: Machine-readable error code (e.g. `invalid_address`, `series_not_found`, `weight_exceeded`); see the `ErrorCode` schema
### Client Libraries
- JavaScript
- Python
- Rust
- MCP
### Links
- GitHub
- Bitview Studio - Charts of any series, built on this API'
termsOfService: https://bitview.space/terms/
contact:
name: Bitview
url: https://bitview.space/support/
email: support@bitview.space
license:
name: MIT
url: https://github.com/bitcoinresearchkit/mono/blob/main/LICENSE
version: v0.13.0
x-privacy-policy: https://bitview.space/privacy/
tags:
- name: Server
description: API metadata, health monitoring, and OpenAPI specifications.
paths:
/health:
get:
tags:
- Server
summary: Health check
description: Local health and query-readiness check. Returns server identity, uptime, and a coherent local sync snapshot without a bitcoind round-trip. Reads the published prefix during processing; an empty index returns 503 `state_updating` at once. Responses are not cached. For chain-tip catch-up, request `GET /api/server/sync`.
operationId: get_health
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Health'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
x-mcp-ignore: true
/version:
get:
tags:
- Server
summary: API version
operationId: get_version
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ServerVersion'
'304':
description: 'Not modified: the request''s validator matches the current representation'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
x-mcp-ignore: true
/api/server/sync:
get:
tags:
- Server
summary: Sync status
description: Returns a coherent local index snapshot and a separately observed Bitcoin Core tip height. The two heights can differ during indexing or a reorg. Conditional requests refresh these observations before validation.
operationId: get_sync_status
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/SyncStatus'
'304':
description: 'Not modified: the request''s validator matches the current representation'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
/api/server/logs:
get:
tags:
- Server
summary: Logs
description: 'The server''s last log lines, at most 1,000, oldest first: requests (status, path and duration; never who made them) and everything else it logs. To read on, send the answer''s `next` back as `after`: the lines since, each once. A jump in `seq` shows lines that left memory before the next request; another `started_unix_ms` shows the server restarted (and its answer has every kept line). Answers are cached for a second.'
operationId: get_logs
parameters:
- in: query
name: after
description: 'The last answer''s `next`: only the lines since. From a process that''s since restarted, or none, every kept line.'
schema:
description: 'The last answer''s `next`: only the lines since. From a process that''s since restarted, or none, every kept line.'
type: string
style: form
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Logs'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
x-mcp-ignore: true
/api/server/disk:
get:
tags:
- Server
summary: Disk usage
description: Returns allocated file bytes (file lengths on non-Unix platforms) for BRK and Bitcoin data. Each request scans both trees; these are independent observations, not an atomic filesystem snapshot. Conditional requests validate the newly observed totals. Directory-link cycles and excessive nesting fail without returning partial totals.
operationId: get_disk_usage
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/DiskUsage'
'304':
description: 'Not modified: the request''s validator matches the current representation'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
x-mcp-ignore: true
/openapi.json:
get:
tags:
- Server
summary: OpenAPI specification
description: Full OpenAPI 3.1 specification for this API. Build tools from this document.
operationId: get_openapi
responses:
'200':
description: Successful response
content:
application/json:
schema: true
'304':
description: 'Not modified: the request''s validator matches the current representation'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
x-mcp-ignore: true
/api.json:
get:
tags:
- Server
summary: Compact API summary
description: 'Compact custom summary of the OpenAPI specification for LLM reading: types instead of schemas, `returns` instead of responses, no examples; parameters keep their enum, default and bounds. Not valid OpenAPI: build tools from `GET /openapi.json`.'
operationId: get_api
responses:
'200':
description: Successful response
content:
application/json:
schema: true
'304':
description: 'Not modified: the request''s validator matches the current representation'
'400':
description: Invalid request parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'500':
description: Internal server error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'503':
description: Service temporarily unavailable
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
'504':
description: Request deadline exceeded
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorBody'
x-mcp-ignore: true
components:
schemas:
ErrorDetail:
type: object
properties:
type:
description: Error category, following the HTTP status
allOf:
- $ref: '#/components/schemas/ErrorType'
code:
description: Machine-readable error code
allOf:
- $ref: '#/components/schemas/ErrorCode'
message:
description: Human-readable description
type: string
doc_url:
description: Link to API documentation
type: string
format: uri-reference
required:
- type
- code
- message
- doc_url
HealthStatus:
description: 'The server''s health: `healthy` whenever it answers.'
type: string
enum:
- healthy
Height:
description: 'A block height: how many blocks came before it.'
type: integer
format: uint32
minimum: 0
examples:
- 0
- 210000
- 420000
- 840000
ServerVersion:
description: 'The server''s version: a release''s, `v` and its SemVer (`v0.12.2`; a pre-release,
`v0.13.0-beta.1`); built from a commit of the repository (`cargo install --git`, next''s), that
commit, short (`a1b2c3d`).'
type: string
examples:
- v0.12.2
pattern: ^(v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?|[0-9a-f]{7})$
ErrorCode:
type: string
enum:
- not_found
- invalid_address
- invalid_network
- unsupported_type
- no_series
- series_unsupported_index
- weight_exceeded
- too_many_utxos
- limit_exceeded
- unknown_after_txid
- unknown_address
- unknown_txid
- unknown_pool
- out_of_range
- unindexable_date
- no_data
- series_not_found
- mempool_not_available
- state_updating
- internal_error
- bad_request
- overloaded
- timeout
- method_not_allowed
Logs:
description: The server's last log lines, oldest first.
type: object
properties:
started_unix_ms:
description: 'When this server process began its log, in Unix milliseconds: another than the last answer''s shows the
server restarted.'
type: integer
format: int64
lines:
type: array
items:
$ref: '#/components/schemas/LogLine'
next:
description: 'Where this answer ends: sent back as `after`, the lines since. `{started_unix_ms}-{seq}`, the process and the
`seq` of the next line it will log; to pass back as it is, not to read.'
type: string
required:
- started_unix_ms
- lines
- next
LogLevel:
type: string
enum:
- error
- warn
- info
- debug
- trace
SyncStatus:
type: object
properties:
indexed_height:
description: Height of the last indexed block
allOf:
- $ref: '#/components/schemas/Height'
computed_height:
description: Height of the last computed block (series)
allOf:
- $ref: '#/components/schemas/Height'
tip_height:
description: 'Height of the Bitcoin node''s chain tip; `/health` reports `indexed_height` instead, without
asking the node'
allOf:
- $ref: '#/components/schemas/Height'
blocks_behind:
description: Number of blocks behind the tip
allOf:
- $ref: '#/components/schemas/Height'
last_indexed_at:
description: Human-readable timestamp of the last indexed block (ISO 8601)
type: string
format: date-time
last_indexed_at_unix:
description: Unix timestamp of the last indexed block
allOf:
- $ref: '#/components/schemas/Timestamp'
required:
- indexed_height
- computed_height
- tip_height
- blocks_behind
- last_indexed_at
- last_indexed_at_unix
ErrorType:
description: 'Error category, following the HTTP status: `invalid_request` (4xx other than 404),
`not_found` (404), `unavailable` (503; `Retry-After` when transient), `timeout` (504), `internal`
(other 5xx).'
type: string
enum:
- invalid_request
- not_found
- unavailable
- timeout
- internal
LogLine:
description: One line of the server's log.
type: object
properties:
seq:
description: Its place in this process's log, from 0 with no gaps.
type: integer
format: uint64
minimum: 0
unix_ms:
description: When it was logged, in Unix milliseconds.
type: integer
format: int64
level:
$ref: '#/components/schemas/LogLevel'
text:
description: 'What the log files show after the level: a request''s status, path and duration, or a message and its fields.'
type: string
required:
- seq
- unix_ms
- level
- text
Timestamp:
description: A Unix timestamp, in seconds.
type: integer
format: uint32
minimum: 0
examples:
- 1231006505
- 1672531200
- 1713571200
- 1743631892
- 1759000868
ErrorBody:
description: The JSON body of every API error (`application/problem+json`).
type: object
properties:
error:
$ref: '#/components/schemas/ErrorDetail'
required:
- error
Health:
type: object
properties:
status:
$ref: '#/components/schemas/HealthStatus'
service:
type: string
const: brk
version:
$ref: '#/components/schemas/ServerVersion'
timestamp:
description: Current server time (ISO 8601)
type: string
format: date-time
started_at:
description: Server start time (ISO 8601)
type: string
format: date-time
uptime_seconds:
description: Uptime in seconds
type: integer
format: uint64
minimum: 0
indexed_height:
description: Height of the last indexed block
allOf:
- $ref: '#/components/schemas/Height'
computed_height:
description: Height of the last computed block (series)
allOf:
- $ref: '#/components/schemas/Height'
tip_height:
description: 'Height of the Bitcoin node''s chain tip; `/health` reports `indexed_height` instead, without
asking the node'
allOf:
- $ref: '#/components/schemas/Height'
blocks_behind:
description: Number of blocks behind the tip
allOf:
- $ref: '#/components/schemas/Height'
last_indexed_at:
description: Human-readable timestamp of the last indexed block (ISO 8601)
type: string
format: date-time
last_indexed_at_unix:
description: Unix timestamp of the last indexed block
allOf:
- $ref: '#/components/schemas/Timestamp'
required:
- status
- service
- version
- timestamp
- started_at
- uptime_seconds
- indexed_height
- computed_height
- tip_height
- blocks_behind
- last_indexed_at
- last_indexed_at_unix
DiskUsage:
type: object
properties:
brk:
description: Human-readable brk data size (e.g., "48.8 GiB")
type: string
brk_bytes:
description: brk data size in bytes
type: integer
format: uint64
minimum: 0
bitcoin:
description: Human-readable Bitcoin blocks directory size
type: string
bitcoin_bytes:
description: Bitcoin blocks directory size in bytes
type: integer
format: uint64
minimum: 0
ratio:
description: Ratio of BRK bytes to Bitcoin bytes; zero when Bitcoin bytes are zero.
type: number
format: double
required:
- brk
- brk_bytes
- bitcoin
- bitcoin_bytes
- ratio