BlogNow.Tech logoBlogNow.Tech
DocsPricing

    Getting Started

    • Introduction
    • Quick Start
    • Authentication

    Integrations

    • Next.js
    • React
    • Vite
    • Vue.js
    • Nuxt
    • Astro

    SDK

    • Overview

    API Reference

    • Overview

    BlogNow SDK

    Official JavaScript/TypeScript SDK for BlogNow CMS. Get started quickly with type-safe methods, automatic authentication, and built-in error handling.

    Quick Start GuideView on NPM

    Installation

    npm

    npm install @blognow/sdk

    yarn

    yarn add @blognow/sdk

    pnpm

    pnpm add @blognow/sdk

    Quick Example

    import { BlogNow } from '@blognow/sdk';
    
    // Initialize the client
    const blognow = new BlogNow({
      apiKey: process.env.BLOGNOW_API_KEY
    });
    
    // Fetch published posts
    const posts = await blognow.posts.list({
      status: 'published',
      limit: 10
    });
    
    // Get a single post by slug
    const post = await blognow.posts.getBySlug('my-post-slug');

    Why Use the SDK?

    Type-Safe & Intuitive

    Full TypeScript support with IntelliSense and auto-completion

    Complete type definitions for all methods
    IntelliSense support in VS Code and other IDEs
    Catch errors at compile time, not runtime

    Automatic Authentication

    Built-in API key management and secure requests

    Automatic header injection for all requests
    Secure API key storage and handling
    Environment variable support out of the box

    Error Handling

    Comprehensive error handling with helpful messages

    Detailed error messages with context
    Built-in retry logic for failed requests
    Structured error responses you can handle

    Framework Support

    Works seamlessly with popular JavaScript frameworks

    Next.js (App Router & Pages Router)
    React, Vue, Nuxt, Svelte, and more
    Works in both browser and Node.js

    Available Methods

    Posts

    Manage and retrieve blog posts

    • • list()
    • • getBySlug()
    • • getById()
    • • search()

    Categories

    Organize posts by categories

    • • list()
    • • getBySlug()
    • • getById()
    • • getPosts()

    Tags

    Filter content with tags

    • • list()
    • • getBySlug()
    • • getById()
    • • getPosts()

    Search

    Full-text search capabilities

    • • search()
    • • Filter by category
    • • Filter by tag
    • • Pagination support

    Framework Integration Guides

    Step-by-step guides for integrating BlogNow SDK with your favorite framework

    Next.js IntegrationReact IntegrationVue.js IntegrationNuxt 3 IntegrationVite IntegrationAstro Integration

    Prefer Using the REST API Directly?

    If you need more control or are using a different language, you can interact with our REST API directly.

    The REST API provides all the same functionality as the SDK, with complete OpenAPI/Swagger documentation and interactive examples.

    API Documentation View Interactive Docs

    Need Help?

    Questions about the SDK? Check our guides or reach out to support.

    Quick Start GuideContact Support