Sanity Integration
Publish SEO-optimized content to your Sanity-powered website using the Mutations API for headless content delivery.
Sanity is a modern headless CMS that gives developers complete control over content structure and delivery. It's popular with Next.js, Gatsby, and Nuxt frontends — and it's incredibly powerful for content-driven websites.
GetRanked connects to Sanity's Mutations API to create documents in your dataset. We publish structured content that matches your Sanity schema, including rich text in Portable Text format, references to other documents, and custom fields.
Because Sanity is headless, your frontend controls how content is rendered. GetRanked focuses on creating the content — your Next.js or Gatsby frontend handles the presentation. This separation means you get the best SEO performance from your custom frontend while GetRanked handles content production at scale.
What you'll need
Project ID
Your Sanity project ID (found in sanity.io/manage)
Dataset
The dataset name (usually 'production')
API Token
A write token with editor permissions
Document Type
The schema type name for blog posts (e.g., 'post')
Step-by-step setup guide
Log in to Sanity Manage
Go to sanity.io/manage and select your project.
Get your Project ID and Dataset
Your Project ID is displayed in the project header. Your dataset name is under 'Datasets' (usually 'production').
Create an API Token
Go to API → Tokens → 'Add API Token'. Name it 'GetRanked', set permissions to 'Editor', and create it. Copy the token immediately.
Note your blog schema type
Check your Sanity schema files (usually in schemas/ directory) for the document type used for blog posts. Common names: 'post', 'article', 'blogPost'.
Connect in GetRanked
Enter your Project ID, dataset, API token, and document type in GetRanked's Sanity integration.
Map fields and test
Map content fields to your Sanity schema fields (title, slug, body, excerpt, etc.). Test with a draft document.
What GetRanked publishes to Sanity
- Documents with your schema's field structure
- Rich text in Portable Text (block content) format
- Slug fields with auto-generated URL-safe slugs
- References to category/tag documents
- SEO fields (meta title, description) if your schema includes them
- Draft or published state based on configuration
Tips for best results
Add SEO fields (metaTitle, metaDescription) to your blog schema if you haven't already.
Make sure your frontend renders Portable Text correctly for SEO (proper headings, links, etc.).
Use Sanity's GROQ queries on your frontend to build internal linking and related posts.
Set up a webhook in Sanity to trigger frontend rebuilds when GetRanked publishes new content.
Ready to rank your Sanity site?
Start publishing AI-generated, SEO-optimized content to Sanity today. No credit card required.