POST
/
v3
/
documents
/
list
List documents
const url = 'https://api.supermemory.ai/v3/documents/list';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"filters":"{\"AND\":[{\"key\":\"group\",\"negate\":false,\"value\":\"jira_users\"},{\"filterType\":\"numeric\",\"key\":\"timestamp\",\"negate\":false,\"numericOperator\":\">\",\"value\":\"1742745777\"}]}","limit":10,"order":"desc","page":1,"sort":"createdAt"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "memories": [
    {
      "connectionId": "conn_123",
      "containerTags": [
        "user_123",
        "project_123"
      ],
      "createdAt": "1970-01-01T00:00:00.000Z",
      "customId": "mem_abc123",
      "id": "acxV5LHMEsG2hMSNb4umbn",
      "metadata": {
        "category": "technology",
        "isPublic": true,
        "readingTime": 5,
        "source": "web",
        "tag_1": "ai",
        "tag_2": "machine-learning"
      },
      "status": "done",
      "summary": "A comprehensive guide to understanding the basics of machine learning and its applications.",
      "title": "Introduction to Machine Learning",
      "type": "text",
      "updatedAt": "1970-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "limit": 10,
    "totalItems": 100,
    "totalPages": 10
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Query parameters for listing documents

containerTags
string[]

Optional tags this document should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to group documents.

Example:
["user_123", "project_123"]
filters
string

Optional filters to apply to the search

Example:

"{\"AND\":[{\"key\":\"group\",\"negate\":false,\"value\":\"jira_users\"},{\"filterType\":\"numeric\",\"key\":\"timestamp\",\"negate\":false,\"numericOperator\":\">\",\"value\":\"1742745777\"}]}"

includeContent
boolean
default:false

Whether to include the content field in the response. Warning: This can make responses significantly larger.

Example:

false

limit
default:10

Number of items per page

Example:

"10"

order
enum<string>
default:desc

Sort order

Available options:
asc,
desc
Example:

"desc"

page
default:1

Page number to fetch

Example:

"1"

sort
enum<string>
default:createdAt

Field to sort by

Available options:
createdAt,
updatedAt
Example:

"createdAt"

Response

Successfully retrieved documents

List of documents

memories
object[]
required
pagination
object
required

Pagination metadata

Example:
{
"currentPage": 1,
"limit": 10,
"totalItems": 100,
"totalPages": 10
}