Skip to main content
Sanaa API / Developer Docs

Sanaa Blog Syndication API

A public read-only API for distributing Sanaa blog insights across your websites, mobile apps, landing pages, newsletters, and partner integrations.

Public JSON No API key is required for read access to these blog endpoints.
Cross-site Ready Cross-origin requests are enabled, so browser-side fetches from your other domains can consume these endpoints directly.
Cache-aware Responses return cache headers for short-lived syndication caching: max-age=300 and s-maxage=600.

Endpoints

Use the list endpoint for paginated archives, the latest endpoint for homepage widgets, the detail endpoint for a single article, and the manifest endpoint for integration discovery.

Query Parameters

These filters let other Sanaa properties pull only the content they need, with body inclusion available when a downstream site needs to render the full article.

Parameter Type Scope Description Example
per_page integer list Number of results per page. Range: 1 to 50. 12
page integer list Pagination page number for the list endpoint. 2
limit integer latest Number of latest items to return. Range: 1 to 30. 6
q string list, latest Full-text search across title, excerpt, and body. payments
category id or slug list, latest Filter by blog category. business
tag id or slug list, latest Filter by blog tag. fintech
author integer list, latest Filter by author ID. 4
featured boolean list, latest Return only featured posts. 1
updated_since ISO 8601 datetime list, latest Return content updated on or after a specific timestamp. 2026-04-01T00:00:00Z
include string list, latest, detail Set to body to include article body in the payload. body
format string list, latest, detail When body is included, choose html or text. text
include_body boolean list, latest, detail Alternative boolean switch for including body content. 1

Response Shape

Each post includes canonical URLs, taxonomy, author data, public engagement counts, and reusable SEO fields so downstream sites can render both cards and article pages without extra lookups.

Field Description
id Internal blog ID.
slug Stable article identifier for detail fetches.
title Blog headline.
excerpt Short summary for cards and previews.
body Nullable unless include=body or include_body=1 is provided.
reading_time Estimated reading time in minutes.
featured Boolean featured flag.
published_at / updated_at ISO 8601 timestamps.
url Canonical article URL on sanaa.ug.
featured_image_url Resolved public image URL.
seo.meta_title / meta_description / keywords SEO payload for reuse on partner pages.
stats.views / likes / shares / bookmarks Public engagement counters.
author / category / tags Nested metadata for attribution and taxonomy.

Sample Payload

JSON
{
    "data": [
        {
            "id": 25,
            "slug": "the-reason-your-lending-business-isnt-growing",
            "title": "The Reason Your Lending Business Isn't Growing Isn't Capital. It's Control.",
            "excerpt": "Most lending businesses we work with have the same problem. Not enough borrowers? No. Their books are full.",
            "body": null,
            "reading_time": 4,
            "featured": true,
            "published_at": "2026-04-04T10:30:00Z",
            "updated_at": "2026-04-05T07:15:00Z",
            "url": "https://www.sanaa.ug/blog/the-reason-your-lending-business-isnt-growing",
            "featured_image_url": "https://www.sanaa.ug/storage/blog/featured/control.jpg",
            "seo": {
                "meta_title": "The Reason Your Lending Business Isn't Growing | Finance",
                "meta_description": "Why lending businesses stall when operations, visibility, and financial controls fall behind growth.",
                "keywords": "Lending, Finance, Growth, Control, Sanaa"
            },
            "stats": {
                "views": 1240,
                "likes": 41,
                "shares": 12,
                "bookmarks": 19
            },
            "author": {
                "id": 1,
                "name": "Sanaa Team",
                "url": null
            },
            "category": {
                "id": 2,
                "name": "Finance",
                "slug": "finance",
                "url": "https://www.sanaa.ug/blog/category/finance"
            },
            "tags": [
                {
                    "id": 7,
                    "name": "Lending",
                    "slug": "lending",
                    "url": "https://www.sanaa.ug/blog/tag/lending"
                }
            ]
        }
    ],
    "meta": {
        "count": 1,
        "generated_at": "2026-10-28T23:00:50.573244Z"
    },
    "links": {
        "self": "https://www.sanaa.ug/api/v1/insights/latest?limit=1",
        "all": "https://www.sanaa.ug/api/v1/insights"
    }
}

Usage Examples

These are the most common pull patterns for Sanaa properties: homepage rails, featured sections, category pages, and incremental refresh jobs.

Copy-Paste Snippets

Start with these server-side or frontend examples, then cache and render the API data in your target experience.

JavaScript

Fetch
const response = await fetch('https://www.sanaa.ug/api/v1/insights/latest?limit=6&featured=1');
const payload = await response.json();

payload.data.forEach((post) => {
  console.log(post.title, post.url, post.seo.meta_description);
});

Laravel / PHP

HTTP Client
use Illuminate\Support\Facades\Http;

$payload = Http::timeout(5)
    ->acceptJson()
    ->get('https://www.sanaa.ug/api/v1/insights', [
        'per_page' => 6,
        'category' => 'business',
    ])
    ->throw()
    ->json();

foreach ($payload['data'] as $post) {
    echo $post['title'] . PHP_EOL;
}