---
title: "List all scripts"
method: GET
path: "/api/scripts"
---

# List all scripts

`GET /api/scripts`

## Request

- Base URL: `https://reduck.ai`
- URL: `https://reduck.ai/api/scripts`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

List all scripts. Authenticated callers get a cross-owner list across their own scripts, member projects, and the official catalogue. Anonymous callers get the official catalogue only.

## Query parameters

- `page` integer
- `pageSize` integer
- `host` string
- `q` string
- `visibility` 'private' | 'public'
- `archived` 'true' | 'false': Filter on archived state: `true` for archived only, `false` for active only. Omit it and only active scripts come back.
- `catalogueOnly` 'true' | 'false': Restrict the list to the official catalogue.
- `sortBy` 'relevance' | 'featured' | 'name' | 'host' | 'runs' | 'successRate' | 'avgTime' | 'lastRunAt' | 'createdAt' | 'updatedAt': How to order the results. `relevance` needs a `q` search term and is the default with one; without `q` there is nothing to be relevant to and the default order is used instead.
- `order` 'asc' | 'desc'

## Response `200`

OK

- PaginatedResponseScriptSummary
  - `data` ScriptSummary[], required
    - `id` string, required
    - `name` string, required
    - `slug` string, required
    - `host` string, required
    - `description` string, required
    - `visibility` 'private' | 'public', required
    - `current_version_id` string, nullable, required
    - `archived_at` string, nullable, required
    - `created_at` string, required
    - `updated_at` string, required
    - `author` ScriptAuthor, required
      - `kind` 'user' | 'project', required
      - `handle` string, required
      - `name` string, required
      - `approval` 'official' | 'trusted' | 'unverified', required
    - `execution_count` number, required
    - `last_run_at` string, nullable, required
    - `success_rate` number, nullable, required
    - `avg_time_ms` number, nullable, required
    - `version_count` number, required
    - `human_required` boolean, required
    - `current_version` ScriptVersionSummary, required
      - `id` string, required
      - `script_id` string, required
      - `version_number` number, required
      - `parent_version_id` string, nullable, required
      - `language` string, required
      - `logged_in` boolean, required
      - `side_effects` 'none' | 'undetermined' | 'write', required
      - `draft` boolean, required
      - `note` string, nullable: Why this version exists. Omitted on an official script unless you belong to the project that owns it, and never carried by the version a script listing embeds.
      - `created_by` object, nullable, required: Who saved this version. Distinct from the script's `author`, which is the OWNER (a user or a project): a project's script is edited by its members one at a time, and this names the one. Null when that account has since been deleted.
        - `handle` string, required
        - `name` string, required
      - `created_at` string, required
      - `execution_count` number, required
      - `last_run_at` string, nullable, required
      - `success_rate` number, nullable, required
      - `avg_time_ms` number, nullable, required
  - `hasNextPage` boolean, required
  - `totalCount` number

## Other responses

- `401`: Not authenticated
- `403`: Forbidden

---

[API](https://skmtc.dev/reduck/apis/reduck-api.md) · [All operations](https://skmtc.dev/reduck/apis/reduck-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reduck/apis/reduck-api/revisions/a573b91206d6?raw)
