X-Application-IdX-Api-Key
GET /sdk/v1/campaigns/:campaignId/media
List all tracked media across the campaign with aggregate metrics. For integrations that maintain a local copy, use Sync campaign media to download bounded pages initially and then receive changed records and removals.Query parameters
query(optional; searches creator display names)platform(optional; filter by platform, e.g.,instagram,tiktok,youtube)
Response
asOfTimestamp indicates when tracking metrics were last refreshed. It may be null if no scraping has occurred yet.TikTok and Instagram media rows include
isSlideshow: true for carousel/slideshow posts and false for known non-carousel posts, including videos, Instagram Reels, and single-image Instagram posts. Successfully scraped YouTube videos and Shorts return false. The value is null when the type is not known yet or not applicable. Use this field instead of deriving carousel status from the mediaUrl path; false alone does not distinguish an Instagram Reel from a single-image post.authorPlatformId, authorUsername, authorDisplayName), content
fields (title, captionText, hashtags), audio fields (audioPlatformId,
audioTitle, audioArtist, audioAlbum, audioIsOriginal), and
metadataCollectedAt. Unavailable fields are null, and hashtags is an empty
array when none are available.
Account check warnings
Account media rows includeaccountIssue, independently of tracking tier. It is null when no warning is recorded, including before the first check. A successful completed check clears it. Do not render an “OK” badge or treat null as proof that all historical posts were discovered.
CHECK_FAILED reasons are ACCESS_BLOCKED, RATE_LIMITED, TIMEOUT, INCOMPLETE_RESPONSE, INVALID_RESPONSE, PROCESSING_FAILED, PROFILE_UNAVAILABLE, PROVIDER_UNAVAILABLE, and PROVIDER_ERROR. Other codes have a null reason. PROCESSING_FAILED identifies a Grade-side failure to prepare the check or process its results, including an invalid account target or missing tracking dates. Messages are safe for display; use codes for application logic.
checkedAt is the UTC time of the reported issue. The previous warning remains while a new check is pending. An empty date-filtered window is not an account warning, and a failed individual post does not label its parent account missing or private. Results are scoped to each account, including when several accounts share a provider run. Providers include Apify actors and the official X API.
Temporary CHECK_FAILED results remain internal while automatic recovery is pending. If recovery succeeds, no new warning appears. If recovery finishes unsuccessfully, Grade publishes the issue and its reason. Failures with no remaining automatic recovery can be published immediately. Explicit profile availability responses do not wait for technical retries.
The official X API continues retrying without a fixed attempt limit. Its first transient failure stays internal; a subsequent failure at least three hours later publishes CHECK_FAILED if the account check still has not completed. Retries continue, and a successful completed check clears the warning.
Instagram account checks combine the required posts and reels providers. Neither provider can clear a warning while the other is pending or recovering. Conflicting availability responses become CHECK_FAILED with INCOMPLETE_RESPONSE; Grade does not assert that a profile is private or missing when another required provider succeeds. A successful posts check with no accessible reels does not itself produce a warning.
GET /sdk/v1/campaigns/:campaignId/creators/media
List a campaign creator’s tracked media, broken down into accounts and posts.Query parameters
email(required)includeGroups(optional;trueto include explicit group rows)page(default1)limit(default5)
Response
includeGroups=true, the response includes an additional groups array and pagination.groups object.
Group rows also include isSlideshow when the winning media item has a known slideshow state.
Normalized author, content, hashtag, and audio metadata on a group row comes from
that group’s winning media item.
Common errors
400: missingemail404: creator not found in this campaign
POST /sdk/v1/campaigns/:campaignId/creators/media
Add or update tracked media for a campaign creator. If the creator is not yet a member of the campaign, they are automatically added (implicit membership). Background scraping is triggered automatically after media is saved.Body
Tracking is start-based. Provide
startDate (or legacy trackStartAt) and
omit media-level end dates. For account URLs, Grade continues discovering
eligible posts automatically, while trackForValue and trackForUnit define
each discovered post’s relative payable tracking window.media array accepts:
Platform name (e.g.,
instagram, tiktok, youtube). Optional if the platform can be derived from the URL.Relative tracking duration for discovered posts. Provide this together with
trackForUnit, for example 7 with DAYS.Relative tracking windows
UsetrackForValue and trackForUnit to choose how long each discovered post is tracked after it is uploaded.
Examples:
- 7-day window:
"trackForValue": 7,"trackForUnit": "DAYS" - 30-day window:
"trackForValue": 30,"trackForUnit": "DAYS" - 2-month window:
"trackForValue": 2,"trackForUnit": "MONTHS"
trackForValue: 7 with trackForUnit: "DAYS", Grade counts the video’s views for the first 7 days after upload. If the campaign pays CPM or bonuses after tracking completes, the video becomes payable after that 7-day window is complete.
Selects which posts to track from an account-type URL (max 256 characters).
Only applies to account media. This does not change crosspost grouping rules.
The contract’s caption grouping override
is a separate setting.
Response
Common errors
400: missingemailormedia400:startDateis invalid400:endDateandtrackEndAtare not supported for creator media. UsetrackForValueandtrackForUnitfor relative tracking windows.400:trackForValueandtrackForUnitmust be provided together400:trackForUnitmust beDAYSorMONTHS
DELETE /sdk/v1/campaigns/:campaignId/creators/media
Remove a tracked media item from a campaign creator.Body
Response
Common errors
400: missingemailorcampaignCreatorMediaId404: media item not found
GET /sdk/v1/campaigns/:campaignId/media/discovered-posts
List posts discovered for an account-type media item. When you track an account URL (e.g.,https://www.instagram.com/creatorhandle), the system periodically discovers new posts from that account and tracks them automatically.
Query parameters
sourceCampaignCreatorMediaId(required; the account media item ID)page(default1)limit(default5)startDate/endDate(optional,YYYY-MM-DD; provide both together)performanceWindowDays(optional integer, 1-366)
views return the latest cumulative scrape
value. When startDate and endDate are provided, those same fields return
the metric delta for that date range, using the latest scrape inside the range
minus the latest scrape before the range. When performanceWindowDays is
provided, each post uses its own uploadDate as the window start and returns
the metric delta for the first N days after that upload.
Use either startDate / endDate or performanceWindowDays, not both. Windowed
responses also include viewsTotal, likesTotal, commentsTotal, sharesTotal,
and metricsWindow so you can distinguish the current cumulative totals from
the requested window deltas. If performanceWindowDays is requested but a post
does not yet have an uploadDate, window metric fields are null and
metricsWindow.status is missingUploadDate.
Response
Common errors
400: missingsourceCampaignCreatorMediaId400:startDateandendDatemust be provided together400:performanceWindowDaysmust be an integer between 1 and 366400: use eitherstartDate/endDateorperformanceWindowDays, not both404: source media item not found or does not belong to your agency