---
title: "List Files in Source"
method: GET
path: "/knowledge/{knowledge_id}/sources/{source_id}/files"
tags: ["Knowledge"]
---

# List Files in Source

`GET /knowledge/{knowledge_id}/sources/{source_id}/files`

List available files and folders in a specific content source. Supports pagination and folder navigation.

## Path parameters

- `knowledge_id` string, required — ID of the knowledge base
- `source_id` string, required — ID of the content source

## Query parameters

- `prefix` string, nullable — Path prefix to filter files
- `limit` integer — Number of files per page
- `page` integer — Page number (1-indexed)
- `delimiter` string — Folder delimiter (enables folder grouping)
- `db_id` string, nullable — The ID of the database to use

## Response `200`

Files listed successfully

- SourceFilesResponseSchema — Response schema for listing files in a content source.
  - `source_id` string, required — ID of the content source
  - `source_name` string, required — Name of the content source
  - `prefix` string, nullable — Prefix filter that was applied
  - `folders` SourceFolderSchema[] — Subfolders at this level
    - `prefix` string, required — Full prefix to use for navigating into this folder
    - `name` string, required — Display name of the folder
    - `is_empty` boolean — Whether the folder contains any files
  - `files` SourceFileSchema[] — List of files at this level
    - `key` string, required — Full path/key of the file
    - `name` string, required — Display name (filename)
    - `size` integer, nullable — File size in bytes
    - `last_modified` string, date-time, nullable — ISO 8601 timestamp of last modification
    - `content_type` string, nullable — MIME type of the file
  - `meta` PaginationInfo, required
    - `page` integer — Current page number (0-indexed)
    - `limit` integer — Number of items per page
    - `total_pages` integer — Total number of pages
    - `total_count` integer — Total count of items
    - `search_time_ms` number — Search execution time in milliseconds

## Other responses

- `400` — Unsupported source type
- `401` — Unauthorized
- `404` — Knowledge base or content source not found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.net/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agno/agno-api-reference/versions/5f6149d395d0/schema)
