# chainquery Bitcoin getblockheader RPC

> chainquery Bitcoin getblockheader RPC is a paid API for AI agents from x402.chainquery.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Fetches block header fields (version, merkle root, timestamp, bits, nonce, previous hash) for a given Bitcoin block hash via Bitcoin Core's getblockheader RPC, pay-per-call over x402.

## Facts

- Endpoint: GET https://x402.chainquery.com/v1/rpc/getblockheader
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainquery-bitcoin-getblockheader-rpc-e647cea3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E4Ypfu446soLwUv8OKK9X

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chainquery-bitcoin-getblockheader-rpc-e647cea3
```

Example prompt: Can you pull the block header for Bitcoin block 000000000000000000036e6a4a2dffc1d86c35b85cbaeea98d6e9fa25e5c3ff0 — I need the version, merkle root, timestamp, bits, nonce, and previous block hash.

## When to prefer this

Use this endpoint when you need raw Bitcoin block header fields (version, merkle root, nonce, bits, timestamp, previous hash) from an independent Bitcoin Core full node without needing to register for an API key, and you are willing to pay $0.005 USDC per call via x402. Prefer this over general blockchain explorers when you need direct Bitcoin Core RPC semantics or programmatic access in an agent workflow.

## Known failure modes

- Invalid or unknown block hash returns an RPC error result
- Malformed params JSON array causes a 400-level error
- Payment failure or insufficient USDC balance prevents the call from completing
- Node temporarily unavailable results in a 5xx error

## How this service works

chainquery Bitcoin RPC: pay-per-call Bitcoin Core over x402, no API key. Block header fields by hash from chainquery's independent full node: version, merkle root, time, bits, nonce, previous hash. Bitcoin Core getblockheader.

## Output

Returns a Bitcoin Core getblockheader result object containing the block's version, merkleroot, time, bits, nonce, previousblockhash, and other header fields for the specified block hash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "params": {
       "type": "string",
       "description": "optional: JSON-encoded array of positional RPC params"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "description": "getblockheader result"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainquery-bitcoin-getblockheader-rpc-e647cea3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.chainquery.com](https://www.zero.xyz/host/x402.chainquery.com/llms.txt)
