> For the complete documentation index, see [llms.txt](https://docs.mburger.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mburger.cloud/how-to/basic-interactions/blocks/get-a-single-block.md).

# Get a Single Block

{% tabs %}
{% tab title="cURL" %}

```bash
curl https://mburger.cloud/api/blocks/<id>
-H "Accept: application/json" 
-H "X-MBurger-Token: <token>" 
-H "X-MBurger-Version: 3"
```

{% endtab %}

{% tab title="iOS SDK" %}

```swift
MBClient.getBlock(withId: BLOCK_ID,
                  success: { block in
                            
                  }, 
                  failure: { error in
                            
                  })
```

{% endtab %}

{% tab title="Android SDK" %}

```kotlin
val blockListener = object: MBBlockResultListener{
            override fun onBlockApiError(error: String) {
            }

            override fun onBlockApiResult(block: MBBlock) {
            }
        }
        
MBurgerTasks.askForBlock(context = applicationContext, 
                         block_id = BLOCK_ID,
                         getSections = true,
                         listener = blockListener)
```

{% endtab %}

{% tab title="PHP SDK" %}

```php
$response = (new MBurger())->getBlock($block_id);
```

{% endtab %}

{% tab title="JS SDK" %}

```javascript
const mburger = require('mburger');

const instance = mburger.createClient({
    api_key: "123456789asdfghjkl",
});

instance.getBlock({
    block_id: 798,
    locale: 'it',
    original_media: false
}).then(result => console.log(result));

```

{% endtab %}

{% tab title="Flutter SDK" %}

```dart
MBBlock block = await MBManager.shared.getBlock(blockId: BLOCK_ID);
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mburger.cloud/how-to/basic-interactions/blocks/get-a-single-block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
