---
title: Information Extractor
description: Extract structured information from a text using a LLM
---

Pull named pieces of information (a name, a date, an amount) out of free text with a chat model.

## Try it

## What it does

Information Extractor sends **Text** to the chat model connected to its **Model** slot and asks it to extract the fields you list in **What to extract**. The result comes back in one field, `extracted`.

Without an output parser, `extracted` is the model's reply as text. Connect a [Structured Output Parser](/nodes/builtin/ai/aidependencies/outputparser/structuredoutputparser/) to the **Output Parser** slot to get a real object whose fields you can use in later nodes.

## When to use it

* Read an invoice or order email and pull out the customer, date and total.
* Turn a support message into fields (product, problem, urgency) before saving it to a sheet.
* Collect contact details from a page you are visiting.

To rewrite or answer freely, use [Basic LLM Chain](/nodes/builtin/ai/aiagents/basicllmchainnode/). To pick one label for the text, use [Text Classifier](/nodes/builtin/ai/aiagents/textclassifiernode/).

## Inputs and settings

Fill **Text** with an expression such as `{{ $input.text }}`.

**What to extract** is required even when an output parser is connected. List each field and its format, for example: `customer name, invoice date (YYYY-MM-DD), total amount as a number, currency code`.

Use **System message** under **Options** for extra rules, such as `Leave a field empty when it is not in the text.`

## Outputs

Each output item has these fields:

```json title="Shape of an output item"
{
  "extracted": null
}
```

With a Structured Output Parser connected, read single fields downstream with expressions such as `{{ $input.extracted.total }}`. Without one, `extracted` is text, so field access does not work.

## Dependencies and credentials

* **Model**: a chat model such as [Chat OpenAI](/nodes/builtin/ai/aidependencies/llm/openai/) or [Chat Anthropic](/nodes/builtin/ai/aidependencies/llm/anthropic/). The model node holds the API key; this node has no credential of its own.
* **Output Parser**: a [Structured Output Parser](/nodes/builtin/ai/aidependencies/outputparser/structuredoutputparser/) whose **JSON Output Example** matches the fields you want, or an [Auto-fixing Output Parser](/nodes/builtin/ai/aidependencies/outputparser/autofixingoutputparser/) to repair replies that do not parse.

## Example workflow

1. [Get Selected Text](/nodes/extension/getselectedtext/) reads an order email you highlighted, with **Output field name** `text`.
2. Information Extractor with **Text** `{{ $input.text }}` and **What to extract** `customer name, order number, total`. Connect an [Chat OpenAI](/nodes/builtin/ai/aidependencies/llm/openai/) model and a [Structured Output Parser](/nodes/builtin/ai/aidependencies/outputparser/structuredoutputparser/) with **JSON Output Example** `{ "customer": "Jane Doe", "orderNumber": "A-1042", "total": 59.9 }`.
3. [Display Object](/nodes/extension/displayobject/) shows `extracted`, or a [Google Sheets](/nodes/builtin/integration/google-sheets/) node appends `{{ $input.extracted.customer }}` and `{{ $input.extracted.total }}` as a row.

## Common issues

* **`{{ $input.extracted.field }}` is empty.** No output parser is connected, so `extracted` is plain text. Connect a Structured Output Parser.
* **The parser fails on the reply.** The model answered with extra text around the data. Add an [Auto-fixing Output Parser](/nodes/builtin/ai/aidependencies/outputparser/autofixingoutputparser/), or use a stronger model.
* **"Dependency model is required".** Connect a chat model to the **Model** slot.
* **"Model not found".** The connected model node is not set up: open it and choose a model and its credential.
* **Fields are guessed when missing from the text.** Say in **System message** to leave missing fields empty.

## Recipes with this node

## Related nodes

* [Structured Output Parser](/nodes/builtin/ai/aidependencies/outputparser/structuredoutputparser/): define the shape of `extracted`.
* [Basic LLM Chain](/nodes/builtin/ai/aiagents/basicllmchainnode/): free-form prompts.
* [Text Classifier](/nodes/builtin/ai/aiagents/textclassifiernode/): route text by category.
* [Sentiment Analysis](/nodes/builtin/ai/aiagents/sentimentanalysisnode/): route text by tone.