NEWOur agents now make the SEO fixes on your site and check what worked →

API Quickstart: Your First Call in Minutes

From zero to your first authenticated call. You need a SEOmatic workspace and admin access to mint a key.

1. Create an API key#

In the dashboard: Settings → AI Agents → Use SEOmatic From Your Own Tools (admin role). Keys look like smk_live_... and are shown once at creation, so store it now. Scopes are the boundary: read:gsc and chat:ask are free; agents:act unlocks tools that stage changes.

2. Your first REST call#

curl
export SEOMATIC_API_KEY=smk_live_...

curl https://app.seomatic.ai/api/v1/me \
  -H "Authorization: Bearer $SEOMATIC_API_KEY"
JavaScript (Node 18+)
const res = await fetch("https://app.seomatic.ai/api/v1/me", {
  headers: { Authorization: `Bearer ${process.env.SEOMATIC_API_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
Python (requests)
import os, requests

res = requests.get(
    "https://app.seomatic.ai/api/v1/me",
    headers={"Authorization": f"Bearer {os.environ['SEOMATIC_API_KEY']}"},
    timeout=30,
)
res.raise_for_status()
print(res.json())

The response returns your workspace, the key's scopes, and a capabilities block telling you which paid surfaces (REST acting, Zapier, webhooks) the plan allows, so an agent can discover entitlements without hitting a 402. The zapier flag is true on the Infrastructure plan and also covers the n8n and Make integrations; actions in them follow rest_act. On the free plan, free_questions shows how many of the 5 monthly questions are left; it is null on paid plans.

sample response
{
  "workspace": {
    "id": "3f0c...",
    "name": "Acme",
    "gsc_connected": true
  },
  "crawler_ingest_url": "https://app.seomatic.ai/api/ingest/crawler/...",
  "key": {
    "environment": "live",
    "scopes": ["read:gsc", "chat:ask"]
  },
  "capabilities": {
    "rest_act": false,
    "zapier": false,
    "webhooks": false
  },
  "free_questions": {
    "monthly_limit": 5,
    "used_this_month": 1,
    "bonus_remaining": 0,
    "remaining": 4
  }
}

3. List everything you can do#

curl
curl https://app.seomatic.ai/api/v1/tools \
  -H "Authorization: Bearer $SEOMATIC_API_KEY"

Returns the full scope-filtered tool roster, each with a name, description, input schema, and an acts flag. Invoke one with POST /v1/tools/{name}. See the REST API page.

4. Or connect over MCP#

Point any MCP client (Claude, Cursor) at https://app.seomatic.ai/api/mcp with the same Bearer key. See MCP server.

5. Or skip the code#

On the Infrastructure plan, the same key works in no-code tools: n8n and Make take the API key; Zapier connects with OAuth instead.

If a call fails#

Errors come back as JSON with a human-readable error and, for most failures, a stable code to branch on:

401 response
{
  "error": "Missing or invalid API key",
  "code": "INVALID_API_KEY",
  "details": {
    "hint": "Send \"Authorization: Bearer smk_live_...\". Keys are minted in workspace settings."
  }
}
  • 401: the key is missing, mistyped or revoked. Check the header is exactly Authorization: Bearer smk_live_....
  • 402: the plan does not include that surface, or the free questions for the month are used up. The body carries an upgrade_url.
  • 403 MISSING_SCOPE: the key lacks a scope; details.required names it.
  • 429: rate limited. Wait for the seconds in the Retry-After header, then retry.

Every code is listed on the REST API page.

digi-business-uk

Each local area page used to take us half a day to create and optimize.


With SEOmatic, we can create hundreds of pages in the same time, which helps our clients make the best use of their budget.


It's transformed how we deliver scalable SEO solutions.

will-hawkins

Will Hawkins

Marketing Director, Digi-Business UK

Give Your Site an SEO Team

Agents read your Search Console data, do the work, and prove what actually moved. You decide what ships.

  • You decide what ships
  • Verified live
  • One-click rollback

14-Day Trial for $1, credited to your first payment.