Archive API docs
    Jump to

    Narrow by kind with a prefix — q: queries, m: mutations, t: types, g: guides, f: fields and arguments.

    Jump to examples ↓
    Query

    items

    Search and paginate archived items (social content) for the current workspace. Order results with the sorting argument, for example by engagement or earned media value: items(sorting: [{sortKey: EARNED_MEDIA_VALUE, sortOrder: DESC}]). Narrow by engagement ranges with filter.engagement.

    Arguments

    Object, input and enum types open in place — use + to reveal their fields. A type that is already open above the row stops at a ↻ circular marker, and anything nested past the depth limit links out to its own page instead.

    after String
    Cursor for fetching the next page of results.
    customAttributeConditions [CustomAttributeConditionInput!] default []
    Custom attribute filter conditions. field: "labels" filters by the item creator's labels: label names, case-sensitive, with the list operators CONTAINS, CONTAINS_ALL, DOES_NOT_CONTAIN, IS_EMPTY or IS_NOT_EMPTY. One labels condition is allowed per request; a second one is refused with extensions.code = "UNSUPPORTED_CUSTOM_ATTRIBUTE_CONDITION". Either include: {field: "labels", operator: CONTAINS, type: TEXT_LIST, value: ["VIP"]}, or exclude: {field: "labels", operator: DOES_NOT_CONTAIN, type: TEXT_LIST, value: ["Competitor"]}.
    filter ItemFilterInput default {}
    Filter criteria to narrow down results. A filter, condition or sort key the Archive app does not offer this workspace (for example viralityScore or a virality sort without virality scores in the plan) raises a GraphQL error with extensions.code = "FILTER_NOT_AVAILABLE" and extensions.filter naming it, never an unfiltered result. A saved view searched by presetId runs with its stored filters, as in the app.
    first Int default 20
    Number of items to return (page size).
    presetId ID
    Filter preset ID. When provided, sorting, filter, and customAttributeConditions are ignored. Must reference a preset with accessor media_deck or collections; pass IDs returned by contentViews / collections queries. Unknown, cross-workspace, or wrong-accessor preset IDs raise a GraphQL error with extensions.code = "WRONG_VIEW_TYPE_FOR_ITEMS". Non-empty sorting, filter, or customAttributeConditions sent alongside it are listed in the response's extensions.warnings with code = "PRESET_OVERRIDES_INLINE_ARGUMENTS".
    sorting [ItemSortingInput!] default [{sortKey: TAKEN_AT, sortOrder: DESC}]
    Sorting instructions to apply to the result set. Defaults to TAKEN_AT DESC. Sort by engagement or earned media value with an ItemSortKey, for example sorting: [{sortKey: EARNED_MEDIA_VALUE, sortOrder: DESC}] or LIKE_COUNT. To limit results to an engagement range, use filter.engagement.

    Returns

    A paginated connection of Item nodes. See Pagination for the connection shape.

    edges [ItemEdge!]!
    List of edges with cursors.
    nodes [Item!]!
    List of items.
    pageInfo PageInfo!
    Pagination information.
    totalCount Int
    Total number of items available.
    totals ItemTotals
    Engagement summed over every item the filter matches: the whole filtered set, not the page, identical on every page, so select it on the first page only. Carries no item count; select totalCount for that. For a weekly split, send one request per week with filter.takenAt set to that week. earnedMediaValue follows the definition of Engagement.earnedMediaValue. With an embedding superSearch, the sums cover the same nearest-match set the search returns. A brand-scoped search (filter.brandRelatedOnly, inline or from a saved view) is refused with extensions.code = "FILTER_NOT_AVAILABLE". While the workspace is in App Review mode, where the Archive app hides content totals, it returns a FIELD_NOT_AVAILABLE error with extensions.field = "items.totals". When the sums cannot be computed completely, the request fails with extensions.code = "SERVICE_UNAVAILABLE"; retry later. Null only when not selected.