Sawalni API
APIsDocumentationOpen portal ↗
Omneity Labs API collection ↗Integration quickstart →API keys and playgrounds →
API Reference

Akhbar API

Akhbar is the fresh-news layer of the Sawalni platform. It reviews Moroccan publisher feeds, rejects article spam and compromised-source bursts, mines topics, and groups related coverage around a real representative article. Maktaba remains the broad web index. Use source_types: ["news"] in Maktaba when you need historical or general indexed news.

Endpoints

MethodEndpointPurpose
GET/v1/akhbar/edition?category=Today’s clustered headlines and varied lower edition
GET/v1/akhbar/headlines?category=Compact headline clusters for agents and briefings
POST/v1/akhbar/searchSearch current reviewed news
GET/v1/akhbar/articles/{id}Resolve an Akhbar article
GET/v1/akhbar/statusFeed and index health

All routes use Authorization: Bearer YOUR_API_KEY.

Search

POST /v1/akhbar/search

json
{"query":"الطاقة الشمسية","filters":{"languages":["ar"],"categories":["economy"]},"limit":10}

The response contains reviewed articles and clusters. Headlines always come from a publisher article. The representative field is the article nearest the cluster centroid and carries the image used for the cluster.

Maktaba news search

POST /v1/maktaba/search

json
{"query":"الطاقة الشمسية","filters":{"source_types":["news"]},"limit":10,"cursor":null}