API Documentation

Reference for the AI Page Analysis REST API

Overview

The AI Page Analysis API scrapes any public web page and runs a comprehensive SEO audit using two AI providers simultaneously: OpenAI (GPT-4o) and Anthropic (Claude Sonnet). Both analyses are returned in a single response so you can compare findings.

The tool extracts title tags, meta descriptions, headings, images, links, structured data (JSON-LD), Open Graph tags, Twitter Cards, and more. Each AI provider grades the page across 7 SEO categories on a 1-10 scale and provides specific good points, issues, and actionable improvements.

Base URL

http://localhost:3000

Configure via the PORT environment variable.

POST /api/analyze

Endpoint

POST /api/analyze

Request Headers

Header Value
Content-Typeapplication/json

Request Body

Field Type Required Description
url string Required Full URL to analyze (must include protocol, e.g. https://example.com)

Example Request Body

{
  "url": "https://example.com"
}

Response Format

A successful response returns 200 OK with the following top-level structure:

Field Type Description
urlstringThe URL that was requested
finalUrlstringThe URL after following redirects
scrapedAtstringISO 8601 timestamp of when the page was scraped
pageStatsobjectRaw numeric stats extracted from the page
analysesobjectContains openai and anthropic analysis objects

pageStats Object

Field Type Description
titleLengthnumberCharacter count of the page title
metaDescriptionLengthnumberCharacter count of the meta description
wordCountnumberTotal words in the body text
imageCountnumberTotal number of images
imagesWithoutAltnumberImages missing alt attributes
internalLinksnumberCount of internal links
externalLinksnumberCount of external links
scriptCountnumberNumber of script tags
stylesheetCountnumberNumber of linked stylesheets

Analysis Object (per provider)

Field Type Description
overallGradenumberOverall SEO grade (1-10)
summarystring2-3 sentence overview of the audit
categoriesobjectPer-category breakdown (see below)

Analysis Categories

Each category contains: grade (1-10), good (string[]), bad (string[]), improvements (string[]).

titleAndMeta

Title tag, meta description, meta keywords, viewport, robots directives

headings

Heading hierarchy (H1-H6), structure, keyword usage

content

Word count, readability, content quality signals

images

Alt text coverage, lazy loading, image count

links

Internal/external link ratio, anchor text quality

technicalSEO

Canonical URL, lang attribute, hreflang, robots, script/stylesheet count

socialAndStructuredData

Open Graph tags, Twitter Card tags, JSON-LD structured data

geoLlmReadiness New

Generative Engine Optimization — how well the page is optimized for AI citation by ChatGPT, Perplexity, Google AI Overviews, and Claude. Evaluates structured answers, semantic HTML, FAQ/HowTo/QA schemas, authorship & E-E-A-T signals, content clarity, citability, and freshness.

GEO / LLM Readiness

GEO (Generative Engine Optimization) evaluates how well a page is positioned to be cited, quoted, and referenced by AI systems — including ChatGPT, Perplexity, Google AI Overviews, and Claude. Unlike traditional SEO which optimizes for ranking in link-based results, GEO focuses on making content extractable and trustworthy for LLMs.

What the scraper extracts for GEO

Signal Type Why it matters
hasFaqSchemabooleanFAQPage schema helps LLMs identify Q&A pairs to extract as answers
hasHowToSchemabooleanHowTo schema provides step-by-step instructions LLMs can cite
hasQASchemabooleanQAPage schema signals direct answer content
hasAuthorSchemabooleanAuthor attribution builds E-E-A-T trust signals
hasAuthorMetastringMeta author tag for attribution
hasArticleTagbooleanSemantic <article> wrapper signals primary content
hasMainTagbooleanSemantic <main> helps LLMs isolate core content from nav/footer
orderedListCountnumberOrdered lists indicate structured, rankable info (steps, top-N)
unorderedListCountnumberUnordered lists indicate feature sets, requirements, etc.
tableCountnumberTables provide structured data LLMs can extract and compare
definitionListCountnumberDefinition lists (<dl>) are ideal for glossaries and term explanations
blockquoteCountnumberBlockquotes signal cited sources and expert opinions
citeCountnumber<cite> elements indicate proper source attribution
datePublishedstringFreshness signal — LLMs prefer recent content
dateModifiedstringShows content is actively maintained
firstParagraphstringFirst 300 chars — LLMs often cite lead paragraphs as summaries

What the AI evaluates

Structured Answers

Clear, direct answers to questions. FAQ sections, Q&A patterns, concise definitions.

Semantic HTML

Use of <article>, <main>, <section>, lists, tables, and definition lists.

Schema Markup

FAQPage, HowTo, QAPage schemas that help LLMs understand content purpose.

Authorship & E-E-A-T

Author attribution, published/modified dates, citations, and expert signals.

Content Clarity

Concise lead paragraph, factual tone, well-organized structure.

Citability

Claims backed by data/stats, key facts extractable as standalone snippets.

Topical Authority

Heading depth, content substance, sufficient word count with real information.

Freshness

Published/modified dates indicating content is current and maintained.

Grading Scale

8-10 Good to excellent. Minor or no issues.
5-7 Needs improvement. Noticeable issues.
1-4 Poor. Critical SEO problems.

Error Handling

Status Condition Response Body
400 Missing url field {"error": "URL is required"}
400 Invalid URL format {"error": "Invalid URL format"}
500 Page fetch or analysis failure {"error": "<error message>"}

If one AI provider fails but the other succeeds, the response still returns 200. The failed provider's entry will contain an error field instead of analysis data.

cURL Example

# Analyze a page
curl -X POST http://localhost:3000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Full Example Response

{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "scrapedAt": "2026-03-13T19:00:00.000Z",
  "pageStats": {
    "titleLength": 15,
    "metaDescriptionLength": 0,
    "wordCount": 42,
    "imageCount": 0,
    "imagesWithoutAlt": 0,
    "internalLinks": 1,
    "externalLinks": 1,
    "scriptCount": 0,
    "stylesheetCount": 0
  },
  "analyses": {
    "openai": {
      "overallGrade": 3,
      "summary": "This is a minimal placeholder page with very little content and almost no SEO optimization in place.",
      "categories": {
        "titleAndMeta": {
          "grade": 3,
          "good": ["Title tag is present: 'Example Domain'"],
          "bad": ["No meta description", "No meta keywords"],
          "improvements": ["Add a compelling meta description between 150-160 characters"]
        },
        "headings": {
          "grade": 5,
          "good": ["Single H1 tag present"],
          "bad": ["No H2-H6 subheadings"],
          "improvements": ["Add subheadings to structure the content"]
        },
        // ... additional categories ...
        "geoLlmReadiness": {
          "grade": 2,
          "good": [],
          "bad": ["No FAQ, HowTo, or QA schema markup", "No author attribution", "No published or modified dates"],
          "improvements": ["Add FAQPage schema for common questions", "Include author name and credentials", "Use semantic HTML (article, main) to wrap content"]
        }
      }
    },
    "anthropic": {
      "overallGrade": 2,
      "summary": "example.com is a bare-bones placeholder with critical SEO gaps across all categories.",
      "categories": {
        // ... same structure as openai ...
      }
    }
  }
}

Authentication (APP_SID)

The UI supports optional Zesty.io authentication via the login icon in the top-right corner of the main page. When a user enters their APP_SID, it is stored as a cookie:

APP_SID=<value>; path=/; domain=.<top-level-domain>; max-age=31536000; SameSite=Lax
  • Cookie is set at the top-level domain for cross-subdomain sharing
  • Persists for 1 year
  • Can be cleared via the Disconnect button in the UI
  • The APP_SID cookie can be read by other Zesty.io tools on the same domain
Content One — AI Page Analysis Documentation