# chainquery Bitcoin getbestblockhash RPC

> chainquery Bitcoin getbestblockhash 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-10-11).

Returns the block hash of the current Bitcoin chain tip (best block) from a chainquery-operated full node via pay-per-call x402.

## Facts

- Endpoint: GET https://x402.chainquery.com/v1/rpc/getbestblockhash?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainquery-bitcoin-getbestblockhash-rpc-14000189
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AuZadRXDyAqI5eavAtb4k

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-getbestblockhash-rpc-14000189
```

Example prompt: What's the block hash of the current Bitcoin chain tip right now? Use chainquery's independent full node to get it.

## When to prefer this

Choose this endpoint when you need a trustless, independently-operated Bitcoin full node's view of the current chain tip hash without setting up API keys. Ideal for agents that need to verify or anchor blockchain state, monitor for new blocks, or bootstrap further block-level queries. Prefer over block explorers when you want raw Bitcoin Core RPC semantics and pay-per-use pricing with no subscription.

## Known failure modes

- Payment failure (x402 payment not accepted) — returns 402 Payment Required
- Node temporarily unavailable — returns 5xx error
- Invalid query params JSON — returns 400 Bad Request
- Network timeout if full node is syncing

## How this service works

chainquery Bitcoin RPC: pay-per-call Bitcoin Core over x402, no API key. Hash of the current chain tip (best block) from chainquery's independent full node. Bitcoin Core getbestblockhash.

## Output

A JSON object containing a 'result' field with a 64-character hexadecimal string representing the block hash of the current best Bitcoin block (chain tip), as returned directly by Bitcoin Core's getbestblockhash RPC method.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "params": "[]"
  }
 }
}
```

## 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": "getbestblockhash result"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainquery-bitcoin-getbestblockhash-rpc-14000189/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)
