Apoya a Time.now: Únete a nuestro Plan Premium ¡para una experiencia sin anuncios! Apóyanos: ¡Hazte Premium sin anuncios!

🕌 Mosque Finder API

Find mosques near any location in the world. Our database covers 27,000+ cities across every continent, with up to 10 verified mosques per city including names, addresses, distances, and direct Google Maps links.

27k+
Cities covered
270k+
Mosque listings
10
Mosques per city
Free
No sign-up needed
  • Name & address for every mosque
  • Distance in km from your coordinates
  • Google Maps link for directions
  • Global coverage — Muslim-majority and minority countries alike

Find Mosques Near You

Enter a latitude and longitude to instantly retrieve nearby mosques from our database.


            

💡 Tip: Don't know your coordinates? Search your city on Google Maps, right-click the location, and copy the lat/lon shown.

Coverage & Data Quality

Our mosque database covers every city in our directory, with verified listings including names, addresses, and map links. Results are returned instantly.

Cities with no mosques nearby return an empty result ([]) rather than an error. The search uses a configurable radius, so you can widen the search if your city has sparse results.

API for Developers

Integrate mosque lookup into your app, website, or prayer time tool using our free JSON API. No API key required. CORS is enabled — call directly from browser JavaScript.

Attribution required: add a visible link to Time.Now in your app footer or About screen:
<a href="https://time.now">Mosque data by Time.Now</a>

Endpoint

GET https://time.now/mosques/api/mosques

Returns a JSON array of mosques ordered by distance ascending. Always returns 200 — empty array when nothing is found.

Parameters

ParameterTypeRequiredDefaultDescription
latfloat required Latitude −90 to 90
lonfloat required Longitude −180 to 180
radiusfloat optional 25 Search radius in km (max 100)
limitint optional 10 Max results returned (max 20)

Response Schema

[
  {
    "name":        "London Central Mosque",
    "address":     "146 Park Rd, London NW8 7RG",
    "distance_km": 2.3,
    "url":         "https://www.iccuk.org/",
    "city_slug":   "london"
  }
]
FieldTypeDescription
namestringMosque name
addressstringStreet address
distance_kmfloatApproximate distance from your coordinates in km
urlstringMosque website or Google Maps link
city_slugstringCity identifier in our database

Code Examples

JavaScript

fetch('https://time.now/mosques/api/mosques?lat=51.5074&lon=-0.1278&limit=5')
  .then(r => r.json())
  .then(mosques => {
    mosques.forEach(m => {
      console.log(`${m.name} — ${m.distance_km} km`);
      console.log(`  ${m.address}`);
    });
  });

Python

import requests

r = requests.get('https://time.now/mosques/api/mosques', params={
    'lat': 51.5074, 'lon': -0.1278, 'radius': 10, 'limit': 5
})
for m in r.json():
    print(f"{m['name']} — {m['distance_km']} km  |  {m['address']}")

curl

curl "https://time.now/mosques/api/mosques?lat=51.5074&lon=-0.1278&limit=5"

PHP

$mosques = json_decode(file_get_contents(
    'https://time.now/mosques/api/mosques?lat=51.5074&lon=-0.1278&limit=5'
), true);

foreach ($mosques as $m) {
    echo $m['name'] . ' — ' . $m['distance_km'] . " km\n";
}

React Hook

import { useState, useEffect } from 'react';

function useNearbyMosques(lat, lon, radius = 15) {
  const [mosques, setMosques] = useState([]);
  useEffect(() => {
    if (!lat || !lon) return;
    fetch(`https://time.now/mosques/api/mosques?lat=${lat}&lon=${lon}&radius=${radius}`)
      .then(r => r.json())
      .then(setMosques);
  }, [lat, lon, radius]);
  return mosques;
}

Error Codes

StatusMeaning
200 []No mosques found within the radius — not an error
400lat or lon missing or out of valid range