# ink.branchline.getBud

> Published by [branchline.ink](https://lexicon.garden/identity/did:plc:brvu7akhdvsqcomb67pafw25)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.getBud)
- [Documentation](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.getBud/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.getBud/examples)

## Definitions

### `ink.branchline.getBud`

**Type**: `query`

Get the full root-to-bud path that leads to a given bud, with pollen counts. Buds are returned in story order, oldest (root) to newest (bud), and the response is paginated. The cursor is the AT-URI of the next bud to return on the following page; it is omitted when the target bud has been reached.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bud` | `string` (at-uri) | Yes | AT-URI of the bud at the end of this path. |
| `limit` | `integer` | No |  |
| `cursor` | `string` (at-uri) | No | AT-URI of the bud to start the next page at. Omit on the first request. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bud` | `string` (at-uri) | Yes |  |
| `buds` | `array` | Yes |  |
| `cursor` | `string` (at-uri) | No | AT-URI of the next bud to fetch. Absent when the target bud has been returned. |

### `ink.branchline.getBud#budView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `text` | `string` | Yes |  |
| `depth` | `integer` | Yes | Depth of this bud in the story tree (0 = root). |
| `title` | `string` | Yes |  |
| `author` | `string` (did) | Yes |  |
| `parent` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `formatting` | `array` | No |  |
| `pollenCount` | `integer` | Yes | Lifetime number of pollen grains on this bud (raw count, not the ranking-weighted score). |

## Raw Schema

```json
{
  "id": "ink.branchline.getBud",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "bud",
            "buds"
          ],
          "properties": {
            "bud": {
              "type": "string",
              "format": "at-uri"
            },
            "buds": {
              "type": "array",
              "items": {
                "ref": "#budView",
                "type": "ref"
              }
            },
            "cursor": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the next bud to fetch. Absent when the target bud has been returned."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "bud"
        ],
        "properties": {
          "bud": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the bud at the end of this path."
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1
          },
          "cursor": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the bud to start the next page at. Omit on the first request."
          }
        }
      },
      "description": "Get the full root-to-bud path that leads to a given bud, with pollen counts. Buds are returned in story order, oldest (root) to newest (bud), and the response is paginated. The cursor is the AT-URI of the next bud to return on the following page; it is omitted when the target bud has been reached."
    },
    "budView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "title",
        "text",
        "createdAt",
        "depth",
        "pollenCount"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "text": {
          "type": "string"
        },
        "depth": {
          "type": "integer",
          "minimum": 0,
          "description": "Depth of this bud in the story tree (0 = root)."
        },
        "title": {
          "type": "string"
        },
        "author": {
          "type": "string",
          "format": "did"
        },
        "parent": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "formatting": {
          "type": "array",
          "items": {
            "ref": "ink.branchline.bud#formatSpan",
            "type": "ref"
          }
        },
        "pollenCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Lifetime number of pollen grains on this bud (raw count, not the ranking-weighted score)."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
