Skip to main content

Surface

urls.resolve and items.lookup are the synchronous pair; the top-level importUrl() means “create an import and wait”. Its result calls the job importJob because import is reserved in JavaScript.

Naming a page

items.list, comments.list, search.items, and search.accounts each take either the page’s own parameters or the cursor of the page before it, never both: a cursor already carries the parameters of the walk it continues. TypeScript enforces the union, so { account, cursor } does not compile.
A search cursor travels with its platform, because search is the one list whose object is the platform itself. The two search methods set type themselves, so an input never states it. items.list takes one account selector — a natural key, <platform>:@handle, or an account URL; see Naming the account for the grammar.
Every method throws RefmatterError (status, code, requestId, retryable, retryAfterSeconds) on failure. retryAfterSeconds is set for a rate_limited rejection, from the error details or the Retry-After header. refmatter.raw is the underlying openapi-fetch client typed with the full contract, and the paths, operations, and components types are exported for your own wrappers, along with the Item and Resolution aliases.

Options

Node 20+ and any runtime with fetch, crypto.randomUUID, and AbortSignal.any.