The Simplist SDK provides powerful SEO tools to improve your content's search engine visibility. Generate sitemaps, RSS feeds, and structured data with minimal code.
| Method | Description | Returns |
|---|---|---|
| Get SEO metadata for an article | ArticleWithSeo | |
| Generate sitemap (XML/JSON) | string | Sitemap | |
| Generate RSS 2.0 feed | string | |
| Get JSON-LD structured data | StructuredDataResponse |
Configure article URL paths once when creating the client, instead of repeating them in every SEO method call.
client-with-path.tsimport { SimplistClient } from "@simplist.blog/sdk"
const client = new SimplistClient({
apiKey: process.env.SIMPLIST_API_KEY,
path: 'blog' // Articles will use: /blog/article-slug
})
// Now all SEO methods automatically use 'blog/' prefix
const sitemap = await client.seo.getSitemap('https://myblog.com', 'xml')
// Generates URLs like: https://myblog.com/blog/article-slugFetch complete SEO metadata for a specific article.
get-seo.tsconst article = await client.seo.getArticle(
'my-article-slug',
'https://myblog.com'
)
console.log(article.seo.metaTitle)
console.log(article.seo.metaDescription)
console.log(article.seo.ogImage)
console.log(article.seo.structuredData)| Property | Type | Description | Default |
|---|---|---|---|
metaTitle* | string | Page title for search results | - |
metaDescription* | string | Page description for search results | - |
ogTitle | string | Open Graph title | - |
ogDescription | string | Open Graph description | - |
ogImage | string | Open Graph image URL | - |
ogType* | string | Open Graph type (article, website) | - |
twitterTitle | string | Twitter card title | - |
twitterDescription | string | Twitter card description | - |
twitterImage | string | Twitter card image | - |
twitterCard* | 'summary' | 'summary_large_image' | Twitter card type | - |
canonicalUrl | string | Canonical URL | - |
structuredData | Record<string, any> | JSON-LD structured data | - |
keywords | string[] | Article keywords | - |
language* | string | Content language | - |
author | string | Author name | - |
publishedTime | string | Publication timestamp | - |
modifiedTime | string | Last modified timestamp | - |
readingTime | number | Reading time in minutes | - |
Perfect for Next.js generateMetadata:
article-page.tsximport { SimplistClient } from "@simplist.blog/sdk"
import { Metadata } from "next"
// Uses SIMPLIST_API_KEY from environment variables
const client = new SimplistClient()
export async function generateMetadata({ params }: {
params: { slug: string }
}): Promise<Metadata> {
const article = await client.seo.getArticle(
params.slug,
'https://myblog.com'
)
const { seo } = article
return {
title: seo.metaTitle,
description: seo.metaDescription,
keywords: seo.keywords,
authors: seo.author ? [{ name: seo.author }] : undefined,
openGraph: {
title: seo.ogTitle,
description: seo.ogDescription,
images: seo.ogImage ? [seo.ogImage] : undefined,
type: seo.ogType as any,
publishedTime: seo.publishedTime,
modifiedTime: seo.modifiedTime,
locale: seo.language
},
twitter: {
card: seo.twitterCard,
title: seo.twitterTitle,
description: seo.twitterDescription,
images: seo.twitterImage ? [seo.twitterImage] : undefined
},
alternates: {
canonical: seo.canonicalUrl
}
}
}
export default async function ArticlePage({ params }: {
params: { slug: string }
}) {
const article = await client.seo.getArticle(
params.slug,
'https://myblog.com'
)
return (
<article>
<h1>{article.title}</h1>
<div dangerouslySetInnerHTML={{ __html: article.content }} />
</article>
)
}Create XML or JSON sitemaps for search engines.
sitemap-route.ts// app/sitemap.xml/route.ts (Next.js App Router)
import { SimplistClient } from "@simplist.blog/sdk"
// Uses SIMPLIST_API_KEY from environment variables
const client = new SimplistClient()
export async function GET() {
const sitemapXml = await client.seo.getSitemap(
'https://myblog.com',
'xml'
)
return new Response(sitemapXml, {
headers: {
'Content-Type': 'application/xml',
'Cache-Control': 'public, max-age=3600'
}
})
}Get sitemap data programmatically:
json-sitemap.tsconst sitemap = await client.seo.getSitemap(
'https://myblog.com',
'json'
)
console.log(`Generated at: ${sitemap.generatedAt}`)
console.log(`Total pages: ${sitemap.entries.length}`)
sitemap.entries.forEach(entry => {
console.log(`URL: ${entry.url}`)
console.log(`Last Modified: ${entry.lastModified}`)
console.log(`Priority: ${entry.priority}`)
console.log(`Change Frequency: ${entry.changeFrequency}`)
})Override the global path or specify paths per-call:
custom-path.ts// Using global path (set in client config)
const client = new SimplistClient({
path: 'blog' // Articles at /blog/slug
})
const sitemap = await client.seo.getSitemap('https://myblog.com', 'xml')
// Generates: https://myblog.com/blog/article-slug
// Override with custom path
const sitemap2 = await client.seo.getSitemap(
'https://myblog.com',
'xml',
'articles' // Override to /articles/slug
)
// Generates: https://myblog.com/articles/article-slugsitemap-entry.ts{
url: 'https://myblog.com/articles/my-article',
lastModified: '2025-12-08T10:30:00Z',
changeFrequency: 'weekly',
priority: 0.8
}Create RSS 2.0 feeds for syndication.
rss-route.ts// app/rss.xml/route.ts (Next.js App Router)
import { SimplistClient } from "@simplist.blog/sdk"
// Uses SIMPLIST_API_KEY from environment variables
const client = new SimplistClient()
export async function GET() {
const rssXml = await client.seo.getRssFeed(
'https://myblog.com',
20 // Include 20 latest articles
)
return new Response(rssXml, {
headers: {
'Content-Type': 'application/rss+xml',
'Cache-Control': 'public, max-age=3600'
}
})
}rss-custom-path.ts// Using global path
const client = new SimplistClient({
path: 'posts'
})
const rss = await client.seo.getRssFeed('https://myblog.com', 20)
// Generates: https://myblog.com/posts/article-slug
// Override per-call
const rss2 = await client.seo.getRssFeed(
'https://myblog.com',
20,
'blog' // Use /blog/ instead
)| Property | Type | Description | Default |
|---|---|---|---|
baseUrl* | string | Base URL for article links | - |
limit | number | Max articles to include | 20 |
path | string | Article path (e.g., "blog", "articles") | Global path |
Get JSON-LD structured data for enhanced search results.
structured-data.tsconst data = await client.seo.getStructuredData('https://myblog.com')
console.log(data.project.name)
console.log(data.project.description)
console.log(`Total articles: ${data.articles.length}`)
// Get structured data for specific article
const articleData = data.articles.find(a => a.slug === 'my-article')
if (articleData) {
console.log(JSON.stringify(articleData.structuredData, null, 2))
}article-with-schema.tsximport { SimplistClient } from "@simplist.blog/sdk"
// Uses SIMPLIST_API_KEY from environment variables
const client = new SimplistClient()
export default async function ArticlePage({ params }: {
params: { slug: string }
}) {
const article = await client.seo.getArticle(
params.slug,
'https://myblog.com'
)
return (
<>
{/* JSON-LD Structured Data */}
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify(article.seo.structuredData)
}}
/>
{/* Article Content */}
<article>
<h1>{article.title}</h1>
<time dateTime={article.publishedAt}>
{new Date(article.publishedAt).toLocaleDateString()}
</time>
<div dangerouslySetInnerHTML={{ __html: article.content }} />
</article>
</>
)
}Simplist automatically generates appropriate schema types:
- Article - For blog posts
- BlogPosting - For blog content
- NewsArticle - For news content
- Author - Author information
- Organization - Site/project information
Full Next.js implementation with all SEO features:
complete-seo-setup.ts// lib/simplist.ts
import { SimplistClient } from "@simplist.blog/sdk"
export const client = new SimplistClient({
apiKey: process.env.SIMPLIST_API_KEY,
path: 'blog' // All articles at /blog/slug
})
// ===== Article Page with Metadata =====
// app/blog/[slug]/page.tsx
import { client } from "@/lib/simplist"
import { Metadata } from "next"
export async function generateMetadata({ params }: {
params: { slug: string }
}): Promise<Metadata> {
const article = await client.seo.getArticle(
params.slug,
process.env.NEXT_PUBLIC_URL
)
return {
title: article.seo.metaTitle,
description: article.seo.metaDescription,
openGraph: {
title: article.seo.ogTitle,
description: article.seo.ogDescription,
images: article.seo.ogImage ? [article.seo.ogImage] : undefined,
type: 'article'
}
}
}
export default async function Page({ params }: {
params: { slug: string }
}) {
const article = await client.seo.getArticle(
params.slug,
process.env.NEXT_PUBLIC_URL
)
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify(article.seo.structuredData)
}}
/>
<article>
<h1>{article.title}</h1>
<div dangerouslySetInnerHTML={{ __html: article.content }} />
</article>
</>
)
}
// ===== Sitemap Route =====
// app/sitemap.xml/route.ts
import { client } from "@/lib/simplist"
export async function GET() {
const xml = await client.seo.getSitemap(
process.env.NEXT_PUBLIC_URL!,
'xml'
)
return new Response(xml, {
headers: {
'Content-Type': 'application/xml',
'Cache-Control': 'public, max-age=3600'
}
})
}
// ===== RSS Feed Route =====
// app/rss.xml/route.ts
import { client } from "@/lib/simplist"
export async function GET() {
const xml = await client.seo.getRssFeed(
process.env.NEXT_PUBLIC_URL!,
50
)
return new Response(xml, {
headers: {
'Content-Type': 'application/rss+xml',
'Cache-Control': 'public, max-age=3600'
}
})
}Cache generated sitemaps and RSS feeds:
- Use
Cache-Controlheaders (1-24 hours) - Consider static generation for better performance
- Invalidate cache when content changes
Ensure consistent URL structure:
- Use global
pathconfiguration for consistency - Always include protocol (
https://) - Remove trailing slashes from base URLs
Optimize SEO operations:
- Generate sitemaps at build time when possible
- Use Next.js Route Handlers for dynamic generation
- Consider incremental static regeneration (ISR)
Submit your URLs to search engines:
- Add sitemap URL to
robots.txt - Submit sitemap to Google Search Console
- Submit sitemap to Bing Webmaster Tools
public/robots.txtUser-agent: *
Allow: /
Sitemap: https://myblog.com/sitemap.xml- Articles API - Fetch article content
- Multilingual Support - Handle translated content
- Complete Examples - Full integration guides