Skip to main content

What is Stru Blog API?

The Stru Blog API is a complete REST API for managing blog posts with full CRUD operations, pagination, search, and filtering capabilities. Create, read, update, and delete blog posts with ease. Base URL: https://api.stru.ai Authentication: API key (handled internally)
Internal Use Only - This API is restricted to internal use. External access is not available.

Core Concepts

Blog Posts

Complete blog articles with title, content (markdown), author, tags, and metadata. Each post has a unique ID and URL-friendly slug.

Slugs

URL-friendly identifiers auto-generated from titles. Use slugs for clean URLs like /blog/my-post-title.

Tags

Categorize blog posts with tags. Filter and search posts by tags to organize content.

Publishing

Control visibility with published/unpublished status. Draft posts before publishing them live.

Key Features

  • Full CRUD Operations: Create, read, update, and delete blog posts
  • Semantic Search: Full-text search across titles and content
  • Pagination: Efficient pagination for large blog collections
  • Filtering: Filter by tags, authors, and publication status
  • Auto-generation: Automatic slug and description generation
  • Markdown Support: Rich content with markdown formatting

Quick Start

1

List All Blogs

Get a paginated list of published blog posts.
curl https://api.stru.ai/blogs
2

Create Your First Blog Post

Add a new blog post with title and content.
curl -X POST https://api.stru.ai/blogs \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Getting Started with ETABS API",
    "content": "# Introduction\n\nLearn how to automate ETABS...",
    "author": "John Doe",
    "tags": ["etabs", "automation", "python"]
  }'
3

Search Blog Posts

Find relevant blog posts using full-text search.
curl "https://api.stru.ai/blogs/search?q=ETABS"
4

Get Blog by Slug

Retrieve a specific blog post using its URL-friendly slug.
curl https://api.stru.ai/blogs/slug/getting-started-with-etabs-api

Response Format

All blog endpoints return JSON with consistent structure:
{
  "id": "ec94c8ac-44a2-4093-acce-548905684ddf",
  "title": "ETABS Python API Tutorial",
  "content": "# Full markdown content...",
  "author": "John Doe",
  "description": "Learn how to automate ETABS...",
  "tags": ["python", "etabs", "automation"],
  "thumbnail": "https://example.com/thumb.jpg",
  "slug": "etabs-python-api-tutorial",
  "published": true,
  "created_at": "2025-10-11T01:48:25.067567",
  "updated_at": "2025-10-11T01:48:25.067567"
}

Best Practices

Always use slugs instead of UUIDs in your blog URLs for better SEO and user experience.
Good: /blog/etabs-python-tutorial
Bad: /blog/ec94c8ac-44a2-4093-acce-548905684ddf
Let the API auto-generate slugs and descriptions from your content. Override only when needed for SEO optimization.
Tag your posts with relevant categories. This enables powerful filtering and helps users discover related content.
"tags": ["python", "automation", "tutorial", "etabs"]
Create posts with published: false to draft content before making it live. Update to published: true when ready.

API Endpoints Overview

EndpointMethodDescription
/blogsGETList all blogs with pagination and filters
/blogs/searchGETSearch blogs by query
/blogs/{blog_id}GETGet blog by UUID
/blogs/slug/{slug}GETGet blog by slug
/blogsPOSTCreate a new blog post
/blogs/{blog_id}PUTUpdate an existing blog post
/blogs/{blog_id}DELETEDelete a blog post