Skip to content

Collector and Recommendations API

Last updatedView as Markdown

Introduction

This guide is the endpoint-level reference for the Arc XP Compass Collector API and Recommendations API. For how Compass turns your catalog and reader events into recommendations, see How Compass works.

APIPurposeBase Path
Collector APISend user behavior events and content updates/collector/v1
Recommendations APIRetrieve personalized content recommendations/experiences/recommend/v1

Base URL

Both APIs are served from:

https://{org}-config-prod.api.arc-cdn.net/

Replace {org} with your organization identifier; the config and prod segments are fixed. The path prefix selects the backend — /collector/v1 for the Collector API and /experiences/recommend/v1 for the Recommendations API — appended to this host.

How it works

Your CMS keeps the content catalog in sync, your sites or CDP send behavioral events, and your applications read ranked recommendations for each reader. For the full data loop and serving pipeline, see How Compass works; to choose between the Compass Web SDK, direct Collector API sends, and CDP forwarding, see Choose your integration path.

Authentication and tokens

Every Content Recommendations API is headless and authenticates with a Headless API token passed in the X-API-Key request header on every request:

X-API-Key: <your-token>

Headless API tokens are separate from Developer Center tokens. Both the Collector API and Recommendations API require a Headless API token passed in the X-API-Key header. This section is the reference for which token each surface needs. To provision, verify, store, and remove tokens, see Provision and Manage Compass API Keys.

One token per API surface

Provision a separate token for each API you use, each assigned to its own key collection:

Key collectionAuthenticatesUsed byWhere it may live
experiencesGET /experiences/* (read-only: recommendations, popular, trending, catch-up)Your front-end, the recommendations block, email senders, and the Compass Web SDK’s Experience readsBrowser-safe. It can only read, so it may ship in page JavaScript.
collectorPOST /collector/v1/* (events and content writes)Your CMS webhook, CDP/server-side forwarders, bulk loads (Arc XP CMS customers don’t need one for content: the platform-managed arc_xp_compass integration syncs their catalog)Server-side only. It writes to your catalog and training data — it must never appear in a browser bundle.
collect-web (browser events)POST /collect-web/v1/events/batchThe Compass Web SDKBrowser-safe. It posts browser events but cannot reach the content catalog.

Assigning each token to its own key collection means a token exposed in one context cannot be used against another API. The experiences and collect-web keys are public by design (anyone can read them out of your page source), and their collections limit the blast radius of that exposure to read-only recommendations or event submission. The collector key has no such containment — treat it like any other server-side secret.

Provisioning, verifying, and handling tokens

Tokens are provisioned through the Delivery API. For the provisioning flow and limits, how to verify that a token is accepted, and the rules for storing, rotating, and removing tokens, see Provision and Manage Compass API Keys.

Critical requirements

These rules are non-negotiable. Violating them will either corrupt your recommendation model, leak sensitive data, or silently produce bad results. For why the model and its single instance make these rules necessary, see How Compass works.

  • Never send PII as the user identifier. user_id must be an anonymized, stable token — hash or pseudonymize before sending, because Arc XP does not sanitize user IDs on ingestion. See the User ID Guidance for the full rules.

  • Keep the content catalog in sync. Only send published content via the Content endpoint, and send an action: "delete" payload the moment an item is unpublished or deleted in your CMS. Stale content in the model leads to recommendations pointing at dead pages.

  • Use the same identifier for content and events. The item_id on every content item and the item_id on every interaction event must refer to the same, stable identifier — if they don’t match, the event cannot contribute to recommendations. See the Item ID Guidance for the full rules on stability, formatting, republish, and takedowns.

  • Do not send synthetic or test traffic against real site_id values. Load tests, QA scripts, and bot traffic poison the training signal and degrade recommendation quality for real users. Scope any test activity to a dedicated, non-production site_id.

  • Exclude internal employee traffic. Events from your own staff — editors QA-ing articles, newsroom staff browsing stories, engineers exercising the site — skew the behavioral signal away from real reader interests and degrade recommendation quality. Filter employee sessions out before sending to the Events endpoint.

  • Exclude bot and crawler traffic. Search crawlers, scrapers, and other automated agents do not represent real reader interest, and their access patterns (exhaustive crawls, repeated hits, no engagement depth) distort the training signal. Filter known bots out before sending to the Events endpoint.

  • There is no separate Sandbox or Production instance for Compass — you get a single instance. Anything you send is training the one model that serves your live traffic. Plan your testing, seeding, and rollout accordingly, and use a dedicated test site_id to keep experimental data out of your production catalog.

  • Handle Headless API tokens carefully. Never commit them to source control, and keep each API’s token in its own key collection — see Authentication and tokens for the handling rules.

Quick Start (5 minutes)

The shortest path from zero to your first recommendation:

  1. Provision Headless API tokens — one for the Collector API and one for the Recommendations API, following Authentication and tokens. Pass the appropriate token in the X-API-Key header on each request in these steps.

  2. Send content — POST /collector/v1/content with an action: "publish" payload for each item in your catalog. This seeds the model with what’s available to recommend.

    POST /collector/v1/content
    { "action": "publish", "item_id": "ARTICLE-001", "site_id": "my-site", "type": "article", "timestamp": "...", "title": "..." }
  3. Send events — POST /collector/v1/events as users interact with that content. At least a few events per user are needed before personalization kicks in.

    POST /collector/v1/events
    { "user_id": "user-1", "item_id": "ARTICLE-001", "event_type": "page_view", "timestamp": "..." }

    On a website, the Compass Web SDK captures and posts these events for you — you paste a snippet instead of hand-rolling this request. The raw POST shown here is what a server-side or CDP forwarder sends; it’s also the contract the SDK implements under the hood.

  4. Fetch recommendations — GET /experiences/recommend/v1/recommendations?site_id=my-site&user_id=user-1 returns a ranked list of recommendations, each with a display-ready card ready to render.

After this loop is in place, the remaining sections of this guide cover the full field reference and supported event types.

Collector API

Base path: /collector/v1

The Collector API accepts user behavior events and content lifecycle updates. Both are processed asynchronously: the API responds with 202 Accepted and processes the data in the background.

EndpointAccepts
POST /collector/v1/eventsOne user behavior event. See Events endpoint.
POST /collector/v1/events/batch1 to 100 user behavior events. See Batch ingestion.
POST /collector/v1/contentOne content publish, update, or delete. See Content endpoint.

Every request must include a Headless API token from the collector key collection in the X-API-Key header. The Collector API does not check whether your organization is active, so it accepts events and content during onboarding. For every status code the Collector API returns, see Status and error codes.

Every identifier field (user_id, item_id, site_id, session_id, event_id, and the identifiers inside attribution_context) is a string of 1 to 256 characters. A longer or empty value is rejected with a 422.

Events endpoint

Send user interaction events to train the recommendation model. The more behavioral data you send, the better the recommendations become.

Endpoint: POST /collector/v1/events

Response: 202 Accepted (no body)

{
"user_id": "abc-123",
"item_id": "ZSGXFR2KNFCMPN3VHPWQR3BGCE",
"event_type": "page_view",
"timestamp": "2026-03-27T14:30:00+00:00",
"session_id": null
}

A single event larger than 1 MiB (1,048,576 bytes) after serialization is rejected with a 422.

Fields

FieldTypeRequiredDescription
user_idstringYesAnonymized identifier of the user who triggered the event. Can be an authenticated user ID or an ephemeral session ID for anonymous users, but it must be anonymized before sending to Arc XP.
item_idstringYesThe content item the user interacted with. Must match an item_id previously sent via the content endpoint.
event_typestringYesThe type of interaction. See Supported Event Types.
timestampstring (ISO 8601)YesWhen the interaction occurred. Must include timezone information (e.g., +00:00 or Z).
session_idstringNoSession identifier for grouping interactions within a single user visit.
site_idstringNoThe site the event came from, for organizations with more than one site. Omit it for a single-site organization or when your source cannot tell.
attribution_contextobjectNoOn recommendation exposure and click events: the response’s exposure_id and the item’s attribution_id, echoed verbatim so analytics can credit the recommendation. See Attribution context fields and Recommendation Attribution.
event_valuenumberDepends on event_typeMagnitude of the interaction, as a finite ratio from 0.0 to 1.0 inclusive. Whether it is required, optional, or rejected depends on event_type — see Supported Event Types. A value outside that range is rejected with a 422.
event_idstringNoDe-duplication key. If omitted, the Collector derives it deterministically from the event’s natural identity (user_id, item_id, event_type, timestamp, session_id, and any attribution ID). Omit it unless your source emits its own stable per-event ID.
schema_versionintegerNoLeave unset. Any value other than 1 is rejected by design.

Attribution context fields

Every field of attribution_context is optional. Copy each value verbatim from the recommendation response.

FieldTypeDescription
exposure_idstringThe response’s attribution.exposure_id. Identical on every event from one rendered set.
attribution_idstringThe item’s attribution_id.
surface_idstringThe surface the set was rendered on.
positionintegerThe item’s zero-based position, from 0 to 10000.
issued_atstring (ISO 8601)The response’s attribution.issued_at. Must include timezone information.
sourcestringAttribution origin, 1 to 64 lowercase letters, digits, _, or -. Defaults to fy. Only fy attribution counts toward Confirmed CTR.

Supported Event Types

These are the event types to send from your CDP, your server-side integration, or the Compass Web SDK. An event_type the Collector does not recognize is rejected with a 422.

The event_value column says what each type does with the event_value field:

ValueMeaning
RequiredThe Collector rejects the event with a 422 if you omit event_value.
OptionalSend event_value when you have it. The Collector accepts the event either way.
RejectedThe Collector rejects the event with a 422 if you send event_value.
Not usedThe event carries no magnitude. The Collector accepts a value here, but nothing reads it, so leave the field off.
Event Typeevent_valueDescription
page_viewNot usedUser viewed a content detail page, such as an article page.
clickNot usedUser clicked on a content link, including from recommendations modules.
shareNot usedUser shared content, such as clicked on share on Facebook.
searchNot usedUser performed an on-site search. Requires topic or keyword extraction to be relevant.
article_saveRejectedUser saved the article to read later, such as via bookmarking. A save is binary, so the Collector rejects an article_save that carries an event_value.
deepest_scrollRequiredThe deepest point the user reached in a piece of content, sent as event_value from 0.0 to 1.0. A deepest_scroll without one records nothing, so the Collector rejects it. Send a single observation per content item per session, reporting the deepest point reached in that session rather than one event per scroll milestone.
engaged_readOptionalAn organization-defined metric representing a reader consuming, being highly engaged with a piece of content, such as leaving a comment or spending a long time on the page. Your organization defines what counts. If your measure produces a 0.0–1.0 ratio, send it as event_value; Arc XP records it as sent and does not normalize it against other organizations.
video_startNot usedVideo playback began.
video_progressOptionalVideo playback reached a checkpoint. Send the fraction of the video watched so far as event_value, from 0.0 to 1.0. event_value is the only field recording how much the reader watched, so send it whenever your player reports it. The Collector accepts the event without one.
video_completeNot usedVideo playback reached the end.

A page view carries only the required fields:

{
"user_id": "u_314",
"item_id": "a_202",
"event_type": "page_view",
"timestamp": "2026-04-08T10:15:00Z"
}

A deepest scroll carries the depth in event_value:

{
"user_id": "u_314",
"item_id": "a_202",
"event_type": "deepest_scroll",
"event_value": 0.82,
"timestamp": "2026-04-08T10:17:30Z",
"session_id": "sess-a1b2c3"
}

Batch ingestion

For high-volume or backfill scenarios, send multiple events in a single request via POST /collector/v1/events/batch. The request body is a JSON array of the same event envelope the Events endpoint takes, with 1 to 100 events per request, and the response is the same 202 Accepted with an empty body. An empty array, or more than 100 events, is rejected with a 422. So is a batch whose serialized events total more than 5 MiB, or that contains a single event larger than 1 MiB. For the generated schema, see the Compass API reference.

Batches are all-or-nothing: if any record fails to commit, the whole batch fails, so retry the entire batch rather than individual records. The 202 reflects the asynchronous pipeline — events are durably committed before the response returns, but not yet processed end to end. Schema errors surface as 422 at the API layer; semantic errors (such as an unknown item_id) surface downstream via metrics and operational tooling.

StatusWhenCaller action
202Batch was durably accepted.None.
422Body failed validation (bad enum, naive datetime, missing field, empty or oversized batch).Inspect the error pointer, fix the envelope, do not retry as-is.
500Transient server-side failure committing the batch.Retry the whole batch with exponential backoff. Surface to monitoring.

For 401, 429, and other statuses, see Status and error codes.

Sizing guidance:

  • Flush on volume and time. A common pattern: flush when the in-memory queue hits 50 events or 1 second has elapsed since the last flush, whichever comes first. This keeps real-time recommendations fresh during low-traffic periods.
  • Backfills should pace themselves. When replaying historical logs, throttle to your tenant’s provisioned ingest throughput.

Batch is for user-behavior events only. For content / item catalog updates, use POST /collector/v1/content (see the Content endpoint).

Example — batching from a JavaScript client:

const events = [
{
user_id: "abc-123",
item_id: "ZSGXFR2KNFCMPN3VHPWQR3BGCE",
event_type: "page_view",
timestamp: "2026-03-27T14:30:00+00:00",
session_id: "sess-a1b2c3",
},
// ... up to 100 envelopes
];
const res = await fetch("https://{org}-config-prod.api.arc-cdn.net/collector/v1/events/batch", {
method: "POST",
headers: {
"content-type": "application/json",
"X-API-Key": "<collector-key>",
},
body: JSON.stringify(events),
});
if (res.status === 202) {
// Durably accepted. Done.
} else if (res.status === 422) {
// Schema bug in the producer; do NOT retry as-is.
console.error(await res.json());
} else if (res.status >= 500) {
// Transient. Retry the whole batch with backoff.
}

Content endpoint

Keep your content catalog in sync with Compass. Content is sent as webhook payloads from your CMS whenever an item is published, updated, or deleted.

Endpoint: POST /collector/v1/content

Response: 202 Accepted (no body). A 202 means the write was accepted, not that it has been applied: the catalog and recommendations can lag the response. A 5xx means the write was not accepted; retry it.

The request body uses a discriminated union on the action field — either "publish" (create or update) or "delete".

Publishing or Updating Content

Send this payload when a content item is first published or when it is updated.

{
"action": "publish",
"item_id": "a_202",
"site_id": "acme",
"type": "article",
"timestamp": "2026-04-08T09:00:00Z",
"title": "Breaking: Major Policy Change Announced",
"body": "Congress passed sweeping legislation today that... (full article prose)",
"categories": ["Politics", "Government"],
"tags": ["policy", "congress", "legislation"],
"author": "Jane Reporter",
"url": "https://acme.example.com/2026/04/08/major-policy-change/",
"thumbnail_url": "https://acme.example.com/images/major-policy-change.jpg",
"is_premium": false,
"metadata": {}
}
Fields
FieldTypeRequiredDescription
action"publish"YesDiscriminator indicating a create/update operation.
item_idstringYesUnique identifier for this content item, typically from your CMS.
site_idstringYesIdentifies which website or property this content belongs to. Used to partition recommendations by site.
typestringYesContent type: "article", "video", or "podcast". Any other value is rejected with a 422.
timestampstring (ISO 8601)YesPublication date. Must include timezone.
titlestringYesDisplay title of the content, 1 to 512 characters.
bodystringNoFull readable article prose, for type: "article". Embedded and read by a language model — send clean text only. See Body and transcript text.
transcriptstringNoFull spoken-word text, for type: "video" and type: "podcast". Used in place of body. See Body and transcript text.
categorieslist of stringsNoHigh-level taxonomy labels (e.g., "Politics", "Sports"). Up to 50 labels of 1 to 128 characters each. Defaults to empty list.
tagslist of stringsNoDetailed keywords for the content. Up to 100 keywords of 1 to 128 characters each. Defaults to empty list.
authorstringNoContent creator name, up to 256 characters.
urlstringNoCanonical URL of the content, used as the card’s link target. May also be supplied as metadata.url.
thumbnail_urlstringNoURL of the content’s source image. Arc XP generates a feed-card-sized derivative from it at ingest and serves that on the card, falling back to this URL when a derivative isn’t available. May also be supplied as metadata.thumbnail_url. See Card images.
is_premiumbooleanNoWhether this content is behind a paywall. Defaults to false. Used for subscription-tier filtering in recommendations: a request with the default subscription_tier=free never returns premium items.
revisionstring (ISO 8601)NoOrdering key for the source revision, such as your CMS’s last-updated time. Must include timezone. When set, a write whose revision is not newer than the stored one is dropped, so a late or redelivered update cannot overwrite a newer one. Omit it and every write applies.
arcobjectNoArc XP-only fields that the Arc XP content integration sets. Omit it for content from any other CMS.
metadataobjectNoFlexible key-value pairs for tenant-specific fields. Defaults to empty object.
Body & transcript text

The full text you send is embedded and read by a language model. That text drives two things the recommendation engine depends on: the embedding vector used to find semantically related content, and the claim extraction that powers material-development detection. Because the text is consumed by a model rather than a human, its semantic cleanliness matters. Anything that is not the article’s actual prose dilutes the embedding vector and injects noise into claim extraction.

✅ What SHOULD go in body

  • The full, readable article text — headline-adjacent, the same prose a human reader sees in the article body.
  • Plain text. Paragraphs separated by newlines are fine.
  • The complete article, not a summary or excerpt. Claim extraction and material-development detection depend on having the whole story; truncated bodies produce coarse, incomplete claims.
  • Pull quotes, subheadings, and body captions that are genuinely part of the editorial narrative.

❌ What should NOT go in body

  • HTML or other markup. Do not send <p>, <div>, <figure>, escaped entities, or Markdown scaffolding. Extract the text content first. Tags are noise to the embedder and the LLM, and they burn your byte budget.
  • Navigation and site chrome — menus, breadcrumbs, “Sections,” “Sign in,” footers, cookie banners.
  • Advertising and promotional inserts — ad slot markup, “Sponsored,” newsletter sign-up boxes, “Read more” link lists, “Related articles” rails.
  • Boilerplate repeated across every article — standing bylines/credits blocks, syndication notices, legal/copyright footers, “This article was updated…” stock disclaimers.
  • Comments, social embeds, and share widgets.
  • Metadata that already has its own field — do not stuff the title, author, URL, tags, categories, or thumbnail into body. Those fields are ingested separately; duplicating them into body skews the embedding.
  • Transcripts, captions, or subtitle text. Those belong in transcript on a video/podcast item, not in body.
Modality: body vs. transcript

The text field is chosen by type, and the API enforces it:

typeText fieldSending the other field
"article"bodytranscript → 422
"video"transcriptbody → 422
"podcast"transcriptbody → 422

Sending body on a video, or transcript on an article, is rejected with a 422 — this is a guardrail against mis-mapped payloads, not a soft warning.

Size limit

body (and transcript) may be at most 1 MiB — 1,048,576 bytes — measured on the UTF-8-encoded string, not the character count. Multi-byte characters (accents, non-Latin scripts, emoji) count as more than one byte each. Text over the limit is rejected with a 422. This ceiling is generous for normal editorial articles; hitting it is usually a sign that un-stripped markup or boilerplate is inflating the payload.

Omitting vs. clearing body

body is optional, and the two “empty” cases are distinct:

  • Omit body entirely (or send null) — the field is left untouched. On an item’s first publish that means it is ingested with its metadata but gets no embedding and no extracted claims. On a republish it means any text you sent earlier stays in place, along with its embedding, so a payload that simply doesn’t carry the prose won’t wipe it. Use this for content you haven’t migrated to send full text for yet, or where you have no body available. Omitting body is never a way to retract it.
  • Send body: "" (empty string) — this is a positive signal that the item has no text, and it clears any text and embedding previously stored for that item. Use it to retract body text you sent earlier without deleting the item.

Deleting Content

Send this payload when content should be removed from recommendations.

{
"action": "delete",
"item_id": "a_202",
"site_id": "acme"
}
Fields
FieldTypeRequiredDescription
action"delete"YesDiscriminator indicating a delete operation.
item_idstringYesThe item to remove.
site_idstringYesThe site the item belongs to.
revisionstring (ISO 8601)NoOrdering key for the source revision, as on a publish. When set, the delete records it, so a stale update that arrives after the delete cannot bring the item back. Omit it and the delete always applies.

Deletes are soft: the item is marked as deleted and excluded from future recommendations.

Recommendations API

Base path: /experiences/recommend/v1

The Recommendations API returns ranked content for a site: personalized for one reader, or site-wide for Popular and Trending.

EndpointReturns
GET /experiences/recommend/v1/recommendationsPersonalized recommendations for one reader. See Fetching Recommendations.
GET /experiences/recommend/v1/popularThe site’s most-read content. See Popular and Trending.
GET /experiences/recommend/v1/trendingThe site’s fastest-climbing content. See Popular and Trending.

Every request must include a Headless API token from the experiences key collection in the X-API-Key header. For every status code the Recommendations API returns, see Status and error codes.

Fetching Recommendations

Endpoint: GET /experiences/recommend/v1/recommendations

Query Parameters

ParameterTypeRequiredDefaultDescription
site_idstringYes—Scopes recommendations to a specific website or property. Must match site_id values used in content ingestion.
user_idstringYes—The user to personalize for. Stored as sent, so it must not carry PII. See Identifying Users for anonymous user handling.
num_resultsintegerNo5Number of recommendations to return. Range 1–50; values outside the range are rejected with a 422.
subscription_tierfree or premiumNofreeThe reader’s access level. free excludes content ingested with is_premium: true; premium makes premium and free content eligible. Any other value is rejected with a 422.
sectionstringNo—Restricts results to items whose categories include this value. Applied before ranking. See Compass API filters.
content_typestringNo—Restricts results to items of this type: article, video, or podcast. Applied before ranking.
item_idstringNo—An anchor item, such as the article the reader is on, for “more like this” placements. The anchor item is never returned in personalized results. Cold-start previews ignore it.
surface_idstringNo—Opaque label for the placement where the set is rendered. Echoed back in the response’s attribution; not interpreted. The SDK-rendered recommendation components accept the same parameter on their own /experiences/* recommendations request (the same dual-mounted handler), forwarding it from their surface-id attribute. The Catch Up card differs in what the label reaches: its own storyline request carries no surface_id, so its surface-id attribute is forwarded only on the separate “You might also be interested in” suggestions request it makes on the caught-up view. That attribute’s older name, recs-surface-id, still works there; if you set both, a non-empty surface-id wins. See the note under Authentication and tokens.
device_typestringNo—Accepted for compatibility, such as mobile or desktop. It does not change the results.

section and content_type must not be empty strings; an empty value is rejected with a 422.

Example: Basic Personalized Recommendations

GET /experiences/recommend/v1/recommendations?site_id=acme&user_id=u_314&num_results=10

Response

A 200 response carries a RecommendationResponse: an ordered list of recommended items, ranked by relevance. Each item carries a display-ready card object sourced from the underlying content document, so a single call returns everything you need to render — there is no separate hydration step. For the rendering flow with examples, see Deploying and Rendering Recommendations.

{
"recommendations": [
{
"item_id": "ABC123…",
"score": 0.87,
"card": {
"title": "Election results upend mayoral race",
"date": "2026-06-01T12:00:00Z",
"author": "Alice Reporter",
"type": "article",
"is_premium": false,
"categories": ["politics"],
"tags": ["election", "2026"],
"url": "https://example.com/story",
"thumbnail_url": "https://cdn.example.com/story.jpg",
"arc": null
},
"position": 0,
"attribution_id": "att-…"
},
{ "item_id": "DEF456…", "score": 0.81, "card": null, "position": 1, "attribution_id": "att-…" }
],
"attribution": { "exposure_id": "exp-…", "issued_at": "…", "surface_id": "homepage-rail" },
"locale": "en"
}

The example omits each item’s flat copies of the card fields, described in the following table.

RecommendationResponse
FieldTypeDescription
recommendationsarray of itemsRecommended items, best first. The array order is the display order. Can be empty.
attributionobjectAttribution for this response. See the attribution table.
localestringBCP 47 language tag the site’s content is served in: the site’s setting, else your organization’s default, else en.
attribution
FieldTypeDescription
exposure_idstringOpaque identifier for this rendered set. Echo it on exposure and click events.
issued_atstring (ISO 8601)When the response was issued, in UTC.
surface_idstring or nullThe surface_id you sent, or null when you sent none.
FieldTypeDescription
item_idstringThe item_id you supplied at ingest.
scorenumberRelevance after editorial signals (boosts, buries, and pins) are applied, from 0.0 to 1.0. Every item in a cold-start preview scores exactly 0.0; see Cold-start response states.
positionintegerZero-based position of the item in the set.
attribution_idstringOpaque per-item attribution identifier. Echo it verbatim on exposure and click events.
cardobject or nullDisplay fields for the item. null when no matching content document exists, for example an editor-pinned item that has not synced yet.
title, type, timestamp, categories, tags, author, is_premium, url, thumbnail_url, arcas on cardFlat copies of the card fields, where timestamp is card.date. Empty or null when card is null.

The only fields every item is guaranteed to carry are item_id, score, position, and attribution_id.

card

Every field is optional, so render cards that degrade gracefully when one is missing.

FieldTypeDescription
titlestring or nullDisplay title (headline).
datestring or nullPublication date, from the content’s timestamp.
authorstring or nullContent creator.
typestring or nullarticle, video, or podcast.
is_premiumboolean or nullWhether the content is behind a paywall.
categoriesarray of stringsHigh-level taxonomy. Can be empty.
tagsarray of stringsDetailed keywords. Can be empty.
urlstring or nullCanonical URL of the content.
thumbnail_urlstring or nullFeed-card-sized image, or the source image while no derivative exists. See Card images.
arcobject or nullArc XP-only fields. null for content from other CMSs and for Arc XP images that are not signed.
arc.thumbnail_resize_pathstringSigned Arc XP Image Resizer v2 path of the thumbnail, such as /resizer/v2/<arc-id>?auth=<token>. Prefix it with a host that serves Resizer v2 for the site, normally the site’s own domain, and append width or height to get the image at any size. The token signs the image, not the size, so you don’t sign the request.

Personalization and Filtering

Optional section and content_type query parameters scope a request to an editorial section, content type, or both, and are applied before ranking. See Compass API filters for the full reference.

For how personalization, site partitioning, and filtering combine, and how the API handles new readers and new content, see Cold Start and Model Warm-Up.

Cold-start response states

What GET /experiences/recommend/v1/recommendations returns before your model is fully warmed up is decided by your tenant lifecycle status together with whether your catalog has content yet — not by a single generic “cold catalog” condition. The status is resolved from your API key before any model call, so the response state is deterministic. The following table is the complete set of states a valid experiences key can produce.

StateTenant status + catalogStatus codeResponse body
No contentOnboarding (not yet active) and empty catalog — also any suspended, pending, or deleted tenant403 (Cache-Control: no-store){"detail":"Tenant is not active"}
Content ingested, not yet trainedOnboarding and catalog has at least one active item200 (short cache TTL)Recency preview: up to the five most recent active items, every item scored 0.0, honoring any section / content_type filters
Active, no trained modelActive tenant whose model is not provisioned yet200 (short cache TTL)Popularity preview: up to the five most popular active items, backfilled by the most recent, every item scored 0.0, honoring any section / content_type filters; an empty recommendations: [] when there is nothing to preview
Trained, no candidatesActive tenant; personalization returns nothing that survives filters and pins200 (short cache TTL)Empty recommendations: []
Trained, has candidatesActive tenant200 (normal cache TTL)Personalized, ranked list with real scores (greater than 0.0)

The two 200 “empty-ish” states are not interchangeable:

  • The recency and popularity previews return items, all scored exactly 0.0. A response whose items are all scored 0.0 is the signal clients use to distinguish a preview from personalized results — no reranker is run, and no boosts, buries, or pins are applied, though excluded items are dropped. Preview items are fully enriched and carry the same attribution as personalized results, so your card-rendering code exercises the real response shape ahead of go-live.
  • The trained-but-no-candidates state returns an empty array, not scored placeholders. Handle both: render nothing (or a fallback) on an empty array, and treat an all-0.0 list as a pre-launch preview rather than a personalized result.

An all-0.0 list can also reach a trained tenant. When the personalization model fails, is throttled, or times out on a request, the API serves the popularity preview in its place, filled up to num_results rather than five, with the same short cache TTL. When the API can’t answer in time at all, it returns a 503; see Status and error codes.

Missing or unknown keys never reach these states — they are rejected earlier with 401. See Verify the token for the full auth-and-serving boundary.

Integration Guide

Identifying Users

The user_id parameter is required for both sending events and fetching recommendations, and it is your responsibility to provide a consistent, anonymized identifier for each user. See the User ID Guidance for anonymization, stability, and login-transition rules.

Content Sync from Your CMS

Compass stays in sync with your content catalog through POST /collector/v1/content requests whenever content is published, updated, or deleted. To load your back catalog and keep it current, whether through the platform-managed integration for Arc XP CMS customers or a direct integration from another CMS, see Sync Your Content Catalog with Compass.

Displaying Recommendations

Each recommendation carries a display-ready card object, so one call to GET /experiences/recommend/v1/recommendations returns everything needed to render — no separate lookup against your CMS. Render the cards in the order returned (the list is already ranked), skip any item whose card is null, and send a click event back to the Events endpoint when a user clicks a recommendation. For a full rendering walkthrough — TypeScript + React examples and empty/error-state handling — see Deploying and Rendering Recommendations.

Popular and Trending are two anonymous, site-wide recommendation endpoints. They rank a site’s content by how readers engage with it, with no personalization and no user identity — every reader of a site gets the same ranked list. Popular ranks by volume (how much a story was read over a recent window); Trending ranks by velocity (how fast a story is climbing against its own recent baseline). Both are part of the Recommendations API, served from the same base URL and experiences token, and return the same RecommendationResponse envelope as /recommendations — so a client that already renders personalized results renders these with the same code.

SurfaceEndpointRanks by
PopularGET /experiences/recommend/v1/popularEngagement volume over a recent window
TrendingGET /experiences/recommend/v1/trendingEngagement velocity (recent window vs a prior baseline window)

Request parameters

ParameterTypeRequiredDefaultDescription
site_idstringYes—Scopes the ranking to one website or property. Must match the site_id used when ingesting content and sending events.
num_resultsintegerNo5Number of items to return. Range 1–50; values outside the range are rejected with a 422.
surface_idstringNo—Opaque label for the surface where the set is rendered. Echoed back in the response; not interpreted.

These endpoints are anonymous, so they do not accept user_id or item_id — supplying either (or any other unrecognized parameter, including subscription_tier, section, and content_type) returns a 422. They rank premium and free content alike. site_id alone is enough:

GET /experiences/recommend/v1/popular?site_id=acme&num_results=5

Response

Both return a RecommendationResponse — the same envelope /recommendations returns, with a recommendations array ordered best-first plus a response-level attribution object and locale. Each item carries its ranking score, a display-ready card, its zero-based position, and a per-item attribution_id; one call returns everything needed to render (skip any item whose card is null). For every field, see Response. Render exactly as in Deploying and Rendering Recommendations.

score is normalized to (0.0, 1.0] for engagement-ranked items — the top item scores 1.0 and every ranked item scores strictly above 0.0. A score of exactly 0.0 is reserved for recency-backfilled items (see Graceful degradation). Use score to rank, not as an absolute popularity figure.

Attribution. Every response carries attribution so clicks tie back to the exact set and slot — the same Confirmed-CTR round-trip the personalized endpoint uses. The response-level attribution holds exposure_id (one id for the whole set), issued_at, and surface_id (echoed back, null if not sent); each item carries its own attribution_id and position. When a reader is shown the set or clicks an item, send the corresponding event back to the Events endpoint carrying the exposure_id, that item’s attribution_id, and its position verbatim — these identifiers are opaque, so round-trip them as-is. For the client-side emit path, see Compass Web SDK: Recommendation Attribution.

Caching. Both endpoints set no-store: request a fresh response per render and never share one across readers, because each response mints its own exposure_id and per-item attribution_id.

Graceful degradation

For an active tenant and a valid site_id, these endpoints do not return an empty list while the catalog has active content. When engagement ranking yields fewer items than num_results (a new site, a quiet window, or items removed by an EXCLUDE signal), the endpoint backfills the remaining slots with the most recently published active items, scored exactly 0.0. A response whose items are all 0.0 means the ranking had no engagement data and the whole list is recency backfill. A 403 (rather than an empty list) is returned only when the endpoint cannot serve the request at all — the tenant is not eligible (status neither active nor onboarding), or it is still onboarding with no ingested content. A still-onboarding tenant with content is served the recent active catalog as a recency preview (all 0.0), the same preview state described in Cold-start response states.

Editorial signals and eligibility

These endpoints reflect what readers actually read, so editorial steering does not reorder them. Only EXCLUDE applies — an excluded item is dropped from the ranking and from recency backfill, keeping it working as the takedown / brand-safety control. PIN, BOOST, and BURY are ignored here; use the personalized endpoint if you need those. See Filtering and Editorial Signals.

Producer-side site_id contract

Popular and Trending rank per site, so the events they rank must carry the same site_id you use for content ingestion and on the request. That value is set on the producer side when you send events, not on the recommendation request; see Site ID for how to set it on each event path.

An event without a site_id is accepted but counted-but-skipped — tallied as a missing-site_id event and left out of every site’s ranking rather than misattributed. Confirm your producers stamp site_id before relying on Popular or Trending for a multi-site tenant.

Each event that feeds these rankings adds a fixed weight, so a deeper action outranks a bare view:

Event typeWeight
page_view, video_start1
video_complete, engaged_read3
share, article_save4

Every other event type counts for nothing. Recommendation and Catch Up card events are deliberately excluded so the recommender cannot inflate its own ranking, and click, search, video_progress, and deepest_scroll do not count either.

Trending takes the same parameters and returns the same RecommendationResponse; it differs only in ordering. Instead of raw volume it ranks by velocity, comparing each item’s recent-window volume against a prior baseline, so a fast-climbing story ranks above one that is merely large and steady. A minimum-volume floor keeps a small absolute rise from topping the list, and an item with no baseline is treated as a breakout ranked by recent volume. Recency backfill, the 0.0 marker, attribution, EXCLUDE-only signals, tenant gating, and caching all behave as on Popular.

Status and error codes

Every error response has a JSON body with a detail field. For a validation 422, detail is a list naming each field that failed and why; a Collector API 422 for an oversized event or batch carries a string instead.

StatusCollector APIRecommendations APIWhat to do
200 OK—The request was served. This includes an empty recommendations: [] and an all-0.0 preview; see Cold-start response states.None.
202 AcceptedThe event, batch, or content write was accepted for asynchronous processing.—None.
400 Bad RequestNot returned. Malformed requests return 422.Not returned. Malformed requests return 422.—
401 UnauthorizedThe X-API-Key header is missing, or the token isn’t accepted for this API.Same as the Collector API.Check the token and its key collection. See Authentication and tokens. Don’t retry as-is.
403 ForbiddenNot returned. The Collector API accepts writes during onboarding.{"detail":"Tenant is not active"}, sent with no-store: your organization is suspended, pending, or deleted, or still onboarding with no content ingested.Ingest content, or contact Arc XP Client Support if your organization should be active.
404 Not FoundThe path doesn’t exist, usually a wrong base path or version.Same as the Collector API.Check the URL against the endpoint tables.
409 ConflictNot returned. A stale content write is dropped and still returns 202; see revision in Content endpoint.Not returned.—
413 Payload Too LargeNot returned. Oversized events, batches, and text fields return 422.Not returned.—
422 Unprocessable ContentThe body failed validation: a missing or unknown field value, a timestamp without a timezone, an event_value rule, an empty or oversized batch, or an oversized event or text field.A query parameter failed validation: a missing site_id or user_id, num_results outside 1–50, an unknown subscription_tier, or, on Popular and Trending, any parameter they don’t accept.Fix the request. Don’t retry as-is.
429 Too Many RequestsThe Arc XP edge is limiting your request rate.Same as the Collector API.Retry with exponential backoff.
500 Internal Server ErrorA transient failure; the write was not accepted.A transient failure.Retry with exponential backoff. Retry a batch as a whole.
503 Service Unavailable—The API couldn’t answer in time. The response carries Retry-After and no-store.Retry after the Retry-After interval, or render your fallback.

Onboarding for good recommendations on day one

The Quick Start gets the plumbing working, but a freshly provisioned model needs your catalog and historical behavioral signal before launch. For why, see Why you warm up the model before launch; for the steps, see the Compass Onboarding Checklist.

Troubleshooting

To diagnose empty, generic, or cold-looking recommendations, refused requests, and events that aren’t arriving, see Troubleshoot Compass Recommendations. For SDK components that render nothing, see Compass Web SDK: Nothing Renders?.