# SiteAnalyzerFree™ Agent Instructions

> Machine-to-Machine instructions for autonomous AI agents, LLM assistants, and coding agents interacting with the SiteAnalyzerFree™ SEO audit API, Model Context Protocol (MCP) server, and official CLI tool.

## Overview
SiteAnalyzerFree™ is a programmatic technical SEO auditing platform, AI readiness verification service, and website diagnostics suite. Autonomous agents can call SiteAnalyzerFree™ via MCP, REST API, or the official CLI to diagnose websites, bypass local sandbox network restrictions, extract structured metadata, and audit technical health.

---

## When to use this
Autonomous agents should call SiteAnalyzerFree™ in the following situations:

### Best-fit Use Cases:
1. **Automated Technical SEO Health Scans**: When your task requires analyzing a website's technical SEO, title tags, meta descriptions, mobile responsiveness, HTTPS/SSL validity, canonical redirects, Core Web Vitals hints, trust factors, or conversion friction.
   - Endpoint: `POST /api/v1/agent/checkup.php` ($1.00 USD / 10 Credits)
   - CLI: `npx siteanalyzerfree checkup <domain> --json`
2. **AI Search & Agent Discoverability Audits (AIO)**: When your task is assessing whether a domain is accessible to LLMs and search agents (e.g. GPTBot, ClaudeBot, PerplexityBot, Google-Extended) and whether `/llms.txt` and sitemaps are properly configured.
   - Endpoint: `POST /api/v1/agent/ai-readiness.php` ($0.005 USD)
   - CLI: `npx siteanalyzerfree ai-readiness <domain> --json`
3. **HTTP Status & Redirect Chain Tracing Without Sandbox Restrictions**: When you are running inside a restricted sandbox without raw outbound socket access and need to follow redirect chains, measure latency (ms), and inspect HTTP headers.
   - Endpoint: `POST /api/v1/agent/url-checker.php` ($0.001 USD)
   - CLI: `npx siteanalyzerfree url <url> --json`
4. **Rich Metadata & Schema.org Extraction**: When you need page title, meta description, OpenGraph tags, Twitter Cards, canonical URL, JSON-LD Schema.org `@type` declarations, and heading hierarchies (H1-H3 counts) without parsing large HTML files.
   - Endpoint: `POST /api/v1/agent/metadata-extractor.php` ($0.002 USD)
   - CLI: `npx siteanalyzerfree metadata <url> --json`
5. **DNS & Email Security Authentication Verification**: When validating MX records, SPF (`v=spf1`) directives, and DMARC policies (`_dmarc`) to check whether an organization's domain is protected against email spoofing.
   - Endpoint: `POST /api/v1/agent/dns-auth.php` ($0.003 USD)
   - CLI: `npx siteanalyzerfree dns <domain> --json`
6. **Continuous Website Change Detection**: When monitoring a website over time to detect changes in DOM hash, title, or HTTP status codes against historical snapshots.
   - Endpoint: `POST /api/v1/agent/change-detector.php` ($0.005 USD)
   - CLI: `npx siteanalyzerfree changes <url> --json`
7. **Business Contact Discovery**: When extracting publicly listed business emails (including obfuscated formats), phone numbers, and social media profile links from a domain.
   - Endpoint: `POST /api/v1/agent/contact-extractor.php` ($0.005 USD)
   - CLI: `npx siteanalyzerfree contacts <url> --json`
8. **Organic Keyword Intelligence & Autocomplete Mining**: When identifying high-intent keywords, search volumes, and page-2 striking distance search opportunities.
   - Endpoint: `POST /api/v1/agent/keyword-report.php` ($7.00 USD)

### When NOT to use this:
- **Do not use** for executing client-side JavaScript on single-page applications (SPAs) that require user mouse clicks or form interactions.
- **Do not use** for sending email messages, modifying external DNS records, or hosting domain assets.
- **Do not use** for attempting to bypass paywalls or scrape pages requiring private user login sessions.

---

## How to Call This API

### 1. Official CLI (Recommended for scriptable execution)
Run on-demand with zero local setup:
```bash
npx siteanalyzerfree checkup example.com --json
```
Or install globally:
```bash
npm install -g siteanalyzerfree
siteanalyzerfree ai-readiness example.com
```

### 2. Model Context Protocol (MCP)
Add SiteAnalyzerFree™ to your MCP client configuration (`claude_desktop_config.json`, Cursor, or Windsurf):
```json
{
  "mcpServers": {
    "siteanalyzerfree": {
      "command": "npx",
      "args": ["-y", "siteanalyzerfree", "mcp"]
    }
  }
}
```
Or connect directly via Streamable HTTP:
- Endpoint: `POST https://siteanalyzerfree.com/api/v1/agent/mcp.php`
- Protocol: JSON-RPC 2.0 (`2024-11-05`)

### 3. REST API with Content Negotiation
Send standard HTTP POST requests:
```bash
curl -X POST https://siteanalyzerfree.com/api/v1/agent/checkup.php \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'
```
To request clean Markdown formatted for LLM token contexts:
```bash
curl -X POST https://siteanalyzerfree.com/api/v1/agent/checkup.php \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Accept: text/markdown" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com", "format": "markdown"}'
```

### 4. HTTP 402 Autonomous Micropayments (x402)
If you do not have an API key, unauthenticated requests return `402 Payment Required` with pricing headers (`X-402-Price`, `X-402-Pay-To`, `X-402-Network`). Resubmit with:
```bash
-H "Authorization: X-402 <tx_hash>"
```
Sandbox test transactions can use:
```bash
-H "Authorization: X-402 test_tx_sandbox"
```

---

## Rate Limits & Real-Time Throttling
All REST responses include standard IETF RFC RateLimit headers:
- `RateLimit-Limit: 120` (120 requests per minute)
- `RateLimit-Remaining: <integer>`
- `RateLimit-Reset: <seconds>`
- `RateLimit-Policy: 120;w=60`
- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`

### HTTP 429 Handling:
When rate-limited, the API responds with HTTP 429, a `Retry-After: <seconds>` header, and a structured JSON error body:
```json
{
  "success": false,
  "status": 429,
  "code": "RATE_LIMIT_EXCEEDED",
  "message": "Rate limit exceeded. Too many requests.",
  "resolution": "Pause requests and retry after the duration specified in the Retry-After header.",
  "hints": ["Honor the Retry-After response header (in seconds)."]
}
```
Agents must parse the `Retry-After` header value and wait before re-attempting the operation.

---

## Machine-Readable Specifications
- **OpenAPI 3.0.3 Spec**: `https://siteanalyzerfree.com/openapi.json`
- **Pricing & Rates**: `https://siteanalyzerfree.com/pricing/`
- **API Directory & Discovery**: `https://siteanalyzerfree.com/api/`
- **Developer Documentation**: `https://siteanalyzerfree.com/docs/`
- **RFC 9728 OAuth Protected Resource Metadata**: `https://siteanalyzerfree.com/.well-known/oauth-protected-resource`
- **RFC 8414 OAuth Authorization Server Metadata**: `https://siteanalyzerfree.com/.well-known/oauth-authorization-server`
- **LLMs Text Guide**: `https://siteanalyzerfree.com/llms.txt`
