Compare with competitors
get_competitor_snapshotsPublic figures of the other Instagram Business and Creator accounts the organization tracks, next to the organization's own Instagram account measured the same way. Read once a day through Instagram Business Discovery over each account's last 25 posts, so the two sides are comparable; competitors are added, refreshed and removed in the PostRite app by an Editor, not here. Without competitorId it returns every tracked competitor: its latest reading (followersCount, avgLikes, avgComments, avgViews, postsPerWeek, engagementPerFollower, followersChange30d over followersChangeDays days, lastPostAt), its status, up to 5 top posts (permalink, mediaType, timestamp and counts only; captions are never stored) and ourAccount, our reading to compare with, plus max (the ceiling on tracked competitors) and discovery {available, reason, connections}: when available is false nothing can be added or refreshed, and reason says who can act (NO_CONNECTION: connect Instagram through Facebook; MISSING_PERMISSION: reconnect that account so it grants the permission; NOT_OFFERED: PostRite does not request the permission right now, so reconnecting changes nothing). With competitorId (from this tool's list) it returns that competitor's stored days over days (default 30), oldest first, to show a trend. A null figure was not returned, never zero: an account that hides its like counts has null avgLikes and engagementPerFollower, and followersChange30d is null until two days are stored. postsLast30d counts the posts in the last 30 days, and when postsWindowDays is under 30 the sample of 25 posts ended before reaching that far back, so postsLast30d is a lower bound; postsPerWeek is already divided by postsWindowDays, so it is the rate over the days that were covered and not a lower bound. A competitor whose status is not ACTIVE (ACTIVE, NOT_FOUND, NOT_BUSINESS, UNAVAILABLE, NO_CONNECTION, RATE_LIMITED, ERROR) was not read on its last attempt: lastError carries Instagram's code, and the stored figures are from its last good read (capturedDate). NOT_FOUND cannot tell a handle that does not exist from a personal account, which Business Discovery cannot read; NO_CONNECTION is fixed by reconnecting Instagram in PostRite, and a competitor left at it for 90 days is removed with its stored days; RATE_LIMITED and ERROR retry with the next daily read.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_competitor_snapshots"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Period in days (7, 30, 90; default 30) | |
| competitorId | No | A competitor's id from this tool's list. Omit it to list every tracked competitor with its latest reading; pass it to get that competitor's daily history | |
| organizationId | No | Organization to act in — an id from list_organizations. Required when this connection was authorized for more than one organization; omit it when there is only one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | The organization's ceiling on tracked competitors | |
| days | No | Period length in days | |
| discovery | No | {available, reason, connections[]}: whether competitors can be added or refreshed, and why not | |
| snapshots | No | With competitorId: one reading per stored day, oldest first; a null figure was not returned | |
| competitor | No | With competitorId: {id, username, name, status} | |
| competitors | No | Without competitorId: every tracked competitor with its latest reading, status, top posts and our own account's reading | |
| samplePosts | No | Recent posts every average is computed over |