---
title: "Aggregate documents in a collection"
method: POST
path: "/database/collections/{collection}/aggregate"
tags: ["Database"]
---

# Aggregate documents in a collection

`POST /database/collections/{collection}/aggregate`

Perform aggregation operations on a collection

## Path parameters

- `collection` string, required

## Request body

- object[]

## Response `200`

Aggregation result

- Success
  - `code` integer
  - `message` string
  - `data` object

## Changes

- **2025-03-02** `526e5bdf6dee` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/crawlab-team/apis/crawlab-api/changes/database/collections/:collection/aggregate/post.md)

---

[API](https://skmtc.dev/crawlab-team/apis/crawlab-api.md) · [All operations](https://skmtc.dev/crawlab-team/apis/crawlab-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crawlab-team/crawlab-api/revisions/526e5bdf6dee/schema)
