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
| Name | Type | Description |
|---|---|---|
q | string · required | What to look for: a masjid name, 1 to 200 characters. |
Response
The masjids found.
| Field | Description |
|---|---|
objectlist | Always list. |
dataobject[] | The masjids found, best first; masjid-supplied times rank first at equal relevance. |
data[].hasDonationCampaignboolean | Whether GET /v1/masjids/{id}/donation-campaign answers a campaign. Changes when a campaign is enabled or disabled, never per donation. |
data[].idstring | The masjid id, msj_…. |
data[].linksobject | Outbound links: report always, the others absent when unknown. |
data[].links.claimstring · optional | Where the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox"). |
data[].links.donatestring · optional | The donation page. Absent when unknown. |
data[].links.reportstring | 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.websitestring · optional | The masjid's own website. Absent when unknown. |
data[].locationobject | Where the masjid is. Coordinates come as a pair or not at all. |
data[].location.addressstring · optional | The postal address, one line. |
data[].location.citystring · optional | The city. |
data[].location.countrystring · optional | ISO 3166-1 alpha-2, upper case. |
data[].location.latitudenumber · 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.longitudenumber · 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[].namestring | The masjid name. |
data[].objectmasjid | Always masjid. |
data[].timezonestring · optional | The masjid's IANA timezone, in which its prayer times are given. |
Errors
curl "https://hub.masjidbox.com/v1/masjids/search?q=East%20London%20Mosque" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"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"
}