> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getblockfilter | Bitcoin

> The getblockfilter method retrieves a BIP 157 content filter for a particular block. Available on Bitcoin via Chainstack JSON-RPC nodes.

The `getblockfilter` method retrieves a BIP 157 content filter for a particular block.

<Note>
  **Customization required**

  This method requires node [node customization](/docs/features-availability-across-subscription-plans) and will not work out of the box. Talk to us & we'll implement it.
</Note>

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `blockhash` (required) — the hash of the block
* `filtertype` (required) — the type of filter to retrieve, currently only `basic` is supported

## Response

* `result` — an object containing the block filter with the following fields:
  * `filter` — the hex-encoded filter data
  * `header` — the hex-encoded filter header
* `error` — an object containing an error message if an error occurred, otherwise `null`
* `id` — an integer representing the ID of the request, used to match requests with responses

## Use case

Block filters are used to efficiently determine if a block may contain transactions relevant to a particular wallet or light client without downloading the entire block. The `getblockfilter` method allows retrieving these filters for a specific block.

For example, a light wallet might use `getblockfilter` to check if it needs to download a particular block to search for wallet transactions, reducing bandwidth and processing requirements compared to downloading every block.


## OpenAPI

````yaml /openapi/bitcoin_node_api/getblockfilter.json POST /788f110831fe13808302bd79796d55e8
openapi: 3.0.0
info:
  title: getblockfilter example
  version: 1.0.0
  description: >-
    This is an API example for getblockfilter, a method to retrieve a BIP 157
    content filter for a particular  block.
servers:
  - url: https://nd-202-842-353.p2pify.com
security: []
paths:
  /788f110831fe13808302bd79796d55e8:
    post:
      tags:
        - Blockchain Operations
      summary: getblockfilter
      operationId: getBlockFilter
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '1.0'
                method:
                  type: string
                  default: getblockfilter
                params:
                  type: array
                  items:
                    oneOf:
                      - type: string
                        description: The block hash
                        example: >-
                          000000000000000000100c3c4b0b07a64612385408f6c7d97c422a5a0c1d859d
                      - type: string
                        description: The filter type
                        example: basic
                  default:
                    - >-
                      000000000000000000100c3c4b0b07a64612385408f6c7d97c422a5a0c1d859d
                    - basic
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The BIP 157 content filter for the block
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    description: An object containing the block filter
                  error:
                    type: object
                  id:
                    type: integer

````