> ## Documentation Index
> Fetch the complete documentation index at: https://docs.empirical.run/llms.txt
> Use this file to discover all available pages before exploring further.

# List test run artifacts

> Lists downloadable artifacts (traces, reports, screenshots, etc.) stored for a test run. Provide `key` for an exact lookup, or `prefix`/`suffix` to filter the listing. Returns an empty list when nothing matches.



## OpenAPI

````yaml /api-reference/openapi.generated.json get /api/test-runs/{id}/artifacts
openapi: 3.1.0
info:
  title: Empirical API
  version: 1.0.0
  description: Programmatic access to Empirical test runs, snoozes, and more.
  contact:
    name: Empirical
    url: https://empirical.run
servers:
  - url: https://api.empirical.run
security:
  - Bearer: []
tags:
  - name: Test Runs
    description: Trigger, list, and inspect end-to-end test runs.
  - name: Test Cases
    description: >-
      Browse the Playwright test cases synced from a project's repository and
      manage their tags.
  - name: Environments
    description: >-
      Named deployment targets (slug + Playwright project filters) a project's
      tests run against.
  - name: Snoozes
    description: Temporarily suppress known test failures for specific Playwright tests.
  - name: Analytics
    description: Aggregated test-run, test-count and test-case analytics for a project.
  - name: Resources
    description: >-
      Project file resources — uploads stored in R2 and external link-type files
      (e.g. Google Sheets).
  - name: Badges
    description: Public README status badge images (SVG) for project environments.
paths:
  /api/test-runs/{id}/artifacts:
    get:
      tags:
        - Test Runs
      summary: List test run artifacts
      description: >-
        Lists downloadable artifacts (traces, reports, screenshots, etc.) stored
        for a test run. Provide `key` for an exact lookup, or `prefix`/`suffix`
        to filter the listing. Returns an empty list when nothing matches.
      operationId: listTestRunArtifacts
      parameters:
        - schema:
            type: integer
            minimum: 1
            description: Test run database ID.
          required: true
          description: Test run database ID.
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Exact artifact path (relative to the run) to look up via a single
              HEAD request. Takes precedence over `prefix`/`suffix`.
          required: false
          description: >-
            Exact artifact path (relative to the run) to look up via a single
            HEAD request. Takes precedence over `prefix`/`suffix`.
          name: key
          in: query
        - schema:
            type: string
            description: Restrict the listing to artifacts whose path starts with this.
          required: false
          description: Restrict the listing to artifacts whose path starts with this.
          name: prefix
          in: query
        - schema:
            type: string
            description: Restrict the listing to artifacts whose path ends with this.
          required: false
          description: Restrict the listing to artifacts whose path ends with this.
          name: suffix
          in: query
      responses:
        '200':
          description: The matching artifacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListArtifactsResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Test run not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ListArtifactsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            artifacts:
              type: array
              items:
                $ref: '#/components/schemas/Artifact'
          required:
            - artifacts
      required:
        - data
    ErrorResponse:
      type: object
      properties:
        data:
          nullable: true
          description: Always null for error responses.
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error message.
          required:
            - message
          description: Error details.
      required:
        - data
        - error
    Artifact:
      type: object
      properties:
        key:
          type: string
          description: Artifact path relative to the test run.
        url:
          type: string
          description: HTTP URL to download the artifact.
        size:
          type: number
          description: File size in bytes.
        last_modified:
          type: string
          description: ISO 8601 timestamp of when the artifact was last modified.
      required:
        - key
        - url
        - size
        - last_modified
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````