← Back to Blog
November 21, 2025ProductPerformance

Saved Website Analyses: Instant Loads, Lower AI Cost

Re-analyzing the same site? Instant load instead of 30-60 seconds. Lower cost. Better UX.

The Problem: Re-Running Expensive Analyses

You analyze your site. You tweak your homepage. You want to re-analyze.

Before: Wait 30-60 seconds. Pay for another GPT-4o call ($0.05-0.10). Stare at a loading spinner.

Now: Instant load. Zero AI cost. Just retrieve from the database.

API: POST /api/analyses

Save an analysis after generation:

POST /api/analyses
Authorization: Bearer <token>

{
  "targetUrl": "https://sourcegraph.com",
  "targetAudience": ["Engineering Managers", "VPs of Engineering"],
  "painPoints": ["Code search is slow", "Onboarding takes weeks"],
  "messagingAngles": ["Search millions of repos in seconds"],
  "recommendedChannels": ["google_ads", "linkedin_ads"],
  "seoKeywords": ["code search", "developer tools"]
}

Response:
{
  "id": 123,
  "targetUrl": "https://sourcegraph.com",
  "createdAt": "2025-11-21T12:00:00Z"
}

API: GET /api/analyses

Retrieve your last 5 analyses:

GET /api/analyses?limit=5
Authorization: Bearer <token>

Response:
[
  {
    "id": 123,
    "targetUrl": "https://sourcegraph.com",
    "targetAudience": [...],
    "createdAt": "2025-11-21T12:00:00Z"
  },
  {
    "id": 122,
    "targetUrl": "https://linear.app",
    "targetAudience": [...],
    "createdAt": "2025-11-20T10:30:00Z"
  }
]

UX: RecentAnalyses Component

The workflow page shows your last 5 analyses. Click to reload instantly.

No spinner. No wait. Just instant data.

Cost Savings

GPT-4o website analysis: $0.05-0.10 per run.

If you re-analyze 5 times per day: $0.25-0.50/day = $7.50-15/month.

With saved analyses: First run costs $0.05. Every reload after is free.

Savings: 80-90% reduction in AI costs for repeat analyses.

Privacy: Per-User Scoped

Saved analyses are tied to your user ID. You only see your own analyses.

Database constraint ensures isolation:

// apps/web/src/app/api/analyses/route.ts
const analyses = await prisma.websiteAnalysis.findMany({
  where: {
    user_id: session.user.id,  // Scoped to current user
  },
  orderBy: {
    created_at: 'desc'
  },
  take: limit
});

Try Saved Analyses

Analyze your site once. Reload instantly. Save on AI costs.

Start Analysis