seoai-client
v1.1.9
Published
Official client for the SEOAI Blog API. Fetch and render real-time, SEO-optimized blog content directly into your website or app.
Readme
SEOAI Client
Official client for the SEOAI Blog API. Fetch and render real-time, SEO-optimized blog content directly into your website or app.
Features
- Fetch articles by page and limit
- Retrieve articles by category or tag
- Access detailed information about a specific article
- Built-in slugify and transliteration utilities
Installation
npm install seoai-clientUsage
import { SeoAiClient } from 'seoai-client';
// Initialize the client with your API key
const client = new SeoAiClient('your_api_key_here');
// Fetch topics (paginated)
const topics = await client.getTopics(0, 10);
console.log('Topics:', topics);
// Fetch a single article by topic ID
const article = await client.getArticle(123);
console.log('Article:', article);API
SeoAiClient
constructor(apiKey: string)getArticles(page?: number, limit?: number): Promise<IArticle[]>getCategoryArticles(categorySlug: string, page?: number, limit?: number): Promise<IArticle[]>getTagArticles(tagSlug: string, page?: number, limit?: number): Promise<IArticle[]>getArticle(slug: string): Promise<IArticle>
Utilities
slugify(text: string): stringtransliterate(text: string): string
Types
See src/types.ts for all exported types: IArticle, ICategory, ITag, IRelatedPost.
License
MIT
