> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Get a run result

GET https://api.cloudraker.com/spaces/{spaceId}/runs/{runId}/result

Fetches the durable, grounded result of a terminal extract-structured run: one entry per source document with extracted `data`, per-field `evidence` (source citations), envelope (`unit`, `fieldKeys`, `schema`) and per-document status. Requires `space:read` (denied → 404, which also hides the space's existence). Returns 404 while the run is still `running` or when no result exists. Response status and headers are preserved.

Reference: https://docs.cloudraker.com/api/cloud-raker-api/workspace/space-runs/get-space-run-result

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: CloudRaker API
  version: 1.0.0
paths:
  /spaces/{spaceId}/runs/{runId}/result:
    get:
      operationId: get-space-run-result
      summary: Get a run result
      description: >-
        Fetches the durable, grounded result of a terminal extract-structured
        run: one entry per source document with extracted `data`, per-field
        `evidence` (source citations), envelope (`unit`, `fieldKeys`, `schema`)
        and per-document status. Requires `space:read` (denied → 404, which also
        hides the space's existence). Returns 404 while the run is still
        `running` or when no result exists. Response status and headers are
        preserved.
      tags:
        - spaceRuns
      parameters:
        - name: spaceId
          in: path
          required: true
          schema:
            type: string
        - name: runId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The durable, grounded run result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResult'
servers:
  - url: https://api.cloudraker.com
    description: Production
  - url: https://api.staging.raker.one
    description: Staging
  - url: https://api.dev.raker.one
    description: Development
components:
  schemas:
    RunResultUnit:
      type: string
      enum:
        - per_document
        - across_documents
        - rows_per_document
      title: RunResultUnit
    RunResultDocsItemsStatus:
      type: string
      enum:
        - done
        - failed
      title: RunResultDocsItemsStatus
    RunResultDocsItemsRowsItems:
      type: object
      properties:
        data:
          type: object
          additionalProperties:
            description: Any type
        evidence:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              additionalProperties:
                description: Any type
      required:
        - data
      title: RunResultDocsItemsRowsItems
    RunResultDocsItems:
      type: object
      properties:
        id:
          type: string
          description: The source fileId, or `merged` for across_documents.
        name:
          type: string
        contentType:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/RunResultDocsItemsStatus'
        error:
          type: string
        data:
          type: object
          additionalProperties:
            description: Any type
        evidence:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              additionalProperties:
                description: Any type
          description: Field key → citations backing that value.
        rows:
          type: array
          items:
            $ref: '#/components/schemas/RunResultDocsItemsRowsItems'
          description: Present for a `rows_per_document` run.
        edited:
          type: boolean
          description: A human has edited this document.
      required:
        - id
        - name
        - contentType
        - status
      title: RunResultDocsItems
    RunResult:
      type: object
      properties:
        version:
          type: integer
        runId:
          type: string
        actionSlug:
          type: string
        unit:
          $ref: '#/components/schemas/RunResultUnit'
        fieldKeys:
          type: array
          items:
            type: string
        schema:
          type:
            - object
            - 'null'
          additionalProperties:
            description: Any type
          description: The applied (or inferred) extraction schema.
        docs:
          type: array
          items:
            $ref: '#/components/schemas/RunResultDocsItems'
        evidenceOmitted:
          type: boolean
          enum:
            - true
          description: The size guard dropped the citations.
        dataOmitted:
          type: boolean
          enum:
            - true
          description: The size guard dropped the values too.
        createdAt:
          type: string
          format: date-time
        finishedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - version
        - runId
        - actionSlug
        - unit
        - fieldKeys
        - schema
        - docs
        - createdAt
        - finishedAt
      title: RunResult
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "version": 1,
  "runId": "a3f47b2e-9c4d-4f1a-8b2e-3d5f7a9c1234",
  "actionSlug": "invoice_extraction",
  "unit": "per_document",
  "fieldKeys": [
    "invoice_number",
    "date",
    "total_amount"
  ],
  "schema": {
    "invoice_number": {
      "type": "string",
      "description": "Unique identifier for the invoice"
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "Date of the invoice"
    },
    "total_amount": {
      "type": "number",
      "description": "Total amount due on the invoice"
    }
  },
  "docs": [
    {
      "id": "file_987654321",
      "name": "Invoice_2024_01_10.pdf",
      "contentType": "application/pdf",
      "status": "done",
      "error": "",
      "data": {
        "invoice_number": "INV-20240110-001",
        "date": "2024-01-10",
        "total_amount": 1250.75
      },
      "evidence": {
        "invoice_number": [
          {
            "fileId": "file_987654321",
            "page": 1,
            "bbox": [
              100,
              200,
              300,
              220
            ]
          }
        ],
        "date": [
          {
            "fileId": "file_987654321",
            "page": 1,
            "bbox": [
              100,
              230,
              200,
              250
            ]
          }
        ],
        "total_amount": [
          {
            "fileId": "file_987654321",
            "page": 1,
            "bbox": [
              400,
              600,
              500,
              620
            ]
          }
        ]
      },
      "rows": [
        {
          "data": {
            "item": "Widget A",
            "quantity": 10,
            "price": 25.5
          },
          "evidence": {
            "item": [
              {
                "fileId": "file_987654321",
                "page": 2,
                "bbox": [
                  50,
                  100,
                  150,
                  120
                ]
              }
            ],
            "quantity": [
              {
                "fileId": "file_987654321",
                "page": 2,
                "bbox": [
                  160,
                  100,
                  200,
                  120
                ]
              }
            ],
            "price": [
              {
                "fileId": "file_987654321",
                "page": 2,
                "bbox": [
                  210,
                  100,
                  260,
                  120
                ]
              }
            ]
          }
        }
      ],
      "edited": true
    }
  ],
  "createdAt": "2024-01-15T09:30:00Z",
  "finishedAt": "2024-01-15T09:45:00Z",
  "evidenceOmitted": true,
  "dataOmitted": true
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/spaces/spaceId/runs/runId/result"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/spaces/spaceId/runs/runId/result';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/spaces/spaceId/runs/runId/result"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/spaces/spaceId/runs/runId/result")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cloudraker.com/spaces/spaceId/runs/runId/result")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cloudraker.com/spaces/spaceId/runs/runId/result', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/spaces/spaceId/runs/runId/result");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/spaces/spaceId/runs/runId/result")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```