Docs / Reference · public.masjids.search · generated from openapi.json

Search masjids by name

GET/v1/masjids/search

Finds masjids matching q. Masjidbox owns the ranking, fuzzy matching, the relevance threshold and the number of results. Not pageable: the point is to find a masjid, not to enumerate them.

Query parameters

Query parameters
NameTypeDescription
qstring · requiredWhat to look for: a masjid name, 1 to 200 characters.

Response

The masjids found.

Response fields
FieldDescription
object

list

Always list.
data

object[]

The masjids found, best first; masjid-supplied times rank first at equal relevance.
data[].hasDonationCampaign

boolean

Whether GET /v1/masjids/{id}/donation-campaign answers a campaign. Changes when a campaign is enabled or disabled, never per donation.
data[].id

string

The masjid id, msj_….
data[].links

object

Outbound links: report always, the others absent when unknown.
data[].links.claim

string · optional

Where the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").
data[].links.donate

string · optional

The donation page. Absent when unknown.
data[].links.report

string

Where a user reports an error in this masjid's times. Always present: the page takes the report, or invites the masjid to claim its page when nobody manages it yet. Link a "Report an error" next to the attribution. To preselect the form, append any of ?prayer=&kind=&day= to the link: prayer is one of fajr, dhuhr, asr, maghrib, isha, jumua or other; kind is adhan or iqamah; day is the day the time is wrong, YYYY-MM-DD, from a week before the masjid's today to 30 days after.
data[].links.website

string · optional

The masjid's own website. Absent when unknown.
data[].location

object

Where the masjid is. Coordinates come as a pair or not at all.
data[].location.address

string · optional

The postal address, one line.
data[].location.city

string · optional

The city.
data[].location.country

string · optional

ISO 3166-1 alpha-2, upper case.
data[].location.latitude

number · optional

Latitude, decimal degrees. Given with 4 to 7 decimal places; the precision is not significant and may differ by less than a metre from one key to another. Identify a masjid by its id, never by its coordinates.
data[].location.longitude

number · optional

Longitude, decimal degrees. Given with 4 to 7 decimal places; the precision is not significant and may differ by less than a metre from one key to another. Identify a masjid by its id, never by its coordinates.
data[].name

string

The masjid name.
data[].object

masjid

Always masjid.
data[].timezone

string · optional

The masjid's IANA timezone, in which its prayer times are given.
curl
curl "https://hub.masjidbox.com/v1/masjids/search?q=East%20London%20Mosque" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidList
{
  "data": [
    {
      "hasDonationCampaign": true,
      "id": "msj_abc123defg",
      "links": {
        "claim": "https://app.masjidbox.com/register?claim=abc123defg",
        "donate": "https://masjidbox.com/donate/abc123defg",
        "report": "https://hub.masjidbox.com/report/msj_abc123defg",
        "website": "https://www.eastlondonmosque.org.uk"
      },
      "location": {
        "address": "82-92 Whitechapel Rd, London E1 1JQ",
        "city": "London",
        "country": "GB",
        "latitude": 51.5173,
        "longitude": -0.0652
      },
      "name": "East London Mosque",
      "object": "masjid",
      "timezone": "Europe/London"
    }
  ],
  "object": "list"
}