MCP technical reference
Public Signal provides 33 MCP tools, including 20 discovery tools, for collecting available Instagram data and working with saved research. Start every research request with instagram_get_guidance. Every call answers within about 10 seconds; a call that needs longer keeps running and answers with a receipt to watch, as described under Programs and runs.
Credit overview
A standard data lookup or page fetch costs 0.25 credits. Some tools perform an initial account lookup, fetch several pages, or enrich each discovered profile. Those steps add together as shown below. Reading and organizing saved research is free.
A page is one fetched batch of search results, media, or interactions of varying size. Do not assume a particular page size.
A paid discovery call starts only while the balance is at least 1 credit; below that every input comes back not_started with error_code: "insufficient_credits" and an upgrade_url, and nothing is stored or charged. Once started, each provider request is checked against the spendable balance before it is sent, and each input's credits are charged when that input finishes, so the balance drops as inputs complete. When the balance can no longer pay for the next lookup or page, that input stops early and keeps everything it already collected: its result is partial, its coverage reports stop_reason: "credits_exhausted", and its entry in results carries error_code: "insufficient_credits" and an upgrade_url. A call that reaches its time limit likewise stops requesting and returns what it has, with stop_reason: "time_limit". A call whose run is stopped (instagram_abort_run, the end of a hosted turn, a server shutdown) does the same with coverage stop_reason: "stopped": inputs already requesting keep and are charged for what they fetched, inputs not yet started come back not_started with error_code: "stopped" and are not charged, and the receipt carries the run's stop_reason (for example aborted or turn_end).
| Tool | Base credit calculation |
|---|---|
instagram_get_guidance | Cost: actual model cost, typically under 0.01 credits per call. Nothing is reserved; it starts only while the balance is at least 1 credit. |
instagram_search_accounts | Cost: 0.25 credits per search page, plus 0.25 per returned account when enrich_profiles=true. |
instagram_search_media | Cost: 0.25 credits per search page fetched. |
instagram_search_hashtags | Cost: 0.25 credits per query. |
instagram_get_hashtag_media | Cost: 0.25 credits per page fetched (about 20 media; 8 on the first page); every call, continuations included, fetches at least one page. |
instagram_get_related_profiles | Cost: 0.50 credits per seed, plus 0.25 per returned profile when enrich_profiles=true. |
instagram_get_profile | Cost: 0.25 credits per profile, not-found included. |
instagram_get_media | Cost: 0.25 credits per media, not-found included. |
instagram_get_profile_media | Cost: 0.25 credits per page, plus 0.25 to resolve a handle or URL; numeric IDs skip it. |
instagram_calculate_profile_metrics | Cost: 0 from fresh observations; otherwise 0.25 per profile lookup and 0.25 per feed page, at most 0.50. |
instagram_get_tagged_media | Cost: 0.25 credits per page, plus 0.25 to resolve a handle or URL; numeric IDs skip it. |
instagram_get_comments | Cost: 0.25 credits per top-level page plus 0.25 per reply page; each comment with replies needs at least one. |
instagram_get_likers | Cost: 0.25 credits per input, whatever results_limit. |
instagram_get_followers | Cost: 0.25 credits per page plus 0.25 to resolve the handle; a resumed segment skips resolution. |
instagram_get_following | Cost: 0.25 credits per page plus 0.25 to resolve the handle; a resumed segment skips resolution. |
instagram_search_locations | Cost: 0.25 credits per input (one search, no paging). |
instagram_get_location | Cost: 0.25 credits per input, also when not found. |
instagram_get_location_media | Cost: 0.25 credits per page; resuming mid-page buys that page again. |
instagram_get_stories | Cost: 0.50 credits per tray or known Story, plus 0.25 to resolve a handle or URL; a private tray costs 0.25. |
instagram_get_highlights | Cost: 0.50 credits per list page plus 0.25 to resolve a handle or URL, skipped for numeric IDs and resumes. |
instagram_get_highlight_stories | Cost: 0.25 credits per input. |
instagram_workspace_query | Cost: free, even at zero balance. |
instagram_workspace_export | Cost: free, even at zero balance. |
instagram_get_account_status | Cost: free, even at zero balance. |
instagram_workspace_write | Cost: free, even at zero balance. |
instagram_workspace_apply | Cost: the applied tool's price for every input at the given options. |
instagram_workspace_decision_model | Cost: actual model cost, typically 0.005–0.008 credits per row. Nothing is reserved; a row starts only while the balance is at least 1 credit, and it is charged its actual model cost afterwards. |
instagram_qualify_accounts | Cost: data the mode needs and the workspace lacks (0.25 per profile lookup, 0.25 per post page), plus actual model cost: about 0.01 credits per account without images, about 0.14 with images. |
instagram_workspace_llm | Cost: actual model cost, typically 0.02–0.04 credits per row, double when rewritten. Nothing is reserved; a row starts only while the balance is at least 1 credit, and it is charged its actual model cost afterwards. |
instagram_run_code | Cost: free; calls inside bill as their own tools - 0.25 credits per provider request, model sweeps at token cost. |
instagram_watch_run | Cost: free; the run keeps spending while it runs. |
instagram_abort_run | Cost: free; provider requests already sent stay charged. |
instagram_list_runs | Cost: free. |
Not-found and other billable provider errors still cost credits. A private Story tray (403) costs 0.25 credits for the tray, plus handle resolution when needed; a Highlight-list 403/404 costs 0.25 for that list request. Resuming a partially consumed hashtag, follower, following or location-media page buys that page again. Recalling comments, profile media or tagged media starts at the first page. Model-tool ranges are measured typical costs, not fixed prices.
Guidance
instagram_get_guidance
Get the prepared guide for one research request before starting on it.
TypeSafe's Jev 1.14 decision model (typesafe/jev-1.14) reads the request and picks one of Public Signal's prepared guides: a question one direct lookup answers (single_fetch: facts, metrics, or the newest posts or Stories of one or a few accounts, posts or places the caller names), the people interacting with named accounts (interactions), finding accounts that match a brief, including engagement or recent-activity gates and a per-account text such as an outreach draft (find_accounts), or general for anything else. A pick below 0.5 confidence returns general. The guide comes back whole, opening with a line that names it: the route, which steps run together in one instagram_run_code program and which are direct tool calls, and for programs a tested example program whose input block (search terms, gates, judgement questions, target, budget, per-account text) the caller fills in from the request. The guide does not restate the request; the caller takes its gates, deliverables and count from the request itself. The tool is stateless: it reads no saved research and needs no collection. usage reports the decision's token counts and duration; prompt_sha256 names the version of the guide catalog; billing_pending: true appears when the model charge has not settled yet, and charged_credits is then 0.
instagram_get_guidance(request) -> GuidanceResult
Parameters
request— required string, 1–8,000 characters; the caller's request, verbatim.
Example request
{"request": "Please find 5 German natural skincare brands with 10k-100k followers and a public contact email."}
Example result
{
"guidance": "Guide: find_accounts (confidence 0.93)\n\n## Before you start\n...\n## Route\n...\n## Example program\n...",
"model": "typesafe/jev-1.14",
"usage": {"input_tokens": 950, "cached_input_tokens": 0, "output_tokens": 12, "reasoning_tokens": 0, "duration_seconds": 0.8},
"credits": {"charged_credits": "0.005", "remaining_credits": "94.9", "as_of_utc": "2026-09-29T12:00:00+00:00"},
"prompt_sha256": "f9d01d4ed11071781dcae4ebe964ec914744b7cd0b6d9e146c6663a054a1de2f"
}
Discovery tools
Every returned account and named interaction participant becomes an account row, including sparse search hits, media owners/coauthors, commenters, likers, followers, people followed, tagged and mentioned people. Interaction participants carry only id, username, full_name and avatar; their list privacy/verified flags stay on the activity row and never overwrite profile facts. Search and post payloads often carry a follower_count but no profile, so a count does not mean the account was looked up: profile_data_state = 'enriched' marks a stored full profile (bio, counts, category, links and published contact) from instagram_get_profile (0.25 credits per person), enrich_profiles, or a complete author profile delivered with a post. Apply instagram_get_profile with instagram_workspace_apply to the rows you need whose profile_data_state is not enriched and that have no is_available. is_available = false means the account was looked up and not found, so a second lookup finds nothing. New rows start discovered; status changes only through an explicit instagram_workspace_write, never on reacquisition or identity merges.
Discovery results are compact receipts, not the acquired rows. Both are saved in the collection: instagram_workspace_query reads facts and operation coverage, and a call that passes include_rows: true gets each input's stored rows back with the receipt, when the whole call fits one query result. Receipts count changes to accounts, media, activity, places, stories, highlights, and hashtags; the corresponding worksheets keep these evidence kinds separate. Every media acquisition also writes an account row for each media owner and coauthor. Request objects reject unknown fields. A batch whose inputs repeat is refused whole before paid acquisition; profile, location, Highlight and Story identifiers are normalized first (e.g. @Alice equals alice), while hashtags, search text and media URLs or shortcodes are compared as written, so pass each target in one form.
instagram_search_accounts
Find public accounts by ranked keyword matches. Instagram matches every word of the query against the handle and display name, in any order and inside words ("fitness berlin" finds @berlin_fitness and a name like "Food • Fitness • Berlin"); bios are not searched. Every extra word must appear too, so three-word phrases and role words people rarely put in a name (influencer, blogger, creator, brand) usually return nothing, or accounts that match only some of the words ("vegane bäckerei wien" returns accounts named "wien"). Use one or two words: the niche, or niche and place; spellings of a place give different accounts ("münchen", "muenchen", "munich"). Without enrichment each hit holds identity only (handle, name, private/verified flags, avatar); enrich_profiles runs instagram_get_profile on every returned account for bio, counts, category, links and published contact, at 0.25 credits each, the same price as looking hits up later. Most hits of a one- or two-word search are small or unrelated accounts, so screen hits by name and look up the ones that fit rather than enriching every hit. Search results are saved in the collection; the response is a receipt.
instagram_search_accounts(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].query— required string, 1–100 characters; one or two words matched against handles and display names.requests[].max_pages— optional integer, default1, range 1–10; the number of accounts per page varies.requests[].enrich_profiles— optional boolean, defaultfalse; runinstagram_get_profileon each hit (bio, counts, contact), 0.25 credits each.
Example request
{
"requests": [{"query": "coffee berlin", "max_pages": 1, "enrich_profiles": false}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "acorn-badger-candle"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_search_media
Find public posts and Reels by keyword with Instagram's top search, and save their captions, owners, dates and available engagement counts. It is Instagram's content ranking by topic and popularity in the query's language, not a word match: captions need not contain every word, and longer, specific wording works ("personal trainer berlin" finds more local, smaller creators than "fitness berlin"). A place counts only when the posts are about it: "fort myers food" returns local food posts by mostly small accounts, while a general niche such as "fitness berlin" returns popular national creators whose posts rarely name the place. Results vary from call to call, so treat them as a sample, and posts are often months old. Page 1 holds 8 media plus up to 5 accounts, the same accounts instagram_search_accounts ranks first; later pages hold 20 new media each. Media of every kind are kept (product_type clips marks a Reel; feed posts and carousels too). Owners and ranked accounts carry follower_count (ranked accounts also a top_search object), so a follower-range gate works before any lookup; neither carries a profile until you look it up with instagram_get_profile.
instagram_search_media(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].query— required string, 1–100 characters; topic words, specific wording works.requests[].max_pages— optional integer, default1, range 1–10; search pages to fetch: page 1 holds 8 media, later pages 20 new media each.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"query": "latte art berlin", "max_pages": 1}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 3, "updated": 0},
"media": {"added": 2, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "birch-falcon-bridge"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_search_hashtags
Find hashtags that exist, with the post count Instagram reports for each (media_count), so you read real tags instead of guessing them. Instagram joins the words of the query, ignores case and #, and returns tags that begin with them: "fitness berlin" finds #fitnessberlin and longer tags that start with it, such as #fitnessberlinmitte, while a longer phrase finds only that exact long tag ("fitness influencer berlin" finds none). Word order and spelling give different tags ("berlin fitness", "fitness münchen", "fitness muenchen" and "fitness munich" are separate), and one broad word returns the biggest tags that start with it, mostly off-niche ("fitness" gives #fitnessmotivation). Use one or two words and search the variants that matter. One page per query, at most 55 tags, in Instagram's order, which is not by size and includes near-empty variants: choose by media_count. Read a tag's posts with instagram_get_hashtag_media.
instagram_search_hashtags(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].query— required string, 1–100 characters; one or two words, matched as the start of a tag.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"query": "vegan wien"}, {"query": "wien vegan"}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 21, "updated": 0}
},
"results": [
{"index": 0, "status": "succeeded", "operation_id": "cedar-heron-meadow"},
{"index": 1, "status": "succeeded", "operation_id": "maple-finch-harbor"}
],
"credits": {"charged_credits": "0.50", "remaining_credits": "99.50", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_hashtag_media
Collect public posts and Reels for a hashtag into the saved research collection, relevance-ranked as the Instagram app shows them. Rows keep Instagram's product_type (clips or reel for Reels). Every call also writes an identity-and-coverage hashtag row for the tag it read.
instagram_get_hashtag_media(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].hashtag— required string, 1–101 characters; hashtag with or without#.requests[].results_limit— optional integer, default25, range 1–10,000; saved posts and Reels, in Instagram's relevance order.requests[].continuation_token— optional string ornull, defaultnull; opaque token up to 524,288 characters, valid for 15 minutes. Reuse only with the same hashtag.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"hashtag": "latteart", "results_limit": 2}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 0},
"media": {"added": 2, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 1, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "cedar-fox-basket"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_related_profiles
Find accounts recommended alongside a seed profile. Without enrichment each suggestion holds identity only (handle, name, private/verified flags, avatar); enrich_profiles runs instagram_get_profile on every suggestion for bio, counts, category, links and published contact, at 0.25 credits each, the same price as looking them up later.
instagram_get_related_profiles(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].profile— required string, 1–200 characters; handle,@handle, or canonical profile URL. Numeric profile IDs are rejected.requests[].max_results— optional integer, default20, range 1–80; trim the recommendation list to this many profiles.requests[].enrich_profiles— optional boolean, defaultfalse; runinstagram_get_profileon each suggestion (bio, counts, contact), 0.25 credits each.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"profile": "example.coffee", "max_results": 2, "enrich_profiles": false}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "hazel-robin-compass"}],
"credits": {"charged_credits": "0.5", "remaining_credits": "99.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_profile
Fetch the full public profile of known accounts: biography, follower/following/media counts, category, external URL and bio links, published email/phone/business address, and private/verified/business flags. Accounts found by search, suggestions or interactions hold identity only until looked up here; enrich_profiles on the search tools runs this same lookup. For more than 50 accounts, or rows chosen in SQL, use instagram_workspace_apply.
instagram_get_profile(profiles: string[], include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.profiles— required array of 1–50 distinct strings; handles, canonical profile URLs, or numeric profile IDs. This tool usesprofiles, notrequests.
Example request
{
"collection_id": "maple-otter-lantern",
"profiles": ["example.coffee"],
"include_rows": true
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 1},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [
{
"index": 0,
"status": "succeeded",
"operation_id": "willow-panda-beacon",
"rows": [
{
"item_id": "5f0c2e9a-6a1d-4c1e-9d1f-0b7f3c2a1e44",
"kind": "account",
"entity_key": "id:1234567",
"status": "discovered",
"reason": "Discovered; not yet reviewed against the brief.",
"created_at": "2026-09-29T12:00:00.000000Z",
"updated_at": "2026-09-29T12:00:00.000000Z",
"id": "1234567",
"account_id": "1234567",
"username": "example.coffee",
"full_name": "Example Coffee",
"biography": "Roastery in Berlin.",
"profile_url": "https://www.instagram.com/example.coffee/",
"category": "Coffee shop",
"follower_count": 18400,
"is_private": false,
"facts": {
"schema_version": 2,
"id": "1234567",
"username": "example.coffee",
"full_name": "Example Coffee",
"follower_count": 18400,
"category": "Coffee shop",
"biography": "Roastery in Berlin."
},
"custom": {},
"judgments": {},
"generations": {}
}
]
}
],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_media
Fetch details for known public posts or Reels, including available captions, counts, coauthors, user tags, and location.
instagram_get_media(media, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.media— required array of 1–50 distinct strings, each 1–500 characters: post/Reel URLs (/p/,/reel/,/reels/), case-sensitive shortcodes, or numeric media IDs. Use one form per media; a URL and the shortcode of the same post are not recognized as duplicates.
Example request
{
"collection_id": "maple-otter-lantern",
"media": ["https://www.instagram.com/p/AbCdEf12345/"]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 1, "updated": 0},
"media": {"added": 1, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "elm-otter-ribbon"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_profile_media
Collect a profile’s feed posts or Reels and save feed-coverage information.
instagram_get_profile_media(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].profile— required string, 1–200 characters; handle,@handle, canonical URL, or numeric profile ID.requests[].media_type— optional string, default"all"; one ofall,posts, orreels.postsfilters Reels out of fetched feed pages.requests[].results_limit— optional integer, default25, range 1–1,000; maximum saved media rows.requests[].max_pages— optional integer, default3, range 1–100; maximum media pages to fetch.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"profile": "example.coffee", "media_type": "all", "results_limit": 2, "max_pages": 1}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 1},
"media": {"added": 2, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "maple-raven-lantern"}],
"credits": {"charged_credits": "0.5", "remaining_credits": "99.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_calculate_profile_metrics
Calculate engagement rate and mean likes, comments, and Reel plays from observations in this research, fetching only missing inputs (one profile lookup and/or one feed page). Engagement rate is 100 × the median likes of the latest 12 dated posts the profile owns or coauthors in the last two calendar months, divided by current followers; a null metric means unavailable, not zero. Metrics and sample information are saved on the account. With include_rows the receipt carries each measured profile's numbers; the sampled posts and the people tagged in them stay in the workspace.
instagram_calculate_profile_metrics(profiles, max_cache_age_seconds=3600, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return one metrics object per measured profile:item_id,username,account_id,follower_count,metrics_status,engagement_rate_pct,engagement_rate_pct_exact,average_likes,average_comments,average_reel_plays,sample_size,window_start,window_endandlatest_post_taken_at. Without it, read the metrics from the workspace.profiles— required array of 1–50 distinct strings, each 1–200 characters; handles, canonical profile URLs, or numeric profile IDs.max_cache_age_seconds— optional integer, default3600, minimum0; maximum age of reusable observations in this research. Zero forces fresh lookups; it does not set a post-publication window.
Example request
{
"collection_id": "maple-otter-lantern",
"profiles": ["example.coffee"],
"max_cache_age_seconds": 0,
"include_rows": true
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 1},
"media": {"added": 12, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [
{
"index": 0,
"status": "succeeded",
"operation_id": "oak-heron-anchor",
"rows": [
{
"item_id": "5f0c2e9a-6a1d-4c1e-9d1f-0b7f3c2a1e44",
"username": "example.coffee",
"account_id": "1234567",
"follower_count": 18400,
"metrics_status": "complete",
"engagement_rate_pct": 2.5,
"engagement_rate_pct_exact": "2.500",
"average_likes": 425.0,
"average_comments": 18.0,
"average_reel_plays": 9100.0,
"sample_size": 12,
"window_start": "2026-07-29T12:00:00Z",
"window_end": "2026-09-29T12:00:00Z",
"latest_post_taken_at": "2026-09-27T17:04:11Z"
}
]
}
],
"credits": {"charged_credits": "0.5", "remaining_credits": "99.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_tagged_media
Collect media from a profile’s Tagged tab (posts and Reels the profile is tagged in, usually owned by others; not a search for @mentions) and save tagged-coverage information.
instagram_get_tagged_media(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].profile— required string, 1–200 characters; handle,@handle, canonical URL, or numeric profile ID.requests[].results_limit— optional integer, default25, range 1–1,000; maximum saved tagged-media rows.requests[].max_pages— optional integer, default3, range 1–100; maximum Tagged-tab pages to fetch.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"profile": "example.coffee", "results_limit": 2, "max_pages": 1}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 1},
"media": {"added": 2, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "pine-lynx-mirror"}],
"credits": {"charged_credits": "0.5", "remaining_credits": "99.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_comments
Collect visible comments, newest first, and optional replies on a post or Reel as saved activity records: text, time, likes on the comment, declared reply count, and the author's handle, name, verified flag and avatar. Authors' bio, follower counts and contact are not delivered; apply instagram_get_profile to them with instagram_workspace_apply (0.25 credits per person). A media's declared comment_count can exceed what Instagram serves; provider_has_more: false in the operation coverage means there is nothing more to fetch.
instagram_get_comments(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].media— required string, 1–500 characters; post/Reel URL, shortcode, or numeric media ID.requests[].results_limit— optional integer, default25, range 1–1,000; top-level comment limit.requests[].include_replies— optional boolean, defaultfalse; fetch replies to the selected comments.requests[].replies_limit— optional integer, default25, range 0–1,000; total reply limit across threads. Zero skips reply fetching. When replies are enabled and this is positive,max_pages + results_limit + replies_limitmust be ≤500.requests[].max_pages— optional integer, default3, range 1–100; top-level comment-page limit (about 15 comments per page, so the default yields about 45 and capsresults_limit); not a reply-page or credit cap.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [
{
"media": "https://www.instagram.com/p/AbCdEf12345/",
"results_limit": 2,
"include_replies": false,
"max_pages": 1
}
]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 2, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "fern-marten-spark"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_likers
Collect the available visible-liker list for a post or Reel as saved like activity: each liker's handle, name, private/verified flags and avatar. This is Instagram's visible subset from one fetch, not the full like count; total_like_count and available_liker_count in the operation coverage show what is missing. Like time, bio, counts and contact are not delivered; apply instagram_get_profile to the likers with instagram_workspace_apply (0.25 credits per person).
instagram_get_likers(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].source— required string, 1–300 characters; public post/Reel URL or case-sensitive shortcode. Numeric media IDs are not accepted.requests[].results_limit— optional integer, default25, range 1–3,000; limit the rows saved from the single fetched list.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"source": "https://www.instagram.com/p/AbCdEf12345/", "results_limit": 2}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 2, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "moss-wren-kettle"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_followers
Collect observed followers as saved relationship activity, following pagination when available: each follower's handle, name, private/verified flags and avatar. Follow date, bio, counts and contact are not delivered; apply instagram_get_profile to the followers with instagram_workspace_apply (0.25 credits per person).
instagram_get_followers(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].account— required string, 1–30 characters; plain handle (letters, digits,.,_) without@. URLs and numeric profile IDs are rejected.requests[].results_limit— optional integer, default25, range 1–20,000; maximum saved relationship rows.requests[].continuation_token— optional string ornull, defaultnull; opaque token up to 4,096 characters: thenext_continuation_tokenfrom the previous call's operation-row coverage for the same account, valid for 24 hours.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"account": "example.coffee", "results_limit": 2}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 1},
"media": {"added": 0, "updated": 0},
"activity": {"added": 2, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "ivy-beaver-sail"}],
"credits": {"charged_credits": "0.5", "remaining_credits": "99.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_following
Collect observed accounts followed by a profile as saved relationship activity, following pagination when available: each followed account's handle, name, private/verified flags and avatar. Follow date, bio, counts and contact are not delivered; apply instagram_get_profile to them with instagram_workspace_apply (0.25 credits per person).
instagram_get_following(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].account— required string, 1–30 characters; plain handle (letters, digits,.,_) without@. URLs and numeric profile IDs are rejected.requests[].results_limit— optional integer, default25, range 1–20,000; maximum saved relationship rows.requests[].continuation_token— optional string ornull, defaultnull; opaque token up to 4,096 characters: thenext_continuation_tokenfrom the previous call's operation-row coverage for the same account, valid for 24 hours.
Example request
{
"collection_id": "maple-otter-lantern",
"requests": [{"account": "example.coffee", "results_limit": 2}]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 2, "updated": 1},
"media": {"added": 0, "updated": 0},
"activity": {"added": 2, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "reed-wolf-button"}],
"credits": {"charged_credits": "0.5", "remaining_credits": "99.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_search_locations
Find candidate Instagram places by name and save returned place facts without buying separate detail lookups. A matching name is not proof of a matching city; check the acquired place facts before using its media as local evidence.
instagram_search_locations(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].query— required string, 1–200 characters; non-empty place-name search, not coordinates.requests[].results_limit— optional integer, default25, range 1–1,000; maximum saved candidate places.
Example request
{"requests": [{"query": "Austin coffee", "results_limit": 2}]}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 2, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "coral-penguin-bell"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.75", "as_of_utc": "2026-10-05T12:00:00+00:00"}
}
instagram_get_location
Look up returned facts for one known Instagram location ID or location URL. This saves a Place row; it does not fetch location media or synthesize a map or image.
instagram_get_location(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].location— required string, 1–512 characters; numeric location ID or Instagram/explore/locations/<id>/URL.
Example request
{"collection_id": "maple-otter-lantern", "requests": [{"location": "123456789"}]}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 0},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 1},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "amber-turtle-key"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.5", "as_of_utc": "2026-10-05T12:00:00+00:00"}
}
instagram_get_location_media
Collect posts and Reels from one place's recent or top stream, without automatically buying place details or full owner profiles. Page coverage includes pages_completed and, when available, next_continuation_token.
instagram_get_location_media(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].location— required string, 1–512 characters; numeric location ID or Instagram location URL.requests[].stream— optional string, default"recent";"recent"or"top", one stream per request.requests[].results_limit— optional integer, default25, range 1–1,000; maximum saved media rows.requests[].max_pages— optional integer, default1, range 1–10; page-fetch bound for this call.requests[].continuation_token— optional string ornull, defaultnull; opaque token up to 360,000 characters, valid for 15 minutes. Reuse only with the same normalized location and stream.
Example request
{"collection_id": "maple-otter-lantern", "requests": [{"location": "123456789", "stream": "recent", "results_limit": 2, "max_pages": 1}]}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 1, "updated": 0},
"media": {"added": 2, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 1},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "pearl-dolphin-cloud"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "99.25", "as_of_utc": "2026-10-05T12:00:00+00:00"}
}
instagram_get_stories
Snapshot one profile's active Story tray or look up one known Story. An empty or unavailable tray is not proof of inactivity: coverage records outcome and expired_count. Facts and evidence remain saved after Story expiry, but media URLs are temporary and cached images do not establish that a Story is still active.
instagram_get_stories(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects; each must select exactly one ofprofileorstory.requests[].profile— optional string ornull, defaultnull, 1–200 characters; handle, canonical profile URL, or numeric profile ID for an active tray.requests[].story— optional string ornull, defaultnull, 1–2,048 characters; known numeric Story ID,<story_id>_<owner_id>, or Instagram Story URL.requests[].results_limit— optional integer, default25, range 1–100; maximum saved Stories. No automatic profile, place, or media enrichment.
Example request
{"collection_id": "maple-otter-lantern", "requests": [{"profile": "example.coffee", "results_limit": 2}]}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 1},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 2, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "violet-sparrow-drum"}],
"credits": {"charged_credits": "0.75", "remaining_credits": "98.5", "as_of_utc": "2026-10-05T12:00:00+00:00"}
}
instagram_get_highlights
List one profile's Highlight collections with acquired titles, covers, and declared counts. Listing never expands saved Stories; select a collection before calling instagram_get_highlight_stories. An unavailable list, including a not-found response, is not proof that the profile has no Highlights.
instagram_get_highlights(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].profile— required string, 1–200 characters; handle, canonical profile URL, or numeric profile ID.requests[].max_pages— optional integer, default1, range 1–10; list-page bound per segment. It may change on continuation.requests[].continuation_token— optional string ornull, defaultnull; opaqueh1.token up to 3,000,000 characters, valid for 15 minutes. Reuse only with the same normalized profile; this tool lists metadata, without Story expansion.
Coverage records pages_completed and provider_has_more. Retrieve facts.coverage.<execution_id>.next_continuation_token from the saved operation row using instagram_workspace_query; it is not copied into account facts or automatically resumed. Otherwise coverage provides continuation_unavailable_reason; provider_has_more alone does not promise a usable token.
Example request
{"collection_id": "maple-otter-lantern", "requests": [{"profile": "example.coffee", "max_pages": 1}]}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 1},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 2, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "clover-rabbit-feather"}],
"credits": {"charged_credits": "0.75", "remaining_credits": "97.75", "as_of_utc": "2026-10-05T12:00:00+00:00"}
}
instagram_get_highlight_stories
Acquire the saved Stories in one selected Highlight, retaining the collection metadata and Story memberships. Coverage records declared_item_count and expansion_status; the declared count is not a guarantee of that many delivered Stories. Saved Story facts and evidence remain in research, while image URLs and disposable cached previews may become unavailable.
instagram_get_highlight_stories(requests, include_rows=false, collection_id=null) -> AcquisitionReceipt
Parameters
collection_id— optional string, defaultnull; existing owned three-word collection ID (≤36 characters). Omit to create a collection.include_rows— optional boolean, defaultfalse; return each input's stored rows when the whole call fits one query result (2,000 rows / 2 MB), otherwise query the collection. Inline rows omit server-owned bookkeeping and null promoted columns.requests— required array of 1–50 distinct request objects.requests[].highlight— required string, 1–512 characters; numeric Highlight ID,highlight:<id>, or Instagram/stories/highlights/<id>/URL. No automatic owner, place, or media enrichment.
Example request
{"collection_id": "maple-otter-lantern", "requests": [{"highlight": "highlight:17890000000000000"}]}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"changes": {
"accounts": {"added": 0, "updated": 1},
"media": {"added": 0, "updated": 0},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 3, "updated": 0},
"highlights": {"added": 0, "updated": 1},
"hashtags": {"added": 0, "updated": 0}
},
"results": [{"index": 0, "status": "succeeded", "operation_id": "olive-koala-cup"}],
"credits": {"charged_credits": "0.25", "remaining_credits": "97.5", "as_of_utc": "2026-10-05T12:00:00+00:00"}
}
Saved research and account tools
instagram_workspace_query
Read, filter, and aggregate saved research with owner- and collection-scoped PostgreSQL queries.
After a failed query or the shared 15-second budget, every later query is not_started.
instagram_workspace_query(collection_id: string, queries) -> WorkspaceQueryResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).queries— required array of 1–50 query objects.queries[].sql— required string, 1–20,000 characters; one read-onlySELECTagainstresearch_items. Writes, locks, schema-qualified tables, and unsafe functions are rejected. A page holds at most 2,000 rows and 2,000,000 result bytes, cut at a row boundary;truncated: truemeans more rows matched. With a top-levelORDER BYthat ends in a unique column (for exampleitem_id), a truncated result carriesnext_cursor; without one it carries anoteinstead. A single row over 2,000,000 bytes fails the query, so later queries in the batch arenot_started. Up to 10 seconds per statement and 15 seconds for the batch. Rows come back as objects keyed by output column name, so two output columns with the same name fail the query.numericvalues are JSON numbers (integers when whole,nullfor NaN/Infinity) and timestamps are ISO-8601 UTC text.queries[].parameters— optional array, default[]; positional values for$1,$2, … placeholders.queries[].cursor— optional string, 1–512 characters; thenext_cursorof the previous page, sent with the exact samesqlandparameters. A cursor for different SQL or parameters fails, and so does any cursor once the collection has changed; start again without it.
Example request
{
"collection_id": "maple-otter-lantern",
"queries": [
{
"sql": "SELECT username, follower_count, public_email FROM research_items WHERE kind = 'account' AND follower_count >= $1 ORDER BY follower_count DESC, username LIMIT 20",
"parameters": [1000]
}
]
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"results": [
{
"index": 0,
"status": "succeeded",
"rows": [{"username": "example.coffee", "follower_count": 12500, "public_email": null}],
"row_count": 1,
"truncated": false,
"command": "SELECT"
}
],
"credits": {"charged_credits": "0", "remaining_credits": "100", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_workspace_export
Build one Excel workbook from saved research and get a download link instead of rows.
Available to external MCP clients only. Each entry of sheets is one read-only query written to its own worksheet, in order, and every sheet reads the same snapshot of the collection. The file is built and stored on the server, so no rows enter the conversation: give the person the download_url. Anyone holding the link can download the file until expires_at, 24 hours after the call; nothing about it requires a sign-in. If any sheet fails, the export is refused whole and nothing is stored.
instagram_workspace_export(collection_id: string, sheets, filename=null) -> WorkspaceExportResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).filename— optional string, 1–80 characters; file name without extension. Characters other than letters, digits,.,-and_become-. Defaultinstagram-<collection_id>-r<revision>.sheets— required array of 1–20 sheet objects. Names must be unique ignoring case.sheets[].name— required string, 1–31 characters; the worksheet tab. It cannot contain[ ] : * ? / \, start or end with an apostrophe, or beHistory.sheets[].sql— required string, 1–20,000 characters; one read-onlySELECTagainstresearch_items, with the same rules asinstagram_workspace_query. Output column names must be unique.sheets[].parameters— optional array, default[]; positional values for$1,$2, … placeholders.sheets[].title— optional string, 1–255 characters; a bold line above the table.sheets[].note— optional string, 1–1,000 characters; a plain line under it.sheets[].header_row— optional boolean, defaulttrue. Withfalse,headers,freeze_header: trueandautofilter: trueare refused.sheets[].headers— optional object, output column → header label (1–255 characters); other columns keep their names.sheets[].column_formats— optional object, output column →integer(#,##0),decimal(#,##0.00),percent(0.0%; the value is a fraction, so0.12shows as 12.0%),date(yyyy-mm-dd),datetime(yyyy-mm-dd hh:mm, UTC), ortext(keeps long numeric ids exact). Text that does not parse as a date stays as written.sheets[].column_widths— optional object, output column → width 4–100 characters; other columns are sized from their first rows.sheets[].freeze_header— optional boolean; keeps the header row visible while scrolling, on by default with a header row.sheets[].freeze_columns— optional integer 0–3, default0; leading columns kept visible.sheets[].autofilter— optional boolean; filter dropdowns on the header row, on by default with a header row.
Columns named in headers, column_formats or column_widths must be output columns of that sheet's query; a misnamed column refuses the export before any row is read. Each statement runs for at most 30 seconds. There is no row, file-size or per-account export limit: the only size refusal is a sheet over Excel's 1,048,576 rows, which refuses the export with a message to split that sheet's rows across several sheets (for example with WHERE or LIMIT/OFFSET). Cells keep text that looks like a formula as text; http(s) URLs become links (at most 65,530 per workbook, after which they stay plain text). A cell longer than Excel's 32,767 characters is shortened and ends with a visible marker ( … [shortened: <shown> of <total> characters]); each shortened cell is listed on an Export notes sheet after your sheets (named Export notes (2), Export notes (3), … if one of your sheets already has that name, ignoring case), and the result's shortened_cells counts them. Read such a column in full with instagram_workspace_query. Exports take none of the account's 3 concurrent slots and may run side by side; when the server is busy, an export waits its turn before it starts building.
Example request
{
"collection_id": "maple-otter-lantern",
"filename": "berlin-coffee-shortlist",
"sheets": [
{
"name": "Accounts",
"title": "Berlin coffee shortlist",
"sql": "SELECT username, full_name, follower_count, facts->'metrics'->>'engagement_rate' AS engagement_rate, profile_url FROM research_items WHERE kind = 'account' AND status = 'qualified' ORDER BY follower_count DESC",
"headers": {"username": "Handle", "follower_count": "Followers", "engagement_rate": "Engagement"},
"column_formats": {"follower_count": "integer", "engagement_rate": "percent"},
"freeze_columns": 1
},
{
"name": "Recent posts",
"sql": "SELECT owner_username AS username, taken_at, like_count, url FROM research_items WHERE kind = 'media' ORDER BY owner_username, taken_at DESC",
"column_formats": {"taken_at": "date", "like_count": "integer"}
}
]
}
Example result
{
"collection_id": "maple-otter-lantern",
"revision": 57,
"filename": "berlin-coffee-shortlist.xlsx",
"byte_count": 48213,
"sha256": "9f2c1e0b7d6a4c3b2a1908f7e6d5c4b3a29180f7e6d5c4b3a2918070f6e5d4c3",
"download_url": "https://publicsignallabs.com/api/exports/k3J9xQ2mV8pL0sT7yW4zR1nB6cD5fG2hJ8kL3mN9pQ0",
"expires_at": "2026-09-30T12:00:00Z",
"sheets": [
{"name": "Accounts", "row_count": 25, "columns": ["username", "full_name", "follower_count", "engagement_rate", "profile_url"]},
{"name": "Recent posts", "row_count": 150, "columns": ["username", "taken_at", "like_count", "url"]}
],
"shortened_cells": 0,
"credits": {"charged_credits": "0", "remaining_credits": "100", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_get_account_status
Check your current spendable credit balance and obtain an upgrade link when the balance is low.
instagram_get_account_status() -> AccountStatusResult
Parameters
- No parameters; send an empty object
{}.
Example request
{}
Example result
{
"credits": {"charged_credits": "0", "remaining_credits": "100", "as_of_utc": "2026-09-29T12:00:00+00:00"},
"upgrade_url": null
}
instagram_workspace_write
Atomically write saved account decisions and reasons, and customer-visible custom fields on any saved row. It is the only SQL write; instagram_qualify_accounts writes status and reason itself for the accounts it judges. To change its verdicts, run it again with revised criteria; overwrite them here only to record a fact it cannot see, saying so in the reason.
A SQL NULL patch cell leaves that column unchanged. A non-null status still requires a reason in the same row; custom merges at the top level, and a null value inside it is stored, not deleted. There is no row limit; a repeated item_id or a reason over 16 KB refuses the write and nothing is written. One write runs for at most 60 seconds.
instagram_workspace_write(collection_id: string, query, parameters=[]) -> WorkspaceWriteResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).query— required nonempty string; a read-onlySELECTwithitem_idfirst, then columns aliased exactlystatus,reason, orcustom.customworks on every kind except operation rows (accounts, media, activity, places, stories, highlights and hashtags);statusandreasonon accounts only. Status isdiscovered,under_review,qualified, ordisqualified; an explicit status needs a reason in the same row.customis a JSON object whose top-level keys merge, with supplied nested values replacing their subtrees.parameters— optional array, default[]; positional SQL values.
Example request
{
"collection_id": "maple-otter-lantern",
"query": "SELECT item_id, 'under_review' AS status, 'Needs manual review of recent content.' AS reason FROM research_items WHERE kind = 'account' AND username = $1",
"parameters": ["example.coffee"]
}
Publishing generated fields is an ordinary write:
SELECT item_id,
(SELECT jsonb_object_agg(f.key, f.value->'value')
FROM jsonb_each(generations->'profile_summary'->'fields') AS f) AS custom
FROM research_items WHERE kind = 'account' AND generations ? 'profile_summary'
Example result
{
"collection_id": "maple-otter-lantern",
"matched": 1,
"updated": 1,
"status_counts": {"under_review": 1},
"credits": {"charged_credits": "0", "remaining_credits": "100", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_workspace_apply
Run one acquisition tool once for every row of a saved-research query.
Each column is named exactly like one of the applied tool's input fields: the target (profile, account, media, source, location, story, highlight, query, hashtag) and any per-input option (results_limit, media_type, max_pages, continuation_token, …). instagram_get_profile and instagram_calculate_profile_metrics take a profile column, instagram_get_media a media column. A NULL cell means the tool default. Nothing is inferred from the row, so any stored value can feed any tool; a numeric account ID skips the 0.25-credit handle resolution of the tools that take one (instagram_get_profile_media, instagram_get_tagged_media, instagram_get_stories, instagram_get_highlights), while instagram_get_followers and instagram_get_following accept only plain handles and resolve them except on resumed segments (instagram_get_profile costs 0.25 per profile either way). Every row is checked by the tool's own input rules first: an unknown column, an invalid value, or a duplicate input (after normalization, @Alice equals alice) refuses the whole call before anything is charged. There is no row limit; inputs run in batches of 50, one after another. Empty selections return status: "empty" without a charge; otherwise status is succeeded when every input completed, partial when some input yielded data, or failed. issues lists up to 50 failed or partial inputs, and when the balance refuses a batch no further batch starts and upgrade_url is returned.
instagram_workspace_apply(collection_id: string, tool, query, parameters=[], include_rows=false, max_cache_age_seconds=null, max_credits=null) -> WorkspaceApplyResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).tool— required string; any acquisition tool, frominstagram_search_accountstoinstagram_get_highlight_stories.query— required nonempty string; a read-onlySELECTwhose rows are the tool's inputs.parameters— optional array, default[]; positional SQL values.include_rows— optional boolean, defaultfalse; return the stored rows when they fit one query result (2,000 rows / 2 MB).max_cache_age_seconds— optional integer, defaultnull(the tool's own default), minimum0; accepted only withtool: "instagram_calculate_profile_metrics", and any other tool refuses the call.max_credits— optional positive number; no further batch starts once this call has been charged that much (a running batch can go over by its own cost).
Example request
{
"collection_id": "maple-otter-lantern",
"tool": "instagram_get_profile_media",
"query": "SELECT coalesce(account_id, username) AS profile, 12 AS results_limit FROM research_items WHERE kind = 'account' AND status = 'qualified'",
"max_credits": 20
}
Example result
{
"collection_id": "maple-otter-lantern",
"status": "partial",
"changes": {
"accounts": {"added": 0, "updated": 3},
"media": {"added": 34, "updated": 2},
"activity": {"added": 0, "updated": 0},
"places": {"added": 0, "updated": 0},
"stories": {"added": 0, "updated": 0},
"highlights": {"added": 0, "updated": 0},
"hashtags": {"added": 0, "updated": 0}
},
"inputs": 3,
"not_started": 0,
"issues": [{"input": "example.private", "status": "failed", "operation_id": "walnut-swan-chest", "error": "The profile is private."}],
"credits": {"charged_credits": "1.5", "remaining_credits": "98.5", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_workspace_decision_model
Judge saved rows with TypeSafe's Jev 1.14 decision model (typesafe/jev-1.14) and save the typed answers under judgments -> label -> answers. Use it for screens and for judging posts, comments and other rows; account verdicts belong to instagram_qualify_accounts.
Jev is a decision model, not a chat model: for each row it reads one JSON state, {brief, <kind>: the selected columns}, plus the questions, and returns option keys with probabilities. It writes no text and no explanations, and sees nothing but that state. It is the cheap way to screen many rows: about 0.005–0.008 credits per row, 16 rows at a time, each answer with a probability that SQL can threshold. The SELECT returns item_id first and aliased evidence columns, at most 40 KB per row; any kind but operation rows can be judged. There is no row limit; the selecting read is bounded at 8 MiB, and a duplicate item_id refuses the call before any model call. An empty match is a zero-row result. Answers never change status, reason or custom. A repeated label replaces the whole stored entry on every row that got at least one answer (answered or partial); rows with no usable answer keep their earlier answers. Rows are stored and model charges settled as they finish, so a stopped sweep keeps completed work and resumes by selecting the rows still without the label.
instagram_workspace_decision_model(collection_id: string, label, query, brief, questions, parameters=[], include_rows=false, max_credits=null) -> WorkspaceDecisionModelResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).label— required string, 3–40 characters, matching^[A-Za-z][A-Za-z0-9_]*$; key for the saved judgment sweep.query— required nonempty string; a read-onlySELECTwithitem_idfirst, followed by aliased evidence columns.brief— required string, 1–4,000 characters; evaluation context and requirements.questions— required object with 1–6 named question specifications; each name uses only letters, digits, and underscores.questions.<name>.type— required string;noulfor a boolean-style judgment with probability,choicefor named options, orscorefor ordered levels.questions.<name>.instructions— required string, 1–600 characters; what to evaluate.questions.<name>.criteria— default{};choicerequires 2–8 option-name-to-meaning entries;scorerequires 2–8 ordered level-name-to-meaning entries, lowest first;nouloptionally accepts meanings keyed bytrue/false; every key and meaning must be non-blank.parameters— optional array, default[]; positional SQL values.include_rows— optional boolean, defaultfalse; return each row's stored answers when they fit one query result (2,000 rows / 2 MB).max_credits— optional number; no further row starts once this call has been charged that much (rows already running finish).
Example request
{
"collection_id": "maple-otter-lantern",
"label": "coffee_fit",
"query": "SELECT item_id, biography FROM research_items WHERE kind = 'account' AND username = $1",
"parameters": ["example.coffee"],
"brief": "Identify accounts that focus on coffee.",
"questions": {"coffee": {"type": "noul", "instructions": "Does the biography indicate a focus on coffee?"}},
"include_rows": true
}
Example result
{
"collection_id": "maple-otter-lantern",
"label": "coffee_fit",
"model": "typesafe/jev-1.14",
"matched": 1,
"answered": 1,
"partial": 0,
"failed": 0,
"not_started": 0,
"questions": {"coffee": {"true": 1}},
"issues": [],
"rows": [{"item_id": "c2d6c0d4-5d1e-4c55-9d43-6f1f0b8a7e21", "status": "answered", "answers": {"coffee": {"value": true, "noul": 0.93}}}],
"credits": {"charged_credits": "0.006", "remaining_credits": "99.994", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_qualify_accounts
Decide which saved accounts qualify, write the verdict to status and reason, and save the answer under judgments -> label.
Each account gets one question against one qualification text (criteria). The model chooses qualified (the evidence shows the account meets every part of the text), disqualified (the evidence shows it fails at least one part) or under_review (the evidence in this mode does not show it: missing, ambiguous or conflicting). evidence sets the mode, which is what the model sees: profile (bio, category, stated city and address, counts, links and contact flags), posts (adds the recent_posts newest posts: captions, dates, types, places and engagement) or images (adds the profile picture and the post images, downloaded from Instagram's CDN for each judgment). Profiles up to 30 days and posts up to 7 days old are reused; anything missing is bought at the acquisition tools' prices. TypeSafe's Jev 1.14 (typesafe/jev-1.14) judges without images, Google's Gemini Decision 1 (google/gemini-decision-1) with them. When nothing is stored yet, an account typically costs about 0.26 credits in profile mode, 0.51 in posts and 0.64 in images. The status is qualified when p(qualified) is at least min_confidence, disqualified when p(disqualified) is, and under_review otherwise. A missing, private or unreadable account is under_review without a model call. With images missing, a disqualified answer stands only when the text alone (profile and captions, asked once more without images for about 0.005 credits) also disqualifies; otherwise it is under_review, since a missing image could have been the one that qualifies. Evidence a mode lacks is never a failure, so the cheapest mode can run over all candidates first and a richer mode over its under_review rows. The reason names the verdict, mode and probability, for example "Qualified (images, p 0.93)", "Under review (posts, leaning qualified, p 0.62)" or "Under review (images, account private)", with ", 2 of 7 images unavailable" added inside the parentheses when images were missing, and whether the text alone also disqualifies when it was asked. judgments -> label holds verdict, probabilities (qualified, disqualified, under_review; null when settled without the model), text_check (the text-only answer, when one was asked), mode, model, criteria_hash, min_confidence, recent_posts, evidence (posts, images_judged, images_unavailable, profile_observed_at), note, judged_at and status. Accounts already judged under the label with the same criteria, evidence, min_confidence and recent_posts are skipped, so a stopped call resumes by running it again; any change judges them again. A failed lookup or model request leaves its account unchanged and listed in issues. custom is never touched.
instagram_qualify_accounts(collection_id: string, label, query, criteria, evidence, parameters=[], min_confidence=0.8, recent_posts=7, include_rows=false, max_credits=null) -> QualifyAccountsResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).label— required string, 3–40 characters, matching^[A-Za-z][A-Za-z0-9_]*$; key for the saved verdicts underjudgments.query— required nonempty string; a read-onlySELECTreturning only theitem_idof account rows. Another column, a non-account row or a repeateditem_idrefuses the call before anything is charged.criteria— required string, 1–2,000 characters; one text of what a qualified account is, in the caller's words: every requirement with its boundary cases and counts ("on camera in at least 3 of the 7 newest posts").evidence— required string;profile,postsorimages, the mode that sets what the model sees.parameters— optional array, default[]; positional SQL values.min_confidence— optional number above 0.5 and at most 0.99, default0.8; the probability aqualifiedordisqualifiedanswer needs.recent_posts— optional integer 3–12, default7; the newest posts thepostsandimagesmodes use.include_rows— optional boolean, defaultfalse; return each account's stored result when they fit one query result (2,000 rows / 2 MB).max_credits— optional positive number; data and model cost together. An account starts only while the charges so far plus the accounts in progress, each at its mode's typical price, stay within it.
Example request
The images pass over what a profile pass under the same label left open:
{
"collection_id": "maple-otter-lantern",
"label": "qualify",
"query": "SELECT item_id FROM research_items WHERE kind = 'account' AND status = 'under_review' AND judgments->'qualify'->>'mode' = 'profile'",
"criteria": "One food creator posting as themselves (not a restaurant, brand, magazine, agency, couple or group page), based in Vienna itself (a nearby town or a visit does not count), and visible on camera in at least 3 of their 7 newest posts.",
"evidence": "images",
"max_credits": 20
}
Example result
{
"collection_id": "maple-otter-lantern",
"label": "qualify",
"matched": 12,
"judged": 12,
"skipped": 0,
"failed": 0,
"not_started": 0,
"verdicts": {"qualified": 6, "disqualified": 3, "under_review": 3},
"fetched": {"profiles": 0, "post_fetches": 12, "images_judged": 94, "images_unavailable": 2},
"data_credits": "3",
"model_credits": "1.68",
"issues": [],
"credits": {"charged_credits": "4.68", "remaining_credits": "95.32", "as_of_utc": "2026-11-30T12:00:00+00:00"}
}
instagram_workspace_llm
Write structured content for saved rows with Z.ai's GLM 5.3 Flash language model (z-ai/glm-5.3-flash) and store it under generations -> label -> fields. This creates content; it does not send messages or perform outreach.
Each row is one independent request: a fixed system prompt (use only facts in the state, null when unsupported, finished text without placeholders, no shared template) and one user message holding {brief, <kind>: the selected columns}. The reply is forced into a strict JSON schema built from the declared fields, at temperature 0.6 and low reasoning effort, with no output-length cap. Length is not enforced: state the length you want in the field's instructions or the brief (for example "one sentence" or "under 140 characters") and check median_chars. The model has no tools, no web access and no memory of other rows, but it can draw on its training, so review the output before publishing. Select item_id first and aliased evidence columns, at most 40 KB per row; there is no row limit, the selecting read is bounded at 8 MiB, and a duplicate item_id refuses the call before any model call. Invalid output triggers at most one additional billed request rewriting the entire row, then rejected values are dropped. Any {…} or […] span counts as a placeholder, as do TODO/TBD and similar unfinished text. A placeholder, a trailing ellipsis, invalid numeric values and malformed JSON can trigger this rewrite; null required fields only mark the row partial and do not trigger retry. Completed rows and settled model spend are retained on a stop. Output stays in generations until published with instagram_workspace_write. The result reports fields.<name> as filled/null counts (plus median_chars for text), and similarity.<name> as median_pairwise, max_pairwise, and near_duplicate_rows for text fields with at least two values; median_pairwise near 1 means one template. Check the returned rows and similarity before publishing.
instagram_workspace_llm(collection_id: string, label, query, brief, fields, parameters=[], include_rows=false, max_credits=null) -> WorkspaceLlmResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).label— required string, 3–40 characters, matching^[A-Za-z][A-Za-z0-9_]*$; reusing a label replaces output only on rows that produce output.query— required nonempty string; a read-onlySELECTwithitem_idfirst and readable aliases for evidence columns.brief— required string, 1–4,000 characters; context, voice, and requirements.fields— required object with 1–6 named field specifications; each name uses only letters, digits, and underscores.fields.<name>.type— required string;text,number,integer, orlist.fields.<name>.instructions— required string, 1–600 characters; what the field should contain.fields.<name>.required— optional boolean, defaulttrue; a null value marks the row partial, without retry. Every field can return null when evidence is insufficient.fields.<name>.minimum,fields.<name>.maximum— optional numeric bounds fornumberorinteger.parameters— optional array, default[]; positional SQL values.include_rows— optional boolean, defaultfalse; return each row's stored fields when they fit one query result (2,000 rows / 2 MB).max_credits— optional number; no further row starts once this call has been charged that much (rows already running finish).
Example request
{
"collection_id": "maple-otter-lantern",
"label": "profile_summary",
"query": "SELECT item_id, biography FROM research_items WHERE kind = 'account' AND username = $1",
"parameters": ["example.coffee"],
"brief": "Write a short factual summary using only the biography.",
"fields": {
"summary": {"type": "text", "instructions": "Summarize the account in one short sentence."}
}
}
Example result
{
"collection_id": "maple-otter-lantern",
"label": "profile_summary",
"model": "z-ai/glm-5.3-flash",
"matched": 1,
"generated": 1,
"partial": 0,
"failed": 0,
"not_started": 0,
"fields": {"summary": {"filled": 1, "null": 0, "median_chars": 22}},
"similarity": {},
"issues": [],
"credits": {"charged_credits": "0.03", "remaining_credits": "99.97", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
Programs and runs
Every call, on every tool, answers within about 10 seconds. A call that finishes in time returns its normal result. A call that needs longer keeps running as a run and answers with a receipt instead: status: "running" with a run_id, the tool, started_at, the latest progress the work reported (for example inputs, done and charged_credits of an apply), credits with what the run has been charged so far, and a hint. status running (or aborting) together with a run_id means the work has started, not finished. Watch the run_id with instagram_watch_run until it returns the tool's normal result. A program (instagram_run_code) is always a run; its receipt is its running report. A call whose client disconnects keeps running and can be found with instagram_list_runs. Results of finished runs can be watched again for 7 days; the work a run stored stays in the workspace. Runs live in the MCP server process: a run still active when the server restarts ends failed with stop_reason: "restart" and its last progress.
A stopped run ends with its tool's normal result, never an empty one. An acquisition call keeps what its started inputs fetched (coverage stop_reason: "stopped", unstarted inputs not_started). instagram_workspace_apply starts no further batch: the batch in flight keeps its rows, the remaining inputs count in not_started, and the result is partial. The model tools start no further row or account and keep the ones already settled. Each of these results then carries stop_reason with the run's reason (aborted, turn_end, shutdown). A model cost that is not confirmed yet never stops a model tool: its result says billing_pending: true and the remaining rows or accounts still run. instagram_qualify_accounts reports an account whose model request failed in issues, leaves it unchanged and goes on; after three such accounts in a row it starts no more (stop_reason: "model_unavailable"), and running the same call again later resumes.
Example receipt:
{
"run_id": "amber-heron-quartz",
"tool": "instagram_workspace_apply",
"status": "running",
"started_at": "2026-09-29T12:00:00+00:00",
"progress": {"inputs": 600, "done": 150, "succeeded": 148, "partial": 0, "failed": 2, "not_started": 450, "charged_credits": "37.5"},
"credits": {"charged_credits": "37.5", "remaining_credits": "62.5", "as_of_utc": "2026-09-29T12:00:10+00:00"},
"hint": "Still running: call instagram_watch_run with this run_id for the result."
}
instagram_run_code
Run restricted Python against the saved collection, returning the last expression. The call answers within 10 seconds: with the finished report, or with the running report (status: "running" and its run_id) to follow with instagram_watch_run or stop with instagram_abort_run; programs run at most 5 minutes, with at most 2 active per account. Program reports include settled acquisition and model-sweep spend in credits.charged_credits, the current balance, and the latest 25 events oldest first; skipped_events counts older events. Acquisitions report status, charge and the non-zero changes; writes report counts (model sweeps also report settled spend); acquisitions over more than 50 inputs also report one progress event per batch; sql and instagram_get_account_status calls leave no event; event data is kept up to 4 KB, then becomes cut-off text. Compare event sequence numbers because watches repeat events. Starting a program holds one of the account's 3 concurrent slots shared with instagram_workspace_query and instagram_workspace_write until the program has started; a call that cannot get one within 20 seconds fails with "This account already has 3 research queries, writes or program starts in flight". If no sandbox worker frees up within 15 seconds, the run ends failed with "All sandbox workers are busy; retry in a few seconds."
Every research tool except instagram_get_guidance, instagram_run_code and the three run tools is an async function of its exact MCP name with the same arguments except collection_id; no short aliases exist. Inside a program a tool's list argument (requests, profiles or media) takes any length: pass the whole list to one call, and the helper runs it in sequential batches of 50 and returns one receipt for all of it, with index counted across the whole list; each item still passes the tool's own rules, duplicates across the whole list refuse the call before anything is charged, and max_credits is checked before each batch. The helpers are await sql(query, parameters=None) -> list[dict] (free SELECT; parameters is a list with one entry per placeholder, and a query error raises ValueError), await checkpoint(label, data=None) -> float (records an event, label kept to 200 characters, and returns the remaining credit balance), and to_json(value) -> str (json.dumps(value, default=str)). Inside programs instagram_get_account_status() also returns collection_id, and credit amounts are decimal strings. Programs may import json, re, math, datetime, itertools, collections, functools and asyncio (gather and run only). Generator expressions work; unsupported Python includes yield, del, match, datetime.now(), asyncio.sleep/Semaphore, % formatting, class inheritance and custom exceptions, and json.dumps has no default= (use to_json). There is no file, network or environment access. An error names the failing line: a tool, sql or checkpoint call that refused (an invalid argument, a failed query, a stop) reads line N: Type: message, and an argument error names the tool, the field and the broken limit with the value, for example line 3: ValueError: instagram_get_profile_media: requests[0].results_limit: at most 1000, got 5000; any other error returns a traceback with long source lines cut. Variables persist best-effort only within hosted conversations; external callers get a fresh session each run. Below 1 credit, the next paid call aborts the whole program. Independent calls gathered with asyncio.gather are queued at once and provider requests are paced service-wide; await in sequence only what depends on an earlier result.
instagram_run_code(collection_id: string, code, max_credits=null) -> ScratchpadResult
Parameters
collection_id— required string; existing owned three-word collection ID (≤36 characters).code— required string, 1–64,000 characters; Python program using documented workspace helpers.sql()returns every row of one snapshot up to 8 MiB (each row as JSON plus 32 bytes) and otherwise raises a catchableValueError. The last expression (or last assigned name) is returned intact up to 64 KB; a larger value is not returned:resultisnullandresult_too_largegives itsbytes,limit,type, andlength.print()output is separate, kept up to 8 KB;truncated: truemeans the print output was cut.max_credits— optional integer, minimum1; checked before each paid acquisition function call, and before each batch of 50 inside one, against completed acquisition receipts. At the threshold it raises a catchableValueError(a call already running its batches returns its remaining inputs asnot_startedinstead), not a whole-program stop. Gathered calls can overshoot; model sweeps are counted in run spend but excluded from this threshold.
Example request
{
"collection_id": "maple-otter-lantern",
"code": "await sql(\"SELECT status, count(*) AS accounts FROM research_items WHERE kind = 'account' GROUP BY status ORDER BY status\")"
}
Example result
{
"run_id": "silver-waterfall-poppy",
"collection_id": "maple-otter-lantern",
"status": "succeeded",
"events": [],
"skipped_events": 0,
"result": [{"status": "discovered", "accounts": 2}],
"result_too_large": null,
"output": "",
"truncated": false,
"credits": {"charged_credits": "0", "remaining_credits": "100", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_watch_run
Wait for a run without starting its work again. The call waits up to 10 seconds, returning sooner if the run ends. An ended run returns the tool's normal result exactly as an inline call would have returned it, plus run_id and tool; a failed run returns the same error. A run still going returns a fresh receipt. A program reports its latest 25 events each time, including events an earlier call already returned; each event carries its sequence number. Watching an ended run again returns the same result for 7 days. Watching takes no concurrency slot.
instagram_watch_run(run_id) -> RunResult
Parameters
run_id— required string, 1–64 characters; owned run ID from a receipt orinstagram_list_runs. No collection argument.
Example request
{"run_id": "amber-heron-quartz"}
Example result
{
"run_id": "amber-heron-quartz",
"tool": "instagram_workspace_apply",
"collection_id": "maple-otter-lantern",
"status": "partial",
"changes": {"accounts": {"added": 0, "updated": 598}, "media": {"added": 0, "updated": 0}, "activity": {"added": 0, "updated": 0}, "places": {"added": 0, "updated": 0}, "stories": {"added": 0, "updated": 0}, "highlights": {"added": 0, "updated": 0}, "hashtags": {"added": 0, "updated": 0}},
"inputs": 600,
"not_started": 0,
"issues": [{"input": "gone.account", "status": "failed", "error": "Profile not found."}],
"credits": {"charged_credits": "150", "remaining_credits": "250", "as_of_utc": "2026-09-29T12:04:00+00:00"}
}
instagram_abort_run
Stop an owned run of any kind and return at once; the final result is read with instagram_watch_run. Acquisition tools, instagram_workspace_apply and the model tools start nothing new, let what already started wind down and keep it (charged), and end with their normal, partial result carrying stop_reason; a program stops immediately, and its completed writes stay committed; any other tool is cancelled. While the run winds down the call returns a receipt with status: "aborting"; an ended run returns its result.
instagram_abort_run(run_id, reason) -> RunResult
Parameters
run_id— required string, 1–64 characters; owned run ID to stop. No collection argument.reason— required string, 1–400 characters; reason recorded with the run.
Example request
{"run_id": "brook-emerald-panda", "reason": "Stopped by user."}
Example result
{
"run_id": "brook-emerald-panda",
"tool": "instagram_run_code",
"collection_id": "maple-otter-lantern",
"status": "aborting",
"events": [{"sequence": 1, "kind": "checkpoint", "label": "started", "data": {"candidates": 40}}],
"skipped_events": 0,
"credits": {"charged_credits": "0", "remaining_credits": "100", "as_of_utc": "2026-09-29T12:00:00+00:00"}
}
instagram_list_runs
List the account's runs - programs and calls that were still working at their response deadline - active ones first, then the most recent. Calls answered inline are not runs. Each entry carries run_id, kind (program or tool), tool, collection_id, status (running, aborting, succeeded, failed or aborted), stop_reason (aborted, turn_end, time_limit, shutdown or restart when a run stopped early), started_at, finished_at, the latest progress, charged_credits and an error cut to 300 characters. Listing takes no concurrency slot.
instagram_list_runs(collection_id=null, status=null, limit=20) -> ListRunsResult
Parameters
collection_id— optional string; only runs in this owned collection.status— optional string; only runs in this status.limit— optional integer, 1–100, default20.
Example request
{"status": "running"}
Example result
{
"runs": [
{
"run_id": "amber-heron-quartz",
"kind": "tool",
"tool": "instagram_workspace_apply",
"collection_id": "maple-otter-lantern",
"status": "running",
"stop_reason": null,
"started_at": "2026-09-29T12:00:00+00:00",
"finished_at": null,
"progress": {"inputs": 600, "done": 150, "charged_credits": "37.5"},
"charged_credits": "37.5",
"error": null
}
],
"credits": {"charged_credits": "0", "remaining_credits": "62.5", "as_of_utc": "2026-09-29T12:00:10+00:00"}
}