Islamic Events

Developer API

Show events from Islamic Events on your own website or app, such as your mosque's upcoming lectures, classes and community events. It's free.

Request an API key

API key required

Every request needs a key. Keys are free.

Filter anything

By mosque, date, category, audience or distance.

Read-only

Simple GET requests that return JSON.

Quick start

Every endpoint is a GET request that returns JSON. The base URL is:

https://islamicevents.app/api/v1

You need an API key. Replace YOUR_API_KEY below with yours.

Most integrations need only two calls. First, find your mosque's id:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://islamicevents.app/api/v1/mosques?q=example"

Then fetch its upcoming events:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://islamicevents.app/api/v1/mosques/MOSQUE_ID/events?limit=20"

Or from JavaScript on your server:

const res = await fetch(
  "https://islamicevents.app/api/v1/mosques/MOSQUE_ID/events?limit=10",
  { headers: { "X-API-Key": process.env.ISLAMIC_EVENTS_API_KEY } }
)
const { mosque, data: events } = await res.json()

for (const event of events) {
  const when = new Date(event.starts_at).toLocaleString()
  console.log(`${when} — ${event.title} (${event.url})`)
}

Can't find your mosque? It may not be listed yet. You can still use /events with a location filter.

Authentication

Every request must include an API key. Send it in the X-API-Key header:

X-API-Key: YOUR_API_KEY

Or as a bearer token: Authorization: Bearer YOUR_API_KEY. Requests without a valid key get a 401 error.

Keys are free and issued by the Islamic Events team. Request a key below. Use one key per app or website.

  • Keep your key private. Call the API from your server, not from code that runs in your visitors' browsers, where anyone can read the key.
  • We count the requests made with each key. Keys that are misused can be revoked.
  • If your key leaks, ask us for a new one and we'll revoke the old one.

Attribution (required)

Wherever you show data from the API, you must credit Islamic Events App and show the website islamicevents.app. Both must be visible to your users, next to the events. On the web, link to the website:

<p>
  Events from Islamic Events App ·
  <a href="https://islamicevents.app">islamicevents.app</a>
</p>

In a mobile app or on a screen where links aren't possible, show the same text: Events from Islamic Events App · islamicevents.app. We may revoke keys that are used without this credit.

Request an API key

Tell us who you are and what you're building. We review every request and email your key to you. You can also email admin@islamicevents.app.

Endpoints

List mosques

GET/api/v1/mosques

Returns mosques sorted by name. Use it to look up the id of a mosque.

Query parameters

NameTypeDescription
qstringMosque name contains this text (case-insensitive, max 100 characters).
citystringExact city match (case-insensitive), e.g. London.
countrystringExact country match (case-insensitive).
limitintegerResults per page, 1–100. Default 50.
offsetintegerNumber of results to skip. Default 0.

Response: { "data": [Mosque, …], "pagination": { … } }

Get a mosque

GET/api/v1/mosques/{id}

Response: { "data": Mosque }. Returns 404 if the id is unknown or isn't a UUID.

Events at a mosque

GET/api/v1/mosques/{id}/events

Returns upcoming events at the mosque, earliest first. Accepts all of the event filters except mosque_id. The response also contains the mosque itself:

{
  "mosque": {
    "id": "1b3e…",
    "name": "Example Mosque",
    "website_url": "https://example-mosque.org",
    "address": "1 Example Road",
    "city": "London",
    "postcode": "E1 1AA",
    "country": "United Kingdom",
    "lat": 51.517,
    "lng": -0.065
  },
  "data": [
    {
      "id": "7f2c…",
      "slug": "tafsir-class-7f2c1a9e",
      "url": "https://islamicevents.app/events/tafsir-class-7f2c1a9e",
      "title": "Tafsir class",
      "description": "Weekly tafsir of Surah al-Kahf.",
      "category": "lecture",
      "audience": "all",
      "starts_at": "2026-10-09T18:00:00+00:00",
      "ends_at": "2026-10-09T19:30:00+00:00",
      "venue_type": "venue",
      "location": { "name": "Main hall", "address": null, "lat": 51.517, "lng": -0.065 },
      "image_url": null,
      "image_position": 50,
      "source_url": "https://example-mosque.org/events",
      "is_featured": false,
      "series_id": "7f2c…",
      "recurrence": { "rule": "weekly", "days": [5], "week_of_month": null, "until": null },
      "mosque": { "id": "1b3e…", "name": "Example Mosque", "…": "…" }
    }
  ],
  "pagination": { "limit": 20, "offset": 0, "total": 14 }
}

List events

GET/api/v1/events

Returns upcoming events across all mosques and organisers, earliest first. This includes events that aren't linked to a mosque, whose mosque is null.

Response: { "data": [Event, …], "pagination": { … } }

Example: online sisters' events in November:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://islamicevents.app/api/v1/events?audience=sisters&venue_type=online&from=2026-11-01&to=2026-11-30T23:59:59Z"

Example: events within 10 km of a point:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://islamicevents.app/api/v1/events?lat=51.5072&lng=-0.1276&radius=10"

Event filters

/events and /mosques/{id}/events accept these query parameters. Combine them as you like.

Query parameters

NameTypeDescription
mosque_idUUIDOnly events at this mosque. /events only; same as /mosques/{id}/events.
fromISO 8601Earliest time. Default is now. Events still in progress at this time are included.
toISO 8601Latest start time. Must be on or after from (now, if from is not set).
categorystringprayer, lecture, community, fundraiser, eid or other. New categories may be added.
audienceenumbrothers, sisters or all.
venue_typeenumvenue (in person), online or hybrid.
featuredbooleantrue or false.
lat, lngnumberSearch around a point. Both are required together.
radiusnumberSearch radius in km when lat/lng are given. Above 0 and up to 500. Default 25.
limitintegerResults per page, 1–100. Default 50.
offsetintegerNumber of results to skip. Default 0.
  • Dates can be a date (2026-11-01) or a date and time with a UTC offset (2026-11-01T18:00:00Z).
  • Results are always sorted by start time, including on radius searches.
  • Radius searches only return events that have coordinates.

Get an event

GET/api/v1/events/{idOrSlug}

Look up an event by its id or slug. Unlike the lists, this also returns past events. Response: { "data": Event }.

Prayer times

GET/api/v1/prayer-times?mosque_id={id}
GET/api/v1/mosques/{id}/prayer-times

Returns the mosque's daily prayer timetable: begin and jamaat times for the five prayers, sunrise, and the Jumu'ah times in effect each day. mosque_id is required. Without it you get a 400. With no dates you get today.

Query parameters

NameTypeDescription
mosque_idUUIDRequired on /prayer-times. On /mosques/{id}/prayer-times the id comes from the path.
dateYYYY-MM-DDOne day. Can't be combined with from/to.
fromYYYY-MM-DDFirst day. Default is today (UK time).
toYYYY-MM-DDLast day. Default is from. A request covers at most 366 days.
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://islamicevents.app/api/v1/prayer-times?mosque_id=MOSQUE_ID&from=2026-10-01&to=2026-10-31"
{
  "mosque": { "id": "1b3e…", "name": "Example Mosque", "…": "…" },
  "data": [
    {
      "date": "2026-10-09",
      "fajr": { "begins": "05:46", "jamaat": "06:15" },
      "sunrise": "07:17",
      "dhuhr": { "begins": "12:56", "jamaat": "13:30" },
      "asr": { "begins": "15:52", "jamaat": "16:15" },
      "maghrib": { "begins": "18:26", "jamaat": "18:31" },
      "isha": { "begins": "19:51", "jamaat": "20:00" },
      "jumuah": ["13:15", "13:45"],
      "source_url": "https://example-mosque.org/prayer-times",
      "updated_at": "2026-10-06T03:00:12+00:00"
    }
  ],
  "range": { "from": "2026-10-09", "to": "2026-10-09" }
}
  • We read the times from each mosque's own published timetable, daily. Days the timetable doesn't cover aren't returned, so data can be shorter than the range or empty.
  • Times are local to the mosque, exactly as printed. They have no time zone.

Objects

Mosque

NameTypeDescription
idUUIDUse it with /mosques/{id}/events.
namestring
website_urlstringThe mosque's website.
address, city, postcode, countrystring | null
lat, lngnumber | nullCoordinates.

Event

NameTypeDescription
idUUIDUnique for every occurrence.
slugstringStable, URL-friendly identifier.
urlstringThe event page on Islamic Events. Link here when you show an event.
titlestring
descriptionstring | nullPlain text.
categorystringSee the category filter.
audiencestringbrothers, sisters or all.
starts_atISO 8601Start time with UTC offset.
ends_atISO 8601 | nullEnd time, if known.
venue_typestringvenue, online or hybrid.
locationobjectname, address, lat, lng. Any of them can be null.
image_urlstring | nullPoster or cover image.
image_positionnumberVertical focus point of the image, 0–100 (%). Use as CSS object-position: center N%.
source_urlstring | nullWhere we found the event (for example the organiser's page).
is_featuredboolean
series_idUUID | nullShared by every occurrence of a recurring event. null for one-off events.
recurrenceobject | nullHow the series repeats. See Recurring events.
mosqueMosque | nullThe mosque hosting the event, if known.
distance_kmnumberOnly present on radius searches. Distance from lat/lng, 1 decimal place.

Prayer times (one day)

NameTypeDescription
dateYYYY-MM-DD
fajr, dhuhr, asr, maghrib, ishaobject{ begins, jamaat }. Each is "HH:MM" (24-hour, mosque local time) or null if the timetable doesn't show it. If maghrib has no jamaat time, its begins time is used.
sunrisestring | null"HH:MM".
jumuahstring[]Jumu'ah (Friday prayer) times in effect that day, earliest first (up to 3). Set on every day, not only Fridays: the mosque's current times, or the ones its timetable gives from that Friday on. Empty only if the mosque has never published any.
source_urlstring | nullThe page, PDF or image the times were read from.
updated_atISO 8601When the timetable was last read.

Recurring events

A recurring event, such as a weekly class, is returned once per occurrence. Each occurrence has its own id, slug and times. All occurrences share the same series_id, so you can group them. The recurrence object describes the pattern:

Recurrence

NameTypeDescription
rulestringdaily, weekly or monthly.
daysnumber[] | nullWeekdays, 1 = Monday … 7 = Sunday. For example [1, 4] is Monday and Thursday.
week_of_monthnumber | nullMonthly only: 1–4 = 1st–4th of those weekdays in the month, -1 = last. null = same date every month.
untilstring | nullDate of the last occurrence, or null if open-ended.

Pagination

List endpoints return a pagination object with the limit and offset you used and the total number of matching results. To get the next page, add limit to offset.

async function allEvents(mosqueId) {
  const events = []
  let offset = 0
  while (true) {
    const res = await fetch(
      `https://islamicevents.app/api/v1/mosques/${mosqueId}/events?limit=100&offset=${offset}`,
      { headers: { "X-API-Key": process.env.ISLAMIC_EVENTS_API_KEY } }
    )
    const page = await res.json()
    events.push(...page.data)
    offset += page.data.length
    if (page.data.length === 0 || offset >= page.pagination.total) return events
  }
}

Errors

Errors use the matching HTTP status code and this body:

{ "error": { "code": "bad_request", "message": "limit must be an integer between 1 and 100" } }

Error codes

StatusCodeMeaning
400bad_requestA query parameter is invalid. The message says which one.
401unauthorizedThe API key is missing, wrong or revoked.
404not_foundThe mosque or event doesn't exist.
500internal_errorSomething went wrong on our side. Retry later.

Fair use

  • Cache responses on your side and don't request the same data more than about once a minute.
  • When you show an event, link to its url so people can see the full and latest details.
  • Credit Islamic Events App and show islamicevents.app wherever the data appears. See Attribution.
  • Event details and images belong to their organisers. See our Terms of Use.
  • We may add new fields and categories to v1, so ignore any you don't recognise.