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.
| Method | Endpoint | Purpose |
|---|---|---|
| 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/search | Search current reviewed news |
| GET | /v1/akhbar/articles/{id} | Resolve an Akhbar article |
| GET | /v1/akhbar/status | Feed and index health |
All routes use Authorization: Bearer YOUR_API_KEY.
POST /v1/akhbar/search
{"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.
POST /v1/maktaba/search
{"query":"الطاقة الشمسية","filters":{"source_types":["news"]},"limit":10,"cursor":null}