Archive API docs
    Jump to

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

    Core concepts

    Use this guide to understand the objects you read and update through the API. For individual fields and arguments, use the API reference. The glossary maps names in the Archive app to their API equivalents.

    Workspaces

    A workspace usually represents one brand or one region of a brand. The WORKSPACE-ID header selects the workspace for a request. Workspace-scoped operations can access only that workspace’s data, even when the token has access to others.

    An organization can have multiple workspaces. An organization-wide token can access each one by changing the workspace header. Each workspace has its own rate-limit budget. See Workspaces for the header mechanics and Rate limits & plans for the bucket model.

    The Workspace type lists the hashtags, mentions, and keywords Archive tracks, plus connected social accounts under integrations. Archive captures content that matches configured tracking rules. items returns content archived in this workspace, including owned-account posts that have been captured. A connected integration does not establish monitoring of every post by that account. See connected-account coverage for the creator-monitoring workflow.

    Items: the content

    An Item is a captured piece of social content, such as a post, Reel, Story, TikTok video, or YouTube Short. It includes published details (caption, hashtags, mentions, takenAt, location) and data stored in Archive (transcriptions, currentEngagement, customAttributes).

    Choose the identifier that matches your task:

    • id — the item in Archive. This is what you pass to other operations.
    • externalId — the platform’s own ID for the content.
    • mediaItemId — the parent post. Carousel frames that belong to one post share it, so use it to regroup them.
    • originalUrl — the post on the platform. It’s null for content with no public URL, such as Instagram Stories, and it stops resolving when the post is deleted or the account goes private.
    • archivePublicUrl — Archive’s permalink, which keeps resolving after the original doesn’t. It is null for a restricted item.

    Platform and format are separate

    provider is the platform (INSTAGRAM, TIKTOK, YOUTUBE, INTERNAL). type is the format (POST, REEL, SHORT, STORY). A TikTok video has provider: TIKTOK and a format in type.

    The itemTypes filter combines platform and format. Use its enum values when building a filter:

    Engagement

    currentEngagement is the latest metrics snapshot for an item; engagementHistory returns its snapshot history. Check the meaning and units of these metrics:

    • views and impressions are not the same field. views is the platform’s view count; impressions covers views, plays, or estimated impressions depending on the source. Don’t assume they agree, and don’t substitute one for the other.
    • earnedMediaValue is in cents. Divide by 100 before you show it as currency.

    Transcriptions

    Video items expose spoken content as text in transcriptions. Each transcription identifies its source media with mediaContentId. Use FUZZY_TRANSCRIPTION super-search to search speech; use FUZZY_CAPTION to search captions. See Filtering & search.

    Creators and social profiles

    A Social Profile is one account on one platform: accountName (the handle), provider, followers, verified, and any contact details Archive has (email, phoneNumbers).

    A Creator represents a person in a workspace. Its socialProfiles field lists the accounts linked to that creator record. SocialProfile.creator points back to the creator, or returns null when the profile has no creator record in the workspace.

    Items reference both. Item.socialProfile is the account that posted; Item.creator is the person behind it.

    Collections, views, and view groups

    A workspace organizes content with Collections, saved views, and View Groups.

    A Collection is a manual grouping. Membership is explicit — you put items in with addItemToCollections and take them out with removeItemFromCollections — and itemCount tells you how many are in it. A Collection never evaluates a rule; it holds exactly what you put there.

    A view is a saved query that runs when you read its results. The three workspace view types are ContentView, SocialProfileView, and CreatorView. A view’s id is a filter-preset UUID, which is what you pass as presetId. Deleting a view never deletes the underlying content.

    A View Group is a folder. One group can hold Collections and all three kinds of view at once, each in its own ordered list.

    Views don’t all filter the same way

    Each view type applies a different set of saved settings:

    View typeRead withWhat presetId applies
    ContentViewitems(presetId:)filters, customAttributeConditions, and sort
    SocialProfileViewsocialProfiles(presetId:)customAttributeConditions and sort; supported filters also apply with applyViewFilters: true
    Workspace CreatorViewcreators(presetId:)customAttributeConditions and sort; supported filters also apply with applyViewFilters: true. Inline sorting overrides the saved sort

    Social Profile and workspace Creator views do not apply their saved filters by default. Pass applyViewFilters: true with presetId to apply supported saved filters. Unsupported keys and unreadable values are ignored, so check each query’s reference for supported filters. Without this option, the API can return more results than the app shows for the same view.

    presetId is also exclusive on items: supply it and the filter, sorting, and customAttributeConditions arguments are ignored, because the saved view defines the query entirely. Filtering & search covers both behaviors in more detail.

    Custom attributes and AI Filters

    Items and creators store custom metadata in the customAttributes JSON object. Read customAttributeSchemas to interpret its keys and values. Each schema entry provides a key, a readable name, and a type.

    AI Filters fill in some attributes automatically. Their schema entries have aiGenerated: true. The item’s aiFilterReasons provides explanations, matched to attributes by key. An explanation is null when the run did not record one.

    To query on custom attributes, use the top-level customAttributeConditions argument — a sibling of filter, not a field inside it. See Filtering & search.

    UI ↔ API glossary

    Use this table when translating a task from the app to the API:

    In the appIn the APIWatch out for
    Workspaceworkspace, the WORKSPACE-ID header — and “shop” in error strings{"errors":"Shop not found"} means the workspace is unknown or unreachable
    Views (the metric)currentEngagement.views and currentEngagement.impressionsTwo distinct fields, and neither is a saved View
    EMVcurrentEngagement.earnedMediaValueIn cents
    Saved view, filter presetContentView, SocialProfileView, CreatorView; presetId, filterPresetsThe view’s id is the preset ID
    Group, folderViewGroupHolds Collections and all three view types together
    CollectionCollectionManual membership — never a stored rule
    CreatorCreatorThe person. The account is a SocialProfile
    Handle, usernameSocialProfile.accountNameNot unique, and not an identity — join on creator.id
    Post typeItem.type (ItemType) on read, itemTypes (FilterItemType) on filterDifferent enums with overlapping names
    Date, timeDateTime, DateTimeWithZoneSend UTC timestamps ending in Z; output also uses Z

    Where to go next