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

# Get record results

GET https://api.runtype.com/v1/analytics/record-results

Get all record results for the current user with filtering and pagination. When a `days` parameter is provided, returns aggregated daily execution analytics instead of paginated results.

Reference: https://docs.runtype.com/api-reference/runtype-api/analytics/get-record-results

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Query parameters

- `days` (string, optional)
- `page` (string, optional)
- `limit` (string, optional)
- `status` (string, optional)
- `cursor` (string, optional)

## Response

### 200

Record results or aggregated daily analytics

- `Analytics_getRecordResults_Response_200`
  - AnalyticsGetRecordResultsResponse2000
  - AnalyticsGetRecordResultsResponse2001

## Errors

### 400 Bad Request Error

Invalid parameters

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 403 Forbidden Error

Insufficient permissions

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

## Types

### AnalyticsGetRecordResultsResponse2000

- `dailyExecutions` (list of V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItems, required)
- `period` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0Period, required)
- `summary` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0Summary, required)

### AnalyticsGetRecordResultsResponse2001

- `data` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf1Data, required)
- `success` (boolean, required)

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItems

- `date` (string, required)
- `failedExecutions` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsFailedExecutions, required)
- `flowsFailure` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsFlowsFailure, required)
- `flowsSuccess` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsFlowsSuccess, required)
- `promptsFailure` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsPromptsFailure, required)
- `promptsSuccess` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsPromptsSuccess, required)
- `successfulExecutions` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsSuccessfulExecutions, required)
- `totalExecutions` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsTotalExecutions, required)

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0Period

- `days` (integer, required)
- `endDate` (string, required)
- `startDate` (string, required)

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0Summary

- `failedExecutions` (integer, required)
- `flowExecutions` (integer, required)
- `promptExecutions` (integer, required)
- `successRate` (double, required)
- `successfulExecutions` (integer, required)
- `totalExecutions` (integer, required)

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf1Data

- `pagination` (V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf1DataPagination, required)
- `results` (list of V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf1DataResultsItems, required)

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsFailedExecutions

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsFlowsFailure

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsFlowsSuccess

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsPromptsFailure

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsPromptsSuccess

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsSuccessfulExecutions

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf0DailyExecutionsItemsTotalExecutions

- double
- string

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf1DataPagination

- `hasNextPage` (boolean, required)
- `hasPrevPage` (boolean, required)
- `limit` (integer, required)
- `nextCursor` (string, required, nullable)
- `page` (integer, required)
- `total` (integer, required)
- `totalPages` (integer, required)

### V1AnalyticsRecordResultsGetResponsesContentApplicationJsonSchemaOneOf1DataResultsItems

- `completionTokens` (integer, required, nullable)
- `createdAt` (string, required)
- `executionTimeMs` (integer, required, nullable)
- `flowId` (string, required, nullable)
- `flowName` (string, required, nullable)
- `id` (string, required)
- `modelCost` (string, required, nullable)
- `modelUsed` (string, required, nullable)
- `promptId` (string, required, nullable)
- `promptName` (string, required, nullable)
- `promptResponseFormat` (string, required, nullable)
- `promptText` (string, required, nullable)
- `promptTokens` (integer, required, nullable)
- `recordId` (string, required)
- `recordName` (string, required)
- `recordType` (string, required)
- `result` (string, required, nullable)
- `status` (string, required)
- `toolCost` (string, required, nullable) — Built-in tool spend for this execution, as a decimal string. `null` means unknown, not zero: rows written before per-run cost was split into model and tool portions carry no tool figure. A run that genuinely used no billable tool records `"0"`. Sum with `modelCost` for the run total, and treat `null` as unknown rather than zero.
- `totalTokens` (integer, required, nullable)
- `estimatedCost` (string, required, nullable, deprecated) — Deprecated alias for `modelCost`; identical value.

## Examples

**Response**

```json
{
  "dailyExecutions": [
    {
      "date": "string",
      "failedExecutions": 1.1,
      "flowsFailure": 1.1,
      "flowsSuccess": 1.1,
      "promptsFailure": 1.1,
      "promptsSuccess": 1.1,
      "successfulExecutions": 1.1,
      "totalExecutions": 1.1
    }
  ],
  "period": {
    "days": 1,
    "endDate": "string",
    "startDate": "string"
  },
  "summary": {
    "failedExecutions": 1,
    "flowExecutions": 1,
    "promptExecutions": 1,
    "successRate": 1.1,
    "successfulExecutions": 1,
    "totalExecutions": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/analytics/record-results"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/analytics/record-results';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.runtype.com/v1/analytics/record-results"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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.runtype.com/v1/analytics/record-results")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.runtype.com/v1/analytics/record-results")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.runtype.com/v1/analytics/record-results', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/analytics/record-results");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/analytics/record-results")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```