Synchronize Data Changes

The Change Feed is an incremental API for external customer applications. Applications poll GET /v1/changes, process a complete page, persist next_cursor, and use Read Content & History to retrieve content or metric details.

Delivery is pull-only. MarsYoo does not push new data to customer applications through webhooks, message-queue callbacks, or another server-initiated delivery mechanism.

Current events

Event typeTriggerFollow-up read
document.createdA canonical document is created for the first timeDocument details or batch-get
document.version.createdTitle, body, or other versioned content changesContent by version_id
document.metrics.updatedA metric snapshot changesDocument snapshots

Deletion, takedown, and unavailability events are not currently reliable customer data sources. They will be enabled only when platform collectors provide reliable recheck signals.

Initial read

Every request requires a Consumer API Key:

Bash
export MARSYOO_BASE_URL='https://www.marsyoo.com'
export MARSYOO_API_KEY='whale_consumer_xxx'
 
curl --get "$MARSYOO_BASE_URL/v1/changes" \
  --header "Authorization: Bearer $MARSYOO_API_KEY" \
  --data-urlencode "event_type=document.created,document.version.created,document.metrics.updated" \
  --data-urlencode "limit=100"

Omit cursor for the first read. The feed starts at the earliest authorized event in the online retention window.

ParameterMeaning
cursorOpaque cursor from the previous page; omit on the first read
limit1–200 events per page; defaults to 100
event_typeComma-separated event types
source_platformComma-separated platform enums
ingested_from / ingested_toRFC 3339 ingest-time boundaries

The API returns only platforms allowed by the application’s entitlements. Filters cannot expand the authorized scope.

Retrieve details using the returned document_id, and include version_id when you need the content version associated with that event.

Response and content retrieval

JSON
{
  "items": [
    {
      "sequence": 42,
      "event_id": "chg_xxx",
      "schema_version": 1,
      "event_type": "document.version.created",
      "dataset_id": "social_media_raw",
      "source_platform": "reddit",
      "document_id": "doc_xxx",
      "version_id": "ver_xxx",
      "changed_fields": ["title", "body", "metadata"],
      "occurred_at": "2026-10-09T11:55:00Z",
      "observed_at": "2026-10-09T12:00:00Z",
      "ingested_at": "2026-10-09T12:00:02Z"
    }
  ],
  "next_cursor": "opaque-cursor"
}

Events contain resource IDs and changed field names, never complete document bodies. Collect the document_id values from a page and call:

HTTP
POST /v1/documents/batch-get

To load the historical body referenced by a version event, call:

HTTP
GET /v1/documents/{document_id}/content?version_id={version_id}

Cursor and checkpoint rules

Use this processing order:

  1. Request a page with the current cursor.
  2. Process every item on the page idempotently.
  3. Persist next_cursor only after business processing succeeds.
  4. Use the saved cursor to request the next page.

Do not save the cursor before the full page succeeds, or a process failure may skip events. Reusing the same cursor returns a stable page.

Delivery and latency

  • At least once: every event is returned at least once. Rarely (when a server-side write is retried) the same event appears twice, with different sequence values and the same event_id. Deduplicate by event_id, or process idempotently by business resource ID.
  • Order: events on one cursor chain come in increasing sequence. Gaps in sequence are normal and do not mean events are missing.
  • Latency: new events become readable about 2–3 minutes after they are stored.

A cursor is bound to the Consumer application and the complete filter set. Do not reuse it with another application or after changing event, platform, or time filters.

Error handling

HTTPMeaningRecommended action
400Invalid parameters or cursor, or cursor/filter mismatchCorrect the request; do not retry automatically
401Missing, invalid, or revoked API KeyUse an active key
403The application lacks access to the requested scopeCheck subscriptions and entitlements
410The cursor is older than the online replay windowRebuild the checkpoint or restore from historical data
429Rate, concurrency, or quota limitBack off according to Retry-After
503Change Feed temporarily unavailableRetry a limited number of times with exponential backoff

Events are currently retained online for 30 days. Applications that stop consuming for extended periods should monitor checkpoint age.

Events before 2026-11-03 00:00 UTC are no longer available: older cursors get 410, a first read starts at that time, and the full 30-day window is back on 2026-12-03. On 410, read again without a cursor and use Bulk Data Exports to fetch the missing period by ingest time.

SDK

Use the publicly downloadable Python and Go Query SDKs, or call the REST API directly. In either case, the application must persist its own checkpoint and save next_cursor only after the whole page succeeds. REST and the public OpenAPI contract remain the authoritative definition of request fields and response schemas.

See the Public API Reference for the complete request and schemas.