What Live Data Is
Most SDK methods read from the Xpoz database, topping up from the crawler when results look stale. TheinstagramLive namespace is different: it bypasses the database entirely and fetches straight from the crawler API, so every call returns what Instagram is serving right now.
That trade-off is deliberate:
Reach for
instagramLive when freshness matters more than latency — checking a post’s engagement right now, or pulling a follower list that changed this morning. For analysis over large historical sets, the database-backed methods are faster and support CSV export.
Live methods require a paid account. They always trigger a live fetch, so they are not available on trial access and throw
AuthenticationError (HTTP 403).No connect() Required
Live methods talk to the Xpoz REST API rather than the MCP server, so they work without opening an MCP session:connect() before using any other namespace (client.instagram, client.twitter, and so on).
CursorResult
Live methods return aCursorResult<T> rather than the PaginatedResult<T> used elsewhere. The upstream API pages with an opaque cursor and reports no totals, so there is no page number, no totalPages, and no getPage(n).
Navigating Pages
Methods
All methods acceptfields to select which fields come back, and all paged methods accept cursor to resume from a previous response.
interactionType is "commenters" or "likers". connectionType is "followers" or "following". Both are typed unions, so invalid values fail at compile time.
getPost and getUser are single-item lookups and return the object directly, or null if nothing was found.
Examples
Resuming From a Cursor
Cursors are opaque strings you can persist and reuse later, which is useful for long-running or resumable jobs:A cursor is only valid for the same query on the same endpoint. Reusing one elsewhere is rejected with a
400.Field Selection
Live methods accept the samefields values as their database-backed counterparts — see the TypeScript SDK Reference for the full Instagram field lists.
Live methods do not support since / until date filtering. The upstream API accepts only the query and a cursor, so use client.instagram.searchPosts() when you need a date range.
Connection Details
Live methods talk to the Xpoz REST API (https://api.xpoz.ai) rather than the MCP server, using the same API key. Override the base URL when needed:
XPOZ_API_URL environment variable does the same thing.
