SEO Pipeline API

Publish content to CMS and track SEO readiness scores across your project.

3 min read

SEO Pipeline API

Publish entities through the SEO pipeline to your connected CMS, and retrieve aggregate SEO readiness statistics for your project.

Publish Entities

POST /api/v1/seo/publish

Queue entities for publishing via the SEO pipeline. Entities are validated for SEO readiness before being pushed to the connected CMS integration.

Request Body

bucketIdstringrequired
The content bucket ID to publish from.
entityIdsstring[]
Optional array of specific entity IDs to publish. When omitted, all SEO-ready entities in the bucket are queued.
minSeoScorenumber
Minimum SEO readiness score (0-100) an entity must meet to be published. Entities below this threshold are skipped.

Response

data.jobIdstring
Job ID for tracking the publish pipeline progress.
data.entitiesQueuednumber
Number of entities that passed validation and were queued for publishing.
Tip
Set `minSeoScore` to enforce quality gates. Entities that don't meet the threshold are silently skipped -- use the SEO stats endpoint to find entities that need improvement.
Warning
Publishing requires an active CMS integration (e.g., Sanity) connected to the content bucket. The request will fail if no integration is configured.

Get SEO Statistics

GET /api/v1/seo/stats

Retrieve aggregate SEO readiness statistics across all content buckets in the project.

Response

data.totalEntitiesnumber
Total number of entities across all content buckets.
data.publishednumber
Number of entities that have been published via the SEO pipeline.
data.averageSeoScorenumber
Average SEO readiness score (0-100) across all entities.
data.bucketsBucketStats[]
Per-bucket breakdown of SEO statistics.
data.buckets[].idstring
Content bucket ID.
data.buckets[].namestring
Content bucket display name.
data.buckets[].publishednumber
Number of published entities in this bucket.
data.buckets[].averageScorenumber
Average SEO readiness score for entities in this bucket.
Note
SEO scores are calculated using the `validateSeoReadiness()` function, which checks for required fields like title, meta description, slug, and content length. See the [Content Buckets](/docs/content-buckets) documentation for details on configuring SEO rules per bucket.
Was this helpful?

Command Palette

Search for a command to run...