seobot
v1.5.0
Published
Client library for the SEObot API
Readme
SEObot Blog API Client library
Overview
Elevate your website by integrating SEObot's Blog API. This setup allows you to fetch and render real-time, SEO-optimized blog content directly into your website.
Demo
Visit the DevHunt Blog to check out an example of SEObot Blog API integration.
AI Coding Agents & Lovable Integration
Looking to integrate SEObot into your Next.js project using an AI coding agent (Lovable, Cursor, Copilot, Claude, etc.)?
Use the ready-made LLM instruction guide in the Next.js example repo - it includes all types, API usage, SSR page code, sitemap setup, and key gotchas in a single copy-paste prompt:
👉 SEObot: Next.js SSR Integration Guide for AI Agents
Prerequisites
SEObot API Key - you can find the API key in settings on app.seobotai.com
Features
- Fetch articles by page and limit.
- Retrieve articles based on categories or tags.
- Access detailed information about a specific article.
- Built-in caching mechanism for efficient data retrieval.
Installation
To install the seobot npm package, run:
npm install seobotUsage
import { BlogClient } from 'seobot';
const client = new BlogClient('your_seobot_api_key_here');Fetching Articles
// Note: page parameter is zero-based (0 = first page, 1 = second page, etc.)
const articles = await client.getArticles(page, limit);Fetching Articles by Category
// Note: page parameter is zero-based (0 = first page, 1 = second page, etc.)
const articles = await client.getCategoryArticles(categorySlug, page, limit);Fetching Articles by Tag
// Note: page parameter is zero-based (0 = first page, 1 = second page, etc.)
const articles = await client.getTagArticles(tagSlug, page, limit);Getting a Single Article
const article = await client.getArticle(slug);Data Types
interface IArticle {
id: string;
slug: string;
title: string;
headline: string;
metaDescription: string;
metaKeywords: string;
tags: ITag[];
category: ICategory;
readingTime: number;
html: string;
markdown: string;
outline: string;
deleted: boolean;
published: boolean;
publishedAt: string;
createdAt: string;
updatedAt: string;
relatedPosts: IRelatedPost[];
image: string;
isTool?: boolean;
isVideo?: boolean;
isNews?: boolean;
}
interface ITag {
id: string;
title: string;
slug: string;
}
interface ICategory {
id: string;
title: string;
slug: string;
}
interface IRelatedPost {
id: string;
headline: string;
slug: string;
}Contributing
Contributions are welcome. Please open an issue or submit a pull request for any bugs, features, or improvements.
License
This project is licensed under the MIT License.
Contact
For additional assistance or information, feel free to reach out.
Revolutionize your website's content strategy with real-time, automated, SEO-optimized blog posts. Get started with SEObot AI Blog Autopilot integration today!
