Skip to content

thegridwork/siteaudit-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@gridwork/siteaudit-api

Pay-per-call website audit API for AI agents. Built on x402 — agents pay USDC on Base, get instant audit results.

Free tools included: shareable report pages, side-by-side comparison, score tracking over time, CI/CD integration.

By Gridwork

Free Endpoints

Endpoint Description
GET /report?url=example.com Shareable audit report page with score ring, radar chart, fix code
GET /compare?a=site1.com&b=site2.com Side-by-side site comparison with dual radar chart
GET /history?url=example.com Score history JSON — track improvements over time
POST /audit/ci CI/CD integration — returns JSON with score delta
GET / Service info and pricing
GET /health Health check

Paid Endpoints (x402)

Endpoint Price Description
POST /audit/full $0.50 Full 5-category audit
POST /audit/accessibility $0.20 WCAG 2.1 AA / EAA compliance
POST /audit/performance $0.20 Performance analysis
POST /audit/seo $0.20 SEO check
POST /audit/quick $0.10 Scores and grades only

Features

  • Score tracking — Every audit is stored. Revisit a URL and see how scores changed (+8 since last week)
  • Site comparison — Side-by-side radar charts, category-by-category breakdown with diff arrows
  • Fix code snippets — Issues include the actual HTML to copy-paste (alt tags, canonical URLs, JSON-LD)
  • JSON-LD generator — Automatically generates schema.org structured data for sites that lack it
  • Compliance countdown — EAA enforcement status + EU AI Act deadline with urgency indicators
  • 5 audit categories — Accessibility (WCAG 2.1 AA), Performance, SEO, Design, Mobile
  • EAA compliance scoring on every audit

How x402 Payment Works

  1. Agent sends POST /audit/full with {"url": "https://example.com"}
  2. API returns 402 Payment Required with USDC payment details
  3. Agent pays via x402 protocol (USDC on Base)
  4. Agent retries with X-PAYMENT header
  5. API verifies payment and returns results

CI/CD Integration

Use the free /audit/ci endpoint with thegridwork/siteaudit-action to audit on every PR:

- uses: thegridwork/siteaudit-action@v1
  with:
    url: https://your-site.com

Deploy

npm install
npx wrangler kv namespace create AUDIT_HISTORY
# Copy the ID into wrangler.toml
npx wrangler deploy

Environment Variables

Set via wrangler secret put:

  • RECIPIENT_ADDRESS — Your USDC wallet address (Base network)
  • FACILITATOR_URL — Coinbase facilitator (default: https://x402.org/facilitator)
  • USE_TESTNET — Set to "true" for Base Sepolia testing

Related

License

MIT

About

x402 paid API for website audits — AI agents pay USDC per call for accessibility, performance, SEO analysis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors