---
title: "ExtractResult"
canonical_url: "https://www.nutrient.io/api/csharp/results/extract-result/"
md_url: "https://www.nutrient.io/api/csharp/results/extract-result.md"
last_updated: "2026-10-08T08:55:57.713Z"
description: "The artifacts produced by `Extract`: the same files, under the same names and with the same content, that the hosted service returns for the same request."
---

The artifacts produced by `Extract`: the same files, under the same names and with the same content, that the hosted service returns for the same request.

```csharp

using Nutrient;

```

The SDK creates this class through factory methods or other SDK objects.

## Properties

### ArtifactNames

```csharp

public string[] ArtifactNames { get; }

```

The file names of the artifacts this run produced, sorted.

**Type:** `string[]`

### ConfidenceJson

```csharp

public string? ConfidenceJson { get; }

```

The content of `confidence.json`, or null when this run did not produce it.

**Type:** `string?`

### DiagnosticsJson

```csharp

public string? DiagnosticsJson { get; }

```

The content of `diagnostics.json`, or null when this run did not produce it.

**Type:** `string?`

### ResultJson

```csharp

public string? ResultJson { get; }

```

The content of `result.json`, or null when this run did not produce it.

**Type:** `string?`

### WarningsJson

```csharp

public string? WarningsJson { get; }

```

The content of `warnings.json`, or null when this run did not produce it.

**Type:** `string?`

## Methods

### GetArtifact

```csharp

public string GetArtifact(string name)

```

Returns the content of an artifact, exactly as the run produced it.

**Parameters**

| Name   | Type     | Description                                          |
| ------ | -------- | ---------------------------------------------------- |
| `name` | `string` | The artifact file name, for example `document.json`. |

**Returns:** `string` - The artifact content.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when `name` is null or empty.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when this run did not produce that artifact.

### HasArtifact

```csharp

public bool HasArtifact(string name)

```

Whether this run produced an artifact with the given file name.

**Parameters**

| Name   | Type     | Description                                          |
| ------ | -------- | ---------------------------------------------------- |
| `name` | `string` | The artifact file name, for example `document.json`. |

**Returns:** `bool` - True when the artifact was produced.

### SaveTo

```csharp

public void SaveTo(string directory)

```

Writes every artifact into a directory under its own file name, creating the directory when needed and replacing files that already exist.

**Parameters**

| Name        | Type     | Description                  |
| ----------- | -------- | ---------------------------- |
| `directory` | `string` | The directory to write into. |

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when `directory` is null or empty.

**Throws:** [`NutrientException`](/api/csharp/exceptions/nutrient-exception/) - Thrown when an artifact name is not a plain file name.

## Resource management

```csharp

public void Dispose()

```

`ExtractResult` implements `IDisposable`. Call `Dispose()` or use a C# `using` declaration to release its native handle right away. If you don't, the handle is released when the object is garbage collected.

---

## Related pages

- [Results](/api/csharp/results.md)
- [Parse Result](/api/csharp/results/parse-result.md)

