Skip to content
UGC.runUGC.rundocs

API reference

Filtering & analytics

Find and aggregate exactly the records you need.

Filter, select and paginate

Lists support search, fields, filters, sort, direction, limit (1–200, default 50), and cursor. Encode fields and filters as JSON arrays in REST query parameters. MCP accepts native arrays.

Filters combine with AND. Operators: eq, ne, gt, gte, lt, lte, in, contains, is_null. contains applies only to documented searchable text fields; is_null requires a boolean. Read GET /api/v1/query-schema for allowed fields and numeric/date types.

Pagination uses a stable sort with an ID tie-breaker. Nulls sort last. Treat cursors as opaque and reuse them only with the same query. Underlying records can change between pages.

Aggregate without SQL

Send this body to POST /api/v1/projects/{project_id}/query. Supported aggregates are count, sum, avg, min, max, and count_distinct. Group by supported creator/platform/state fields and optionally day, week or month.

from is inclusive and until is exclusive. Grouped dates use your project's time zone. Post metrics are current lifetime counts for matching posts, not views gained that day. Use charts.get for dashboard view, spend, proceeds, and profit calculations.

json
{
  "dataset": "posts",
  "filters": [
    {
      "field": "disqualified",
      "op": "eq",
      "value": false
    }
  ],
  "metrics": [
    {
      "aggregate": "count",
      "name": "posts"
    },
    {
      "aggregate": "sum",
      "field": "views",
      "name": "views"
    }
  ],
  "groupBy": [
    "platform"
  ],
  "dateField": "published_at",
  "interval": "day",
  "from": "2026-09-01T00:00:00-07:00",
  "until": "2026-10-01T00:00:00-07:00"
}