Skip to main content
Use Moz through Corsair: one client, typed API calls, and incoming webhooks. Generate an API token on the Moz API dashboard (https://api.moz.com) and Corsair sends it in the x-moz-token header on every call. The Moz API is JSON-RPC 2.0: one endpoint (https://api.moz.com/jsonrpc), one POST per operation, with the method name in the request body.
  • Quota is per row. Responses carry no row count; quota.lookup reports the usage and allowance of a bucket for free. Metrics, link and keyword methods charge api.limits.data.rows (one row per call, per returned result or per returned metric value); the competitor fetch draws on the separate api.limits.mozscape.rows bucket. Lists default to 25 results, so pass a limit to control the cost.
  • Errors are JSON-RPC envelopes with a stable code: -32651 is a bad token (401), -32670 is exhausted quota (403), -32658 and -32650 are the two 429 rate limits (a per-method one with Retry-After and an edge one without). Errors come back as core ApiErrors carrying that code; core retries an HTTP 429 and nothing else is retried.
  • The competitor lookup is asynchronous. competitors.fetch answers with an async_call receipt; follow it with jobs.lookup until the status is complete, then read async_call.result (or .error). Poll no more than once every five seconds; lookups are free.
  • Two paging styles. Link, linking-domain, anchor-text and top-page lists take offset.limit (1-50) and an optional offset.token; pass the response’s offset.token for the next page (null when there is none). global.topDomains, global.topPages, keywords.suggestions and rankingKeywords.list take page.n (0 for the first page) and page.limit; raise page.n by one for each next page.
  • Keywords. keywords.metrics returns difficulty, volume, organic CTR and priority at once (four rows); search intent is opt-in with options.include_intent until December 1, 2026 and returned by default from that date, for one more row when available. The single-metric fetches cost one row each. keywords.suggestions, keywords.generateMetrics and keywords.generateSerp are asynchronous; the two generate methods start a fresh SERP collection billed per call, so they are destructive.
  • Moz Local (local.*) manages business listings for Moz Local customers; most of it is Enterprise only. Creating a location adds a billed listing; cancelling, closing and changing a location’s level change billing or unpublish it, so those are destructive.
  • Webhooks. Moz sends Moz Local location events (created, updated, canceled, closed) with the Standard Webhooks signature. Moz’s team sets them up per account; save the whsec_ secret as the account’s webhook_signature (or the webhookSecret option).
  • Schemas come from Moz’s method reference. Inputs follow each method’s payload definition and reject unknown fields; Moz Local inputs stay open because Moz’s own examples use fields its schema leaves out. Responses are parsed leniently.
What you get:
  • 74 typed API operations
  • 4 incoming webhook event types

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Read site metrics for moz.com
keywords.generateMetrics
See the full list on the API page.

Webhooks

This plugin registers 4 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then use webhookHooks on the plugin factory. See Webhooks for every event path and payload shape, and Webhooks concept for routing.

What’s next

API reference

Every moz.api.* operation with input and output types.

Webhooks

Event paths, payloads, and webhookHooks examples.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.