textrawl
byJeff Green

list_documents

Browse documents with pagination and filtering

Browse all documents in your knowledge base with pagination and filtering options.

Parameters

ParameterTypeRequiredDefaultDescription
limitnumberNo20Results per page (1-100)
offsetnumberNo0Skip this many results
sourceTypeenumNo-Filter by: note, file, url
tagsstring[]No-Filter by tags (AND logic)
orderByenumNoupdatedAtSort by: createdAt, updatedAt, title
orderenumNodescSort order: asc, desc

Example Request

{
  "limit": 10,
  "offset": 0,
  "sourceType": "note",
  "tags": ["work"],
  "orderBy": "updatedAt",
  "order": "desc"
}

Response

{
  "documents": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Q4 Planning Notes",
      "sourceType": "note",
      "tags": ["work", "planning"],
      "createdAt": "2024-10-15T14:30:00Z",
      "updatedAt": "2024-10-15T14:30:00Z"
    }
  ],
  "total": 42,
  "limit": 10,
  "offset": 0,
  "hasMore": true
}

Pagination

Use limit and offset for pagination:

Page 1: limit=10, offset=0
Page 2: limit=10, offset=10
Page 3: limit=10, offset=20

Filtering Examples

By Source Type

{ "sourceType": "file" }

Returns only uploaded files.

By Multiple Tags

{ "tags": ["work", "q4"] }

Returns documents with BOTH tags.

Combined Filters

{
  "sourceType": "note",
  "tags": ["important"],
  "orderBy": "createdAt",
  "order": "asc"
}

On this page