> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/rpa-studio/document-ai/tasks/run-extractor.md).

# Run Extractor

Extracts data from a document

The `Run Extractor` activity takes an extractor definition file and a preprocessed document as its inputs. It performs document extraction in which the required data is extracted from the document according to the extractor definition. It outputs an [`ExtractionResult`](/getting-started/rpa-studio/variables/activity-variables.md) variable which contains the extracted data.

If the user provides a [`ClassificationResult` ](/getting-started/rpa-studio/variables/activity-variables.md#classificationresult)output for the document from [`Classify Document`](/rpa-studio/document-ai/tasks/classify-document.md) activity and if the extractor definition is multi-class then the activity only extracts the data defined under the class predicted in `ClassificationResult`.

{% hint style="info" %}
User should preprocess the document using a Document AI Client with appropriate extraction enabled depending on the extractor used.

* **`Text`**\
  `Regex Extractor`
* **`Skill`**\
  `Skill Extractor`
* **`Form`**\
  `Form Extractor`

The extractor definition can be created using `Create Extractor Window`
{% endhint %}

### Input

* **Processed Document** : [`ProcessedDocument Variable`](/getting-started/rpa-studio/variables/activity-variables.md#processeddocument) <mark style="color:red;">`Required`</mark>\
  The preprocessed document from the preprocess document activity.<br>
* **Extractor Definition** : [`String Argument`](/getting-started/rpa-studio/arguments.md) <mark style="color:red;">`Required`</mark>\
  Path to the classifier definition file (`*.extractor.vdai).`<br>
* **Document AI Client** : [`DocAIClient Variable`](/getting-started/rpa-studio/variables/activity-variables.md) <mark style="color:red;">`Required`</mark>\
  The configured `Document AI Client`.<br>
* **Classification Result** : [`ClassificationResult Variable`](/getting-started/rpa-studio/variables/activity-variables.md#classificationresult) <mark style="color:red;">`Required`</mark>\
  The `ClassificationResult` if the user has classified the document and the definition is multi-class.

### Options

* **Split Pages** : <mark style="color:red;">`Required`</mark>\
  If `true` and the document has multiple pages then the extraction is applied on each page independently. Available values are :
  * `True`
  * `False`

### Output

* **Extraction Result** : [`ExtractionResult Variable`](/getting-started/rpa-studio/variables/activity-variables.md#extractionresult) <mark style="color:red;">`Required`</mark> \
  The result of the document extraction.
