# /v1/beacon/blob_sidecars/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/{block_id}

Retrieves blob sidecars for a given block.  
If the `indices` query parameter is specified, only the blob sidecars with the given indices will be returned.   Ordering of returned blob sidecars is not guaranteed.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-blob-sidecars-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| indices | string[] | No | Array of indices for blob sidecars to request.   If not provided, all blob sidecars in the block will be returned.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head
```

### JavaScript

```javascript
const options = {method: 'GET'};

fetch('https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head"

response = requests.get(url)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /eth/v1/beacon/blob_sidecars/{block_id}
method: GET
operation:
  summary: /v1/beacon/blob_sidecars/{block_id}
  description: |
    Retrieves blob sidecars for a given block.  
    If the `indices` query parameter is specified, only the blob sidecars with the given indices will be returned.   Ordering of returned blob sidecars is not guaranteed.
  tags:
    - Ethereum Beacon API Endpoints
  security:
    - apiKey: []
  parameters:
    - name: block_id
      in: path
      required: true
      schema:
        type: string
        example: head
      description: |
        Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.
    - name: indices
      in: query
      required: false
      schema:
        type: array
        items:
          type: string
        example:
          - '0'
          - '1'
      description: |
        Array of indices for blob sidecars to request.   If not provided, all blob sidecars in the block will be returned.
  responses:
    '200':
      description: Blob sidecars retrieved successfully.
      content:
        application/json:
          schema:
            type: object
            properties:
              version:
                type: string
                description: Protocol version (e.g. "electra").
              execution_optimistic:
                type: boolean
                description: Whether the execution payload is optimistic.
              finalized:
                type: boolean
                description: Whether the block is finalized.
              data:
                type: array
                items:
                  type: object
                  properties:
                    index:
                      type: string
                      description: Blob sidecar index.
                      example: '0'
                    blob:
                      type: string
                      description: Blob data (hex-encoded).
                      example: '0x1bba050000000000000000000000000000000000000000000000000000000000'
                    kzg_commitment:
                      type: string
                      description: KZG commitment for the blob.
                    kzg_proof:
                      type: string
                      description: KZG proof for the blob.
                    signed_block_header:
                      type: object
                      properties:
                        message:
                          type: object
                          properties:
                            slot:
                              type: string
                            proposer_index:
                              type: string
                            parent_root:
                              type: string
                            state_root:
                              type: string
                            body_root:
                              type: string
                        signature:
                          type: string
                    kzg_commitment_inclusion_proof:
                      type: array
                      description: Merkle inclusion proof for the commitment.
                      items:
                        type: string
          examples:
            response:
              summary: Example response
              value:
                version: electra
                execution_optimistic: false
                finalized: false
                data:
                  - index: '0'
                    blob: '0x1bba050000000000000000000000000000000000000000000000000000000000'
                    kzg_commitment: '0x9721f6bddeb94fe4bc809c63300cbb399ca7a04f5f75d7cf8c1ab9748b48aa37d7984353bc4bb2f6ac340289602b5690'
                    kzg_proof: '0x9834b06604317c27b6be7d1afb1b554bd8cd389d7c0895e7d4d3ce86e080493238b5fc2a845ebaf9d91c0b132f3a9799'
                    signed_block_header:
                      message:
                        slot: '12304801'
                        proposer_index: '354571'
                        parent_root: '0x18a7f340369eb4459e2274fc3eb98aad725351a9031fe3cbea8e75e888d5f78d'
                        state_root: '0x94c85d613e6ac2db8aa7cd03ba14e2c4d5da01f9ce80982ea42071d2f476a2aa'
                        body_root: '0x1b003d536c816c724abe2155314b88172b415eed0188c93eea1490d4c997b09a'
                      signature: '0x9246ca0bf19832b17da41cce8456bc5fe426306607557f44a115a0070c886c9e30fa72e1102e8d8bbb3303cc44f5715c17db0b7c25959d828e4b555c1763dbad111f4cbed00cb3ac6447affec07976339bd799145b24d75ce0127eeae76d9640'
                    kzg_commitment_inclusion_proof:
                      - '0x2816498e2a6e7dfb3397712273c67699cebc8c18502a18a743629287ae80b940'
                      - '0xf5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb4b'
                      - '0x4f4e84e7c7d803068cf23187f44b8f8e18175c62ea1730d06c42573ef2494526'
                      - '0xc78009fdf07fc56a11f122370658a353aaa542ed63e44c4bc15ff4cd105ab33c'
```
