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

# Data

> Tweet and data-extraction nodes for Scrapist graphs.

**Tweet & extraction**

### `data.tweet.break` — Mini Tweet Break

Breaks a tweet object into fields (mini tweet schema).

**Inputs**

| Port    | Kind | Type         | Structure |
| ------- | ---- | ------------ | --------- |
| `tweet` | data | `mini_tweet` | scalar    |

**Outputs**

| Port            | Kind | Type         | Structure | Notes                            |
| --------------- | ---- | ------------ | --------- | -------------------------------- |
| `tweet-id`      | data | `string`     | scalar    |                                  |
| `type`          | data | `tweet_type` | scalar    | Uppercased (`TWEET`, `QUOTE`, …) |
| `author-handle` | data | `string`     | scalar    | Lowercased, no leading `@`       |
| `author-name`   | data | `string`     | scalar    |                                  |
| `author-avatar` | data | `image_url`  | scalar    | `null` if missing                |
| `body-text`     | data | `string`     | scalar    |                                  |
| `images`        | data | `image_url`  | array     |                                  |

### `data.tweet.breakFull` — Full Tweet Break

Breaks a full tweet payload into fields (including subtweet when available).

**Inputs**

| Port    | Kind | Type         | Structure |
| ------- | ---- | ------------ | --------- |
| `tweet` | data | `full_tweet` | scalar    |

**Outputs**

Same as `data.tweet.break`, plus:

| Port       | Kind | Type         | Structure | Notes                           |
| ---------- | ---- | ------------ | --------- | ------------------------------- |
| `subtweet` | data | `full_tweet` | scalar    | Optional; `null` if not present |

### `data.tweet.toUrl` — Tweet To URL

Converts a tweet to its canonical X URL.

**Inputs**

| Port    | Kind | Type         | Structure |
| ------- | ---- | ------------ | --------- |
| `tweet` | data | `mini_tweet` | scalar    |

**Outputs**

| Port  | Kind | Type  | Structure |
| ----- | ---- | ----- | --------- |
| `url` | data | `url` | scalar    |

### `data.tweet.waitForSubtweet` — Wait For Subtweet

Attempts to fetch a full tweet payload for a mini tweet (including subtweet).

**Inputs**

| Port      | Kind | Type         | Structure | Notes    |
| --------- | ---- | ------------ | --------- | -------- |
| `exec-in` | exec | —            | —         | Required |
| `tweet`   | data | `mini_tweet` | scalar    | Required |

**Outputs**

| Port         | Kind | Type         | Structure | Notes                                                 |
| ------------ | ---- | ------------ | --------- | ----------------------------------------------------- |
| `exec-out`   | exec | —            | —         |                                                       |
| `full-tweet` | data | `full_tweet` | scalar    | Falls back to original tweet if no listener available |

***

**Variables**

### `data.variable.get` — Get Variable

Reads the current value of a named variable.

**Outputs**

| Port    | Kind | Type      | Structure | Notes                                                         |
| ------- | ---- | --------- | --------- | ------------------------------------------------------------- |
| `value` | data | (generic) | scalar    | Type/structure come from metadata and the variable definition |

Notes:

* The node’s variable name comes from node metadata (stored under `variable`).

### `data.variable.set` / `data.variable.set::<id>` — Set Variable

Writes a new value to a named variable.

**Inputs**

| Port       | Kind | Type      | Structure | Notes                                                         |
| ---------- | ---- | --------- | --------- | ------------------------------------------------------------- |
| `exec-in`  | exec | —         | —         | Required                                                      |
| `value-in` | data | (generic) | scalar    | Type/structure come from metadata and the variable definition |

**Outputs**

| Port       | Kind | Type | Structure |
| ---------- | ---- | ---- | --------- |
| `exec-out` | exec | —    | —         |

Notes:

* The editor may display the node as “Set Variable” for a specific variable you picked.

***

**Utilities**

### `data.literal` — Literal Value

Outputs a literal value configured in the sidebar.

**Outputs**

| Port    | Kind | Type      | Structure |
| ------- | ---- | --------- | --------- |
| `value` | data | (generic) | (generic) |

Metadata/config:

* `value` — the literal JSON value
* Value type — the port data type (UI typing + runtime coercion)
* Value structure — `scalar` / `array` / `map`

### `data.getAtIndex` — Get At Index

Gets an item from an array.

**Inputs**

| Port    | Kind | Type      | Structure |
| ------- | ---- | --------- | --------- |
| `array` | data | (generic) | array     |
| `index` | data | `integer` | scalar    |

**Outputs**

| Port     | Kind | Type      | Structure | Notes                             |
| -------- | ---- | --------- | --------- | --------------------------------- |
| `result` | data | (generic) | scalar    | Optional; `null` if out of bounds |
| `found`  | data | `boolean` | scalar    |                                   |

Notes:

* Negative indices return `found = false` and `result = null`.

### `data.cast` — Cast

Casts a value to a configured target type/structure; on failure returns `null`.

**Inputs**

| Port       | Kind | Type      | Structure |
| ---------- | ---- | --------- | --------- |
| `value-in` | data | (generic) | (generic) |

**Outputs**

| Port     | Kind | Type      | Structure |
| -------- | ---- | --------- | --------- |
| `result` | data | (generic) | (generic) |

Config/metadata:

* Configure the target type and target structure in the sidebar to choose the cast.

### `data.array.length` — Array Length

Returns the length of an array.

**Inputs**

| Port    | Kind | Type      | Structure |
| ------- | ---- | --------- | --------- |
| `array` | data | (generic) | array     |

**Outputs**

| Port     | Kind | Type      | Structure |
| -------- | ---- | --------- | --------- |
| `length` | data | `integer` | scalar    |

### `data.array.includes` — Array Includes

Checks if an array contains a value.

**Inputs**

| Port    | Kind | Type      | Structure |
| ------- | ---- | --------- | --------- |
| `array` | data | (generic) | array     |
| `value` | data | (generic) | scalar    |

**Outputs**

| Port       | Kind | Type      | Structure |
| ---------- | ---- | --------- | --------- |
| `contains` | data | `boolean` | scalar    |

Config:

* `caseSensitive` (bool, default false) affects string matching.

### `data.drawTicker` — Draw Ticker

Renders a ticker image and returns an `image_url` plus the raw `image_blob`.

**Inputs**

| Port     | Kind | Type           | Structure | Notes                                          |
| -------- | ---- | -------------- | --------- | ---------------------------------------------- |
| `ticker` | data | `string`       | scalar    | Required                                       |
| `style`  | data | `ticker_style` | scalar    | Required (`ASCII`, `BNB_GOLD`, `SOL_GRADIENT`) |

**Outputs**

| Port         | Kind | Type         | Structure | Notes                                  |
| ------------ | ---- | ------------ | --------- | -------------------------------------- |
| `image`      | data | `image_url`  | scalar    | Predicted URL based on `IPFS_HOST_URL` |
| `image_blob` | data | `image_blob` | scalar    | JPEG bytes                             |

Notes:

* Requires `IPFS_HOST_URL` in the runtime environment.
* Upload is spawned asynchronously; the URL is “predicted” from the host + generated filename.
