Skip
Mawkouta

Mawkouta public API

Read mosque profiles, prayer times and Iqama, announcements and events from your website or app.

Authentication

Verified profiles and prayer times are public, no key needed. Announcements and events require a key sent in the Authorization: Bearer header and only return data from the organization that owns the key.

Rate limits

60 requests per minute per key, 30 per minute per IP without a key. The X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers show your quota; when exceeded the response is 429 with Retry-After.

CORS

Public endpoints accept calls from any site (GET only). Key endpoints only accept browsers from origins allowed by the server: never expose a key in a public page.

Errors

Errors are returned as JSON {"error": "..."} with codes 400, 401 (missing, invalid or revoked key), 404 and 429.

Endpoints

Examples

curl

# Horaires publics (sans clé)
curl "https://mawkouta.com/api/v1/mosques/ma-mosquee/prayer-times?days=3"

# Annonces de votre organisation (clé requise)
curl -H "Authorization: Bearer mk_live_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  "https://mawkouta.com/api/v1/mosques/ma-mosquee/announcements"

JavaScript

const BASE = "https://mawkouta.com/api/v1";

// Horaires publics
const times = await fetch(`${BASE}/mosques/ma-mosquee/prayer-times?days=3`).then((r) => r.json());
console.log(times.scheduleSource, times.days[0]);

// Événements (côté serveur uniquement : ne publiez jamais la clé dans une page)
const res = await fetch(`${BASE}/mosques/ma-mosquee/events`, {
  headers: { Authorization: `Bearer ${process.env.MAWKOUTA_API_KEY}` },
});
if (res.status === 429) console.log("Réessayez dans", res.headers.get("Retry-After"), "s");
const { events } = await res.json();

OpenAPI 3.1 specificationGet a key

Mawkouta public API | Mawkouta