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

# JSON Schema

> Configure a workflow step that defines structured fields and returns JSON-shaped output for later steps

Use **JSON Schema** when you want a workflow step to define a structured output shape that later steps can reference field by field.

## Configuration

| Option | Required | Description |
| - | - | - |
| Name | No | Label for the step in the workflow canvas. |
| Schema Items | Yes | Rows in **Schema Items**. Each row has a **Key** and a **Value / Description** field. |
| Add this step from the **Utilities** group in **Search steps...**. | | |

In **Schema Items**, click **Add Item** to add another field. Each row lets you define the output key and describe the value that key should hold. The **Value / Description** field supports **Insert Variable**.

If a value resolves to a JSON array or object, Fetch Hive stores it as structured JSON rather than a string. For example, a value of `{{step_2.output.items}}` can produce an array that an **Iteration** step can use later. You can also build a JSON array literal from multiple array variables, such as `[{{step_2.output.items}},{{step_3.output.items}}]`; this creates an array of arrays, not a flattened concatenation.

## Output

Click **Run** in the step header to test the step. Fetch Hive shows the generated result in **Output** after the run completes.

Use the variable picker in a later step to insert the exact output path for your run. The base reference is:

```text theme={null}
{{STEP_IDENTIFIER.output}}
```

If you want the full structured result, reference the base output directly:

```text theme={null}
{{step_2.output}}
```

If your run returns nested keys, the variable picker shows the exact fields you can insert into later steps.

## Example

Add **JSON Schema** from the **Utilities** group in **Search steps...**.

Set **Name** to something like `Article fields`.

In **Schema Items**, add keys such as `title`, `summary`, and `sentiment`.

For each item, describe what the value should contain in **Value / Description**. If a field should depend on earlier workflow data, click **Insert Variable** and add that reference.

Click **Run** and review the structured result in **Output** before using those keys in later steps.

## Notes

* The settings sheet lets you add and remove schema rows with **Add Item** and the delete action on each row.
* This step editor does not show a **When the step fails** control in its settings sheet.
* JSON Schema preserves resolved JSON arrays and objects for downstream steps, including **Iteration**. It does not currently merge two arrays into one flat array automatically.
* Use the variable picker after a test run if you want to confirm the exact keys available to later steps.

See also: [Creating and Editing](https://docs.fetchhive.com/workflows/creating-and-editing.md), [Testing and Iteration](https://docs.fetchhive.com/workflows/testing-and-iteration.md), and [AI Prompt](https://docs.fetchhive.com/workflows/steps/ai/ai-prompt.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.