---
title: GET /api/articles/[id]/sections/[sid]
description: Fetch one section's body — Markdown when agent-authored, always the rendered HTML — addressed by anchor. Backs scripto section get.
---

<Note>

The CLI equivalent is `scripto section get <id> <anchor>` (`-o <file>` to write the body to disk).

</Note>

Returns one section's body. `sid` is a **section anchor** — any unique prefix of the section id. `source` tells you which form is canonical: `markdown` for agent-authored sections, `html` for sections edited in the human canvas.

## Endpoint

```text
GET https://scripto.codika.io/api/articles/{id}/sections/{sid}
```

## Auth

`Authorization: Bearer scripto_…`

## Response (200)

```json
{
  "success": true,
  "data": {
    "section": {
      "id": "e5f6a7b8-…",
      "anchor": "e5f6a7b8",
      "level": 2,
      "title": "What changed",
      "words": 318,
      "source": "markdown",
      "markdown": "## What changed\n\n…",
      "html": "<h2>What changed</h2>…"
    }
  }
}
```

For an `html`-authored section, `markdown` is `null` and `html` is canonical.

## Errors

| HTTP | `code` | Cause | `nextAction` |
|---|---|---|---|
| 400 | `invalid-argument` | The anchor is ambiguous. | Use a longer anchor. |
| 404 | `not-found` | No such article, or no section matches the anchor. | Call GET /outline for current anchors. |
| 401 | `unauthenticated` | Missing or invalid key. | — |

## curl

```bash
curl -sS "https://scripto.codika.io/api/articles/$ID/sections/e5f6a7b8" \
  -H "Authorization: Bearer $SCRIPTO_API_KEY"
```

## Next

- **[PATCH .../sections/[sid]](/api-reference/update-section)** — replace this section.
- **[Working with sections](/guides/working-with-sections)** — the loop.
