How to Use Webmatik API with AI Coding Tools

5 min read·Updated March 2026

Why audit your site from an AI coding tool?

Modern AI coding assistants like Claude Code, Cursor, ChatGPT Codex, and Perplexity Computer can read JSON, understand your codebase, and make changes — all in one flow.

With the Webmatik API, you can:

  • Audit your site — get a Growth Score and detailed analysis across 8 categories
  • Read the action plan — the AI assistant sees every recommendation with fix instructions
  • Fix issues immediately — the assistant applies fixes to your code right away

No context-switching. No copy-pasting. Run an audit, read the results, fix the code — all in your terminal or IDE.

Step 1: Get your API key

API access is available on Starter and Growth plans.

  1. Sign in at webmatik.ai/account
  2. Scroll to the API Keys section
  3. Click Create Key and give it a name (e.g. "Claude Code")
  4. Copy the key — it starts with wmk_ and is shown only once

Tip

Store the key in an environment variable (e.g. WEBMATIK_API_KEY) so your AI tool can access it without you pasting it every time.

Step 2: Run an audit

Send a POST request to start the audit:

curl -X POST https://webmatik.ai/api/v1/audit \
  -H "X-API-Key: wmk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url": "example.com"}'

Response:

{
  "auditId": "abc-123-def",
  "status": "processing"
}

The audit takes 1-3 minutes. Save the auditId for the next step.

Step 3: Get the results

Poll until the status is completed. The audit goes through two phases:

  1. Phase 1 (~40 seconds) — core analysis completes, status changes from processing to completed in the DB, but background tasks (AI vision + GEO) may still be running
  2. Phase 2 (~2-3 minutes total) — AI vision analyzes screenshots and GEO checks AI search visibility. The API keeps returning status: "processing" until both finish
curl https://webmatik.ai/api/v1/audit/abc-123-def \
  -H "X-API-Key: wmk_your_key_here"

While background tasks are running, you'll see:

{
  "status": "processing",
  "auditId": "abc-123-def",
  "geoStatus": "complete",
  "visionStatus": "pending",
  "partialScore": 56,
  "message": "Audit is finalizing background analysis. Poll again in 10 seconds."
}

When fully complete, you get the final result with all scores and recommendations:

{
  "status": "completed",
  "url": "example.com",
  "score": 62,
  "grade": "Good",
  "summary": {
    "performance": { "score": 71, "issues": 3, "topIssue": "LCP above 2.5s" },
    "seo": { "score": 58, "issues": 5, "topIssue": "Missing meta descriptions" },
    "conversion": { "score": 55, "issues": 6, "topIssue": "No clear CTA above the fold" }
  },
  "actionPlan": {
    "total": 18,
    "critical": [
      {
        "title": "Add clear CTA above the fold",
        "howToFix": "Add a prominent button in the hero section...",
        "effort": "quick",
        "impact": "high"
      }
    ],
    "important": [...],
    "niceToHave": [...]
  },
  "reportUrl": "https://webmatik.ai/audit/abc-123-def"
}

Tip

The actionPlan is grouped by priority (critical → important → nice-to-have) with effort estimates. This helps your AI assistant focus on quick wins first.

Using with Claude Code

Claude Code is a terminal-based AI coding assistant by Anthropic. Here's how to use it with Webmatik:

  1. Set your API key: export WEBMATIK_API_KEY=wmk_your_key
  2. Open Claude Code in your project directory
  3. Ask it to audit your site:
Run a Webmatik audit on my site example.com using the API.
My key is in $WEBMATIK_API_KEY.
Then review the results and fix the critical issues in our codebase.

Claude Code will:

  • Call the API to start the audit
  • Wait for results (polling every 10-15 seconds)
  • Read the action plan and understand every recommendation
  • Find the relevant files in your project and apply fixes

Using with Cursor

Cursor is an AI-powered code editor. You can use its built-in terminal and chat:

  1. Open the Cursor terminal and run the audit:
curl -X POST https://webmatik.ai/api/v1/audit \
  -H "X-API-Key: $WEBMATIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "your-site.com"}'
  1. Once complete, fetch the results and paste them into Cursor Chat:
curl https://webmatik.ai/api/v1/audit/AUDIT_ID \
  -H "X-API-Key: $WEBMATIK_API_KEY"
  1. Ask Cursor: "Here's my Webmatik audit. Fix the critical issues in my codebase."

Cursor will read the JSON, understand the issues, and suggest or apply code changes across your project.

Using with ChatGPT Codex

ChatGPT Codex by OpenAI can execute commands and edit files in a sandboxed environment:

  1. In a Codex session, ask it to run the audit using curl
  2. Codex will execute the API calls, wait for results, and read the action plan
  3. Ask it to implement the fixes — it can edit your files directly

Example prompt:

Use the Webmatik API to audit example.com.
API key: wmk_your_key
POST to https://webmatik.ai/api/v1/audit with {"url": "example.com"}
Then GET the results and fix all critical issues.

API response format reference

The full response includes these sections:

FieldDescription
scoreOverall Growth Score (0-100)
gradePoor / Fair / Good / Great / Excellent
summaryPer-category scores, issue counts, and top issue
actionPlanAll recommendations grouped by priority with fix instructions
seoKeyword rankings, traffic estimates (Starter+)
geoVisibilityAI search visibility — mentions in ChatGPT, Gemini (Growth only)
innerPagesScores for analyzed inner pages
reportUrlLink to the full interactive report

Categories in summary: performance, seo, geo, uiux, conversion, retention, accessibility, security.

Each category contains score, passed count, issues count, topIssue (most important problem), and allIssues array with details.

Tips for best results

  • Poll every 10 seconds — audits typically complete in 2-3 minutes including background analysis. Keep polling until status is completed (not processing). The API waits for AI vision and GEO to finish before returning the final result.
  • Start with critical issues — the action plan is already sorted by priority. Ask your AI tool to focus on actionPlan.critical first.
  • Include effort context — each recommendation has an effort field (quick/medium/complex). Ask the AI to tackle "quick wins" first for maximum impact with minimum changes.
  • Re-audit after fixes — run another audit to see your improved score. The API uses the same audit quota as the web app.
  • Use the reportUrl — share the full interactive report with your team at the returned reportUrl.

Tip

The most effective workflow: audit → fix critical quick-wins → re-audit → fix remaining issues. Each cycle typically improves your Growth Score by 10-20 points.

Frequently Asked Questions

Related Articles

Was this helpful?

Check how your website performs in this area

Get Your Growth Score