WebScore API Reference · ← Back to app

Authentication

All API requests require a Bearer token in the Authorization header. Generate your key below — it is shown once and cannot be retrieved again.

All requests
Authorization: Bearer waa_your_key_here

Quick start

Two requests to get your first GEO scan result — generate a key, then scan a URL. Prefer clicking? Try the interactive playground →

1 — Generate key
curl -X POST "https://www.webscore.dev/api/audit?action=key-generate" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@yourcompany.com"}'
2 — Run GEO scan
curl -X POST "https://www.webscore.dev/api/audit?action=api-scan" \
  -H "Authorization: Bearer waa_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-site.com"}'

Endpoints

POST /api/audit?action=key-generate

Generate a new API key tied to your email. The raw key is returned once and cannot be retrieved again — store it securely.

Body paramTypeDescription
emailrequiredstringYour email address. Used to identify your key in the dashboard.
Response
{
  "key":       "waa_610fe2b712...",   // store this — shown once
  "email":     "you@yourcompany.com",
  "tier":      "free",
  "geo_limit": "3 GEO scans/day",
  "note":      "Store this key — it will not be shown again."
}
POST /api/audit?action=api-scan

Runs a live AI Visibility (GEO) scan. Queries Gemini, ChatGPT, Perplexity, and Claude with brand-specific buying-intent questions and returns mention rate, citation rate, per-engine results, and funnel breakdown. This endpoint makes live requests to external AI engines — allow up to 60 seconds.

Set a 60-second timeout in your HTTP client. The scan queries four AI engines in parallel — Gemini, ChatGPT, Perplexity, and Claude — and waits for all responses before returning.
Body paramTypeDescription
urlrequired string The public URL to scan. Must be reachable without login or VPN.
Request
curl -X POST "https://www.webscore.dev/api/audit?action=api-scan" \
  -H "Authorization: Bearer waa_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-site.com"}'
Response
{
  "url":           "https://your-site.com",
  "brand":         "Your Brand",
  "domain":        "your-site.com",
  "scannedAt":     "2026-07-18T10:22:00.000Z",
  "geo": {
    "mentionRate":  0.67,          // fraction of AI answers that named your brand
    "citationRate": 0.33,          // fraction where brand was cited as a URL source
    "sentiment":    "positive",    // "positive" | "neutral" | "negative"
    "mentionCount": 8,
    "totalQueries": 12,
    "summary":      "Your Brand has strong AI visibility...",
    "funnelStats": {
      "awareness":    { "mentioned": 4, "total": 4 },
      "consideration":{ "mentioned": 3, "total": 4 },
      "decision":     { "mentioned": 1, "total": 4 }
    },
    "engines": { /* per-engine breakdown — gemini, chatgpt, perplexity, claude */ }
  },
  "missedQuestions": ["What are the best tools for X?", "..."], // queries where brand wasn't mentioned
  "promptOverride":  false,          // true if a custom probe prompt was used
  "usage": { "scansToday": 2, "limit": 3, "tier": "free" }
}

Response headers

HeaderDescription
X-RateLimit-GEO-LimitYour daily GEO scan limit for this tier.
X-RateLimit-GEO-RemainingGEO scans remaining today.
POST /api/audit?action=api-geo-compare Pro

Runs a GEO scan on two URLs simultaneously and returns a side-by-side AI visibility comparison — mention rate, citation rate, sentiment, and per-engine breakdown for each brand. Ideal for benchmarking your brand against a direct competitor. Costs 1 GEO unit from your daily quota.

This endpoint scans two URLs in parallel. Allow up to 60 seconds.
Body paramTypeDescription
url1requiredstringYour brand's URL.
url2requiredstringCompetitor URL to compare against.
Request
curl -X POST "https://www.webscore.dev/api/audit?action=api-geo-compare" \
  -H "Authorization: Bearer waa_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url1":"https://your-site.com","url2":"https://competitor.com"}'
Response
{
  "url1": "https://your-site.com",
  "url2": "https://competitor.com",
  "winner": "site1",           // "site1" | "site2" | "tie"
  "summary": "Your Brand leads with 67% mention rate vs 42%...",
  "site1": {
    "brand":       "Your Brand",
    "domain":      "your-site.com",
    "mentionRate": 0.67,
    "citationRate":0.33,
    "sentiment":   "positive",
    "totalQueries":12,
    "funnelStats": { /* awareness / consideration / decision */ }
  },
  "site2": { /* same shape as site1 */ },
  "engineHeadToHead": {
    "gemini":     { "brand1": { "mentions":3, "total":4, "rate":0.75 }, "brand2": { "mentions":2, "total":4, "rate":0.5 } },
    "chatgpt":    { "brand1": { "mentions":2, "total":3, "rate":0.67 }, "brand2": { "mentions":1, "total":3, "rate":0.33 } },
    "perplexity": { "brand1": { "mentions":3, "total":5, "rate":0.6  }, "brand2": { "mentions":2, "total":5, "rate":0.4  } },
    "claude":     { "brand1": { "mentions":2, "total":3, "rate":0.67 }, "brand2": { "mentions":1, "total":3, "rate":0.33 } }
  },
  "scannedAt": "2026-07-18T10:22:00.000Z"
}
POST /api/aeo

AI technical readiness audit. Checks your site for llms.txt, AI crawler access, structured data, E-E-A-T signals, sitemap freshness, and more — then scores it 0–100 with AI-generated fixes. Streams progress as Server-Sent Events and emits the final result as a type: "result" event.

📡
This endpoint streams Server-Sent Events (SSE). Read the stream line by line and parse data: lines as JSON. The final payload arrives on the event with "type":"result". Allow up to 90 seconds.
Body paramTypeDescription
urlrequiredstringThe public URL to audit. Must be reachable without login.
Request
curl -X POST "https://www.webscore.dev/api/aeo" \
  -H "Authorization: Bearer waa_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-site.com"}'
SSE stream
# Progress events arrive as the audit runs:
data: {"type":"progress","message":"Fetching page…"}
data: {"type":"progress","message":"Checking llms.txt…"}
data: {"type":"progress","message":"Scoring with AI…"}

# Final result:
data: {"type":"result","data":{...}}
Result payload
{
  "score":   78,                   // 0–100 AI readiness score
  "summary": "The site has a good foundation...",
  "issues": [
    {
      "severity": "medium",          // "high" | "medium" | "low"
      "category": "eeat",
      "title":    "Incomplete E-E-A-T Signals",
      "problem":  "Missing author information...",
      "fix":      "Add author information and publication dates..."
    }
  ],
  "strengths": [
    "llms.txt is present and well-formed",
    "AI retrieval bots allowed — OAI-SearchBot, Claude-SearchBot..."
  ]
}
POST /api/audit?action=api-geo-recommend

Generates 4 specific, AI-powered content recommendations to improve your brand's visibility in ChatGPT, Gemini, and Perplexity — based on the buying-intent questions where your brand wasn't mentioned. Pass missedQuestions from a previous GEO scan to skip re-running the scan and save your quota.

Body paramTypeDescription
urlrequiredstringThe URL to generate recommendations for.
missedQuestionsstring[]Questions from a GEO scan where the brand wasn't mentioned. If omitted, a fresh scan is run (costs 1 GEO unit).
brandstringBrand name from the GEO scan. Optional if missedQuestions is provided.
mentionRatenumberMention rate (0–1) from the GEO scan. Optional context for better recommendations.
💡
Pass missedQuestions from your GEO scan response to avoid consuming a GEO unit. If omitted, a full GEO scan runs automatically and counts against your daily limit.
Request — with GEO data
curl -X POST "https://www.webscore.dev/api/audit?action=api-geo-recommend" \
  -H "Authorization: Bearer waa_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-site.com",
    "brand": "Your Brand",
    "mentionRate": 0.33,
    "missedQuestions": [
      "What are the best tools for X?",
      "Which platform should I use for Y?"
    ]
  }'
Response
{
  "brand":           "Your Brand",
  "domain":          "your-site.com",
  "mentionRate":     0.33,
  "missedQuestions": ["What are the best tools for X?", "..."],
  "recommendations": [
    {
      "title":       "Add comparison page targeting ChatGPT answers",
      "page":        "New /compare page or homepage section",
      "description": "Create a dedicated comparison page that directly answers 'What are the best tools for X?' — include a table comparing Your Brand against top alternatives with clear differentiators.",
      "why":         "ChatGPT and Gemini tend to cite pages that directly answer comparison questions with structured data.",
      "impact":      "high",
      "effort":      "medium"
    }
  ]
}

Errors

StatusMeaning
200Success.
400Missing or invalid request body parameter.
401Missing or invalid API key.
402Endpoint requires a paid tier. Upgrade at /dashboard.
429Daily GEO limit reached. Check X-RateLimit-GEO-Remaining header. Resets at midnight UTC.
500Internal error or the target URL was unreachable.

JavaScript SDK

A thin npm wrapper for Node.js and browser environments. TypeScript types included — no extra @types/ package needed.

Install
npm install webscore-sdk
Quickstart
import { WebScore } from 'webscore-sdk'

const client = new WebScore('waa_your_key')

// GEO — AI Share of Voice scan
const result = await client.geo('https://your-site.com')
console.log(result.geo.mentionRate)   // 0.67
console.log(result.geo.sentiment)     // "positive"

// Compare two sites
const { winner } = await client.compare('https://you.com', 'https://competitor.com')

// AEO — AI technical readiness audit
const { score, issues } = await client.aeo('https://your-site.com')
📦
Full docs and TypeScript types on npmjs.com/package/webscore-sdk. Works in Node.js 18+ and modern browsers. Default timeout is 90 seconds to accommodate live AI engine queries.

Playground

Try every endpoint directly in your browser — no curl, no code. Generate a free API key, paste your site URL, and run a live scan in seconds.

🛝
What you can do in the playground:
  • Generate a free API key (email required)
  • Run a GEO scan on any public URL
  • Compare two sites head-to-head
  • Run an AEO readiness audit (streams live progress)

Rate limits apply — free tier allows 3 GEO scans/day. Your API key is saved in your browser so you don't need to re-enter it on return visits.

Code Examples

Copy-paste examples for the three main endpoints in your preferred environment. Switch tabs to see the same call in Node.js (SDK), React, or cURL.

GEO Scan — AI Share of Voice

Node.js / backend
import { WebScore } from 'webscore-sdk'

const client = new WebScore('waa_your_key')
const result = await client.geo('https://your-site.com')

console.log(result.geo.mentionRate)    // 0.67 → 67% of answers mention you
console.log(result.geo.citationRate)   // 0.33 → 33% include a link back
console.log(result.geo.sentiment)      // "positive" | "neutral" | "negative"
console.log(result.missedQuestions)    // questions where you weren't mentioned

Compare — Head-to-head GEO

Node.js / backend
const { winner, site1, site2 } = await client.compare(
  'https://your-site.com',
  'https://competitor.com'
)

console.log(winner)               // "site1" | "site2" | "tie"
console.log(site1.mentionRate)    // 0.72
console.log(site2.mentionRate)    // 0.45

GEO Recommendations — Content fixes for missed questions

Node.js — pass GEO data to skip re-scan
// Step 1: run GEO scan
const geo = await client.geo('https://your-site.com')

// Step 2: get recommendations (passes missedQuestions — no extra GEO unit used)
const { recommendations } = await client.recommend('https://your-site.com', {
  brand:           geo.brand,
  mentionRate:     geo.geo.mentionRate,
  missedQuestions: geo.missedQuestions,
})

recommendations.forEach(r => {
  console.log(`[${r.impact}] ${r.title}`)
  console.log(`Page: ${r.page}`)
  console.log(r.description)
})

AEO Audit — AI Technical Readiness

Node.js / backend
const { score, summary, issues } = await client.aeo('https://your-site.com')

console.log(score)          // 0–100
console.log(summary)        // AI-generated diagnosis
issues.forEach(i => console.log(`[${i.severity}] ${i.title}: ${i.fix}`))

Rate limits

GEO scans query live AI engines (Gemini, ChatGPT, Perplexity, Claude) and have real compute costs, so limits are per tier per day. All limits reset at midnight UTC.

Tier GEO scans / day GEO compare / day Price
Free3₹0 — forever
Pro Coming soonTBD

GEO compare costs 1 GEO unit per call. Pro plan with higher limits and API access is launching soon — contact us to get early access.

🚀
Currently in beta — everything is free. API access, higher scan limits, and multi-brand monitoring are coming in the Pro plan. Join the waitlist →