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

Maktaba · Web and Social Search

Search public web pages and social content. Retrieve source pages or submit a research task. API requests require a bearer API key. Public sources do not mean anonymous API access.

Endpoints

MethodEndpointPurpose
POST/v1/maktaba/searchSearch indexed web pages
POST/v1/maktaba/social/searchSearch social content
GET/v1/maktaba/pages/{page_id}Retrieve a source page
POST/v1/maktaba/researchSubmit a research task

Search web pages

bash
curl https://api.sawalni.com/v1/maktaba/search \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"query":"renewable energy in Morocco","limit":5}'

The search request accepts query, limit, cursor, and a filters object. Filter fields include domains, languages, source_types, published_from, and published_to.

Search social content

bash
curl https://api.sawalni.com/v1/maktaba/social/search \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"query":"Moroccan culture","limit":5}'

Optional social filters include language and platform.

Research

bash
curl https://api.sawalni.com/v1/maktaba/research \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"task":"Find sources on renewable energy in Morocco","mode":"deep"}'

Use returned source references in your application. Check the current response and rate-limit headers. Handle failed requests before using their content. Do not treat a retrieved source as a verified fact.

Related APIs

  • Akhbar: news editions and search
  • Atlas: places and routes
  • Knowledge and context integration
  • Khizana: your own documents