# chainquery getmempoolancestors

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

Returns in-mempool ancestor transactions (txids or full entries) for a given unconfirmed Bitcoin transaction via Bitcoin Core RPC

## Facts

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

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-getmempoolancestors-e64f21fb
```

Example prompt: Can you pull all in-mempool ancestors for Bitcoin transaction f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 — I want the full mempool entries, not just txids.

## When to prefer this

Use this endpoint when you need to trace the ancestor dependency graph of an unconfirmed Bitcoin transaction in the mempool, especially for fee estimation, RBF analysis, or understanding transaction chains. Prefer over block-explorer APIs when you need raw Bitcoin Core RPC semantics from an independent full node without requiring an API key registration.

## Known failure modes

- Transaction not in mempool (txid confirmed or never seen) — returns RPC error
- Invalid or malformed txid — returns RPC error
- Payment not included or insufficient — HTTP 402 response requiring x402 payment
- Params JSON malformed — query parameter parse error
- Node temporarily unavailable — HTTP 5xx error

## How this service works

chainquery Bitcoin RPC: pay-per-call Bitcoin Core over x402, no API key. In-mempool ancestors of a transaction (txids or full entries) from chainquery's independent full node. Bitcoin Core getmempoolancestors.

## Output

Returns a JSON object with the Bitcoin Core getmempoolancestors result: either an array of ancestor txids (verbose=false) or a map of txid to full mempool entry objects including fees, size, weight, descendant/ancestor counts, and dependency info (verbose=true).

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

## More

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