Skip to main content

Create Audit

curl -X POST https://api.latentgeo.com/api/v1/audits/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "market": "US",
    "language": "en",
    "competitors": ["competitor1.com", "competitor2.com"]
  }'
{
  "id": 123,
  "url": "https://example.com",
  "status": "pending",
  "progress": 0,
  "created_at": "2026-03-03T10:00:00Z"
}
POST /api/v1/audits/ Creates a new audit. If competitors and market are provided, the audit pipeline starts immediately. Otherwise, it waits for configuration via chat.
url
string
required
Website URL to audit
market
string
Target market (e.g., “US”, “UK”, “AR”)
language
string
Content language (e.g., “en”, “es”, “fr”)
competitors
array
List of competitor domains
id
integer
Unique audit identifier
url
string
Audited website URL
status
string
Current status: pending, running, completed, failed
progress
integer
Progress percentage (0-100)

List Audits

GET /api/v1/audits/ Returns a paginated list of your audits.
skip
integer
default:"0"
Number of records to skip
limit
integer
default:"100"
Maximum records to return
audits
array
Array of audit summary objects

Get Audit Details

GET /api/v1/audits/{audit_id} Returns full audit details including pages, scores, and fix plan.
id
integer
Audit ID
url
string
Audited URL
status
string
Current status
geo_score
number
GEO optimization score (0-100)
total_pages
integer
Number of pages audited
fix_plan
array
Actionable fixes with priority levels
target_audit
object
Detailed audit data for the target site

Get Audit Status

GET /api/v1/audits/{audit_id}/status Lightweight endpoint for polling audit progress.
id
integer
Audit ID
status
string
Current status
progress
integer
Progress percentage
geo_score
number
Current GEO score

Get Fix Plan

GET /api/v1/audits/{audit_id}/fix_plan Returns the actionable fix plan in JSON format.
fix_plan
array
Array of fix items with details

Delete Audit

DELETE /api/v1/audits/{audit_id} Permanently deletes an audit and associated data.

Get Audit Pages

GET /api/v1/audits/{audit_id}/pages Returns all audited pages with scores and issues.
pages
array
Array of page objects with audit data

Get Competitors

GET /api/v1/audits/{audit_id}/competitors Returns competitor analysis data with GEO scores.
limit
integer
default:"5"
Maximum competitors to return (max: 10)
competitors
array
Array of competitor objects with GEO scores

Run PageSpeed Analysis

POST /api/v1/audits/{audit_id}/pagespeed Triggers PageSpeed Insights analysis and returns complete data.
strategy
string
default:"both"
Analysis strategy: mobile, desktop, or both
success
boolean
Whether analysis completed
data
object
Complete PageSpeed data with all metrics, opportunities, diagnostics

Generate PDF Report

POST /api/v1/audits/{audit_id}/generate-pdf Generates a comprehensive PDF report with PageSpeed, keywords, backlinks, and GEO analysis.
force_pagespeed_refresh
boolean
default:"true"
Force refresh PageSpeed data
force_report_refresh
boolean
default:"false"
Force regenerate report markdown
force_external_intel_refresh
boolean
default:"false"
Force refresh external intelligence data
success
boolean
Whether PDF generation succeeded
pdf_path
string
Supabase storage path (supabase://…)
file_size
integer
PDF file size in bytes
pagespeed_included
boolean
Whether PageSpeed data was included

Download PDF

GET /api/v1/audits/{audit_id}/download-pdf Redirects to signed Supabase download URL for the PDF report.

Get PDF Download URL

GET /api/v1/audits/{audit_id}/download-pdf-url Returns a signed download URL without redirecting.
download_url
string
Signed URL valid for 1 hour
expires_in_seconds
integer
URL expiration time
storage_provider
string
Storage provider (“supabase”)

Configure Audit via Chat

POST /api/v1/audits/chat/config Configures audit settings and launches the pipeline.
audit_id
integer
required
Audit ID to configure
language
string
Content language
competitors
array
Competitor domains
market
string
Target market

Error Codes

400
error
Bad request or invalid parameters
401
error
Missing or invalid authentication token
403
error
Access denied (cross-user access)
404
error
Audit not found
409
error
PDF generation already in progress
422
error
Missing required fix inputs
503
error
Database or Redis temporarily unavailable

Build docs developers (and LLMs) love